Theory-to-Code Mapping
Every equation in pg_orbit traces to a published, peer-reviewed source. This page provides the complete mapping between the celestial mechanics literature and the source files that implement each theory.
If a constant, algorithm, or formula appears in the code without a citation, that is a defect to be corrected.
SGP4/SDP4 propagation
Section titled “SGP4/SDP4 propagation”The core satellite propagation theory, implemented by Bill Gray’s sat_code library.
| Theory | Source Paper | What it computes | Code location |
|---|---|---|---|
| Mean element recovery | Brouwer (1959) | Original mean motion and semi-major axis from input TLE, removing secular perturbations | sat_code/common.cpp:sxpall_common_init() |
| Secular perturbations | Lane & Cranford (1969); Hoots & Roehrich STR#3 | Secular rates of , , and due to , | sat_code/common.cpp:sxpx_common_init() |
| Atmospheric drag | Hoots & Roehrich STR#3 | formulation of drag; , , coefficients; perigee-dependent parameter | sat_code/common.cpp:sxpx_common_init(); sat_code/sgp4.cpp:SGP4_init() |
| Short-period perturbations | Lane & Cranford (1969); Brouwer (1959) | Oscillatory corrections to radius, argument of latitude, node, and inclination | sat_code/common.cpp:sxpx_posn_vel() |
| Kepler equation | Classical | Newton-Raphson with second-order correction, bounded first step | sat_code/common.cpp:sxpx_posn_vel() |
| Deep-space resonance | Hujsak (1979) | Lunar/solar gravitational perturbations; geopotential resonance for 12-hour and 24-hour orbits | sat_code/deep.cpp:Deep_dpinit(), Deep_dpsec(), Deep_dpper() |
| Near-earth propagation | Hoots & Roehrich STR#3 | SGP4 main loop: secular + short-period + drag terms | sat_code/sgp4.cpp:SGP4() |
| Deep-space propagation | Hoots & Roehrich STR#3 | SDP4: SGP4 core + deep-space secular/periodic corrections | sat_code/sdp4.cpp:SDP4() |
| Near/deep selection | Hoots & Roehrich STR#3 | Period threshold: 225 minutes ( rad/min) | sat_code/norad.h:select_ephemeris() |
Primary reference
Section titled “Primary reference”Hoots, F. R. & Roehrich, R. L. (1980). “Models for Propagation of NORAD Element Sets.” Spacetrack Report No. 3, Aerospace Defense Command, Peterson AFB.
This is the canonical SGP4/SDP4 reference. All subsequent implementations, including Vallado’s 2006 revision, trace back to this report.
Coordinate transforms
Section titled “Coordinate transforms”| Theory | Source | What it computes | Code location |
|---|---|---|---|
| GMST | Vallado (2013) Eq. 3-47; IAU 1982 | Greenwich Mean Sidereal Time from Julian date | src/sidereal_time.c:gmst_from_jd() |
| TEME to ECEF | Vallado (2013) | Z-axis rotation by ; velocity cross-product correction | src/coord_funcs.c:teme_to_ecef() |
| Geodetic from ECEF | Bowring (1976) | Iterative latitude from ECEF Cartesian on WGS-84 | src/coord_funcs.c:ecef_to_geodetic() |
| Topocentric transform | Standard SEZ | ECEF range vector rotated to South-East-Zenith; azimuth from north | src/coord_funcs.c:ecef_to_topocentric() |
| Observer to ECEF | Geodesy standard | WGS-84 ellipsoid surface point to Cartesian | src/coord_funcs.c:observer_to_ecef() |
| Range rate | Dot product | Projection of relative velocity onto line-of-sight unit vector | src/coord_funcs.c:eci_to_topocentric() |
| Semi-major axis from | Kepler’s third law | in earth radii | src/tle_type.c:tle_perigee() |
| IAU 1976 precession | Lieske et al. (1977) | Three Euler angles , , for precession from J2000 to date | src/precession.c:precess_j2000_to_date() |
| Ecliptic to equatorial | IAU | X-axis rotation by obliquity | src/planet_funcs.c:ecliptic_to_equatorial() |
Primary references
Section titled “Primary references”- Vallado, D. A. (2013). Fundamentals of Astrodynamics and Applications, 4th ed. Microcosm Press.
- Lieske, J. H. et al. (1977). “Expressions for the Precession Quantities Based upon the IAU (1976) System of Astronomical Constants.” Astronomy & Astrophysics, 58, 1-16.
- Bowring, B. R. (1976). “Transformation from Spatial to Geographical Coordinates.” Survey Review, 23, 323-327.
Planetary ephemerides
Section titled “Planetary ephemerides”| Theory | Source | Bodies | Accuracy | Code location |
|---|---|---|---|---|
| VSOP87 | Bretagnon & Francou (1988) | Mercury through Neptune | ~1 arcsecond | src/vsop87.c |
| ELP2000-82B | Chapront-Touze & Chapront (1988) | Moon | ~10 arcseconds | src/elp82b.c |
VSOP87
Section titled “VSOP87”Bretagnon, P. & Francou, G. (1988). “Planetary Theories in Rectangular and Spherical Variables. VSOP87 Solutions.” Astronomy & Astrophysics, 202, 309-315.
pg_orbit uses the VSOP87 rectangular ecliptic J2000 variant. The truncated coefficient tables provide full accuracy within the validity range of the theory (roughly 4000 BCE to 8000 CE for the inner planets, with degradation for the outer planets beyond 2000 years from J2000).
ELP2000-82B
Section titled “ELP2000-82B”Chapront-Touze, M. & Chapront, J. (1988). “ELP 2000-85: A Semi-Analytical Lunar Ephemeris Adequate for Historical Times.” Astronomy & Astrophysics, 190, 342-352.
The 82B revision is the version implemented. It provides geocentric ecliptic coordinates for the Moon, accounting for the principal perturbations from the Sun but not the complete set of planetary perturbations available in modern lunar ephemerides like DE421.
Planetary moon theories
Section titled “Planetary moon theories”| Theory | Source | Moons | Accuracy | Code location |
|---|---|---|---|---|
| L1.2 | Lieske (1998) | Io, Europa, Ganymede, Callisto | ~1 arcsecond | src/l12.c |
| TASS17 | Vienne & Duriez (1995) | Mimas through Iapetus | ~1-5 arcseconds | src/tass17.c |
| GUST86 | Laskar & Jacobson (1987) | Miranda through Oberon | ~5-10 arcseconds | src/gust86.c |
| MarsSat | Jacobson (2010) | Phobos, Deimos | ~1 arcsecond | src/marssat.c |
References
Section titled “References”- Lieske, J. H. (1998). “Galilean Satellites of Jupiter.” Astronomy & Astrophysics Supplement Series, 129, 205-217.
- Vienne, A. & Duriez, L. (1995). “TASS1.7: An Analytical Theory of the Motion of the Main Satellites of Saturn.” Astronomy & Astrophysics, 297, 588-605.
- Laskar, J. & Jacobson, R. A. (1987). “GUST86: An Analytical Ephemeris of the Uranian Satellites.” Astronomy & Astrophysics, 188, 212-224.
- Jacobson, R. A. (2010). “The Orbits and Masses of the Martian Satellites and the Libration of Phobos.” Astronomical Journal, 139, 668-679.
Transfer orbits
Section titled “Transfer orbits”| Theory | Source | What it computes | Code location |
|---|---|---|---|
| Lambert solver | Izzo (2015) | Transfer velocity vectors given two positions and time of flight | src/lambert.c |
| Keplerian propagation | Classical | Two-body elliptic/hyperbolic orbit from elements | src/elliptic_to_rectangular.c |
References
Section titled “References”- Izzo, D. (2015). “Revisiting Lambert’s Problem.” Celestial Mechanics and Dynamical Astronomy, 121, 1-15.
The Izzo solver uses Householder iterations for fast convergence and handles both short-way and long-way transfers. pg_orbit uses the prograde (short-way) solution by default.
Radio emission
Section titled “Radio emission”| Theory | Source | What it computes | Code location |
|---|---|---|---|
| Carr source regions | Carr et al. (1983) | Jupiter-Io decametric burst probability from CML and Io phase | src/radio_funcs.c |
| CML computation | Standard | Jupiter System III Central Meridian Longitude | src/radio_funcs.c |
Reference
Section titled “Reference”Carr, T. D. et al. (1983). “Phenomenology of Magnetospheric Radio Emissions.” Physics of the Jovian Magnetosphere, Cambridge University Press, 226-284.
Vallado reference vectors
Section titled “Vallado reference vectors”The Vallado 518 test vectors are the definitive verification dataset for SGP4 implementations. Each row specifies a NORAD ID, minutes since epoch, and expected position/velocity in TEME.
Sample from the verification suite:
# NORAD 00005 (Vanguard 1) - LEO, low eccentricity# Minutes: 360.00 Expected X: -7154.031380 Y: -3783.176825 Z: -2073.655980
# NORAD 29238 (GPS BIIR-11) - MEO, near-circular# Minutes: 0.00 Expected X: -22503.132440 Y: 14513.963880 Z: 180.989390
# NORAD 28350 (Galaxy 15) - GEO, deep-space SDP4# Minutes: 0.00 Expected X: -33110.816260 Y: 26044.993650 Z: -20.725400These vectors cover the full range of orbit types that pg_orbit handles: LEO (SGP4), MEO (SGP4), GEO (SDP4), high-eccentricity Molniya (SDP4), and deep-space GPS (SDP4). Any implementation that matches all 518 vectors is functionally equivalent to the Vallado reference.
Source file index
Section titled “Source file index”A quick reference for finding the implementation of a specific theory.
| Source file | Theory/Function | Lines (approx) |
|---|---|---|
src/vsop87.c | VSOP87 planet positions | ~3000 (coefficient tables) |
src/elp82b.c | ELP2000-82B Moon position | ~2000 (coefficient tables) |
src/l12.c | L1.2 Galilean moons | ~800 |
src/tass17.c | TASS17 Saturn moons | ~1200 |
src/gust86.c | GUST86 Uranus moons | ~600 |
src/marssat.c | MarsSat Mars moons | ~400 |
src/precession.c | IAU 1976 precession | ~60 |
src/sidereal_time.c | GMST computation | ~40 |
src/lambert.c | Izzo Lambert solver | ~300 |
src/coord_funcs.c | Coordinate transforms | ~650 |
src/pass_funcs.c | Pass prediction algorithm | ~550 |
src/gist_tle.c | GiST altitude-band index | ~400 |
src/planet_funcs.c | Observation pipeline | ~250 |
src/radio_funcs.c | Jupiter radio emission | ~200 |
sat_code/sgp4.cpp | SGP4 near-earth propagator | ~300 |
sat_code/sdp4.cpp | SDP4 deep-space propagator | ~200 |
sat_code/deep.cpp | Deep-space perturbations | ~800 |
sat_code/common.cpp | Shared SGP4/SDP4 initialization | ~250 |