"…The primary purpose of the Data statement is to give names
to constants; instead of referring to π as 3.141592653589793
at every appearance, the variable Pi can be given that value
with a Data statement and used instead of the longer form of
the constant. This also simplifies modifying the program,
should the value of π change."
– Fortran manual for Xerox Computers
• When compiled with full optimizations with Microsoft Visual C, the select_ephemeris() function misbehaved to the extent of setting the DEEP_SPACE_EPHEM_FLAG incorrectly on occasion. I traced it to this line (in basics.cpp):
temp = ck2 * 1.5 * (r1r13.0-1.0) / pow( 1.0-tle->eo*tle->eo, 1.5);
which sets 'temp' to INF, despite the fact that ck2, r1, and tle->eo had reasonable values. Changing it to read as follows:
temp = ck2 * 1.5 * (r1r13.0-1.0) * pow( 1.0-tle->eo*tle->eo, -1.5);