Page:SATCON2 Algorithms Report.pdf/24

 For each satellite, we calculate the position at a series of time steps specified by the user. For each step, we perform the following steps:


 * 1) Calculate the geocentric satellite position and uncertainty (interpolating state and covariance from the ephemeris or propagating TLE and using a fixed uncertainty estimate). Note that covariance interpolation can lead to unphysical results (results which are non-positive-definite or have negative variance). See the astroplan package (https://astronplan.readthedocs.io/en/latest/) for approaches to handling this.
 * 2) Calculate the difference vector between the observatory location and the satellite position.
 * 3) Transform this to a unit vector (the “line of sight”) in the observatory topocentric frame.
 * 4) Determine the telescope field of view at this time in the topocentric frame.
 * 5) There remain detailed issues to resolve: how to handle aberration and refraction; whether we convert the FOV from apparent to true RA/Dec, or conversely convert the satellite vectors from true to apparent. An observing schedule is normally given in true RA/Dec rather than apparent, so the former approach seems better.
 * 6) If the line of sight is within the field of view, the satellite is geometrically observable (Alfano, Negron & Moore, 1992).
 * 7) Calculate the satellite topocentric angular velocity in the instrument frame.
 * 8) This is not necessarily tracking at the sidereal rate; however, this is unlikely to be a significant issue.
 * 9) Calculate the geocenter-Sun vector from, e.g., the JPL ephemeris.
 * 10) Subtract the satellite-geocenter vector to obtain the satellite-Sun unit vector.
 * 11) Compare the geocenter-Sun vector and Earth radius to see if the Sun is above the horizon as seen by satellite — if so, it is illuminated.

In simple mode:
 * 1) Output the result line if the satellite is geometrically observable.
 * 2) Keep track of whether the satellite was observable at the previous time step; if so, it’s the same streak and has the same streak ID (identification) number. If not, increment the streak ID number.
 * 3) The result line indicates: satellite catalog number; streak ID number; predicted topocentric right ascension and declination at the time step; a flag to say whether the satellite is illuminated or not; the location of the streak in the field of view.

In advanced mode: Rh
 * 1) Use the BRDF (and attitude model if available) to determine the predicted magnitude in specified bands. Add to the output line.
 * 2) Use the angular velocity and pixel size to predict the surface brightness of the streak per pixel. Add to the output line.