Skip to main content

The official satellite test has three traps.

We built a checker that catches all three.

  1. 20413Run 1 · days 1 to 3Run 2 · 3.5 years later

    1

    One satellite, listed twice

    Mix the two runs up and the test lies to you.

    ▸The full story

    Satellite 20413 is listed twice in the official file with identical element sets but two different time spans (1,440 to 4,320 minutes, then 1,844,000 to 1,845,100 minutes). Keying results by satellite number silently merges the two runs; the harness compares blocks in file order.

  2. bug zone0 min280.5720 min

    2

    A case built to show a known bug

    Here, a difference is the right answer.

    ▸The full story

    The official file marks satellite 23599 as showing the Lyddane/AcTan quadrant bug beyond 280.5 minutes. Here the Java reference differs from the build at 16 points, the earliest at 420 minutes; Fortran and MATLAB do not. Those points are reported separately and must all fall after 280.5 minutes, or the check fails.

  3. 24 rows, one line

    3

    A hidden duplicate

    The last line of one file hides 24 extra rows.

    ▸The full story

    The MATLAB reference ends with one unbroken 2,568-character line holding 24 rows of satellite 08195, duplicating every row already in the file except the epoch row. A parser that expects one row per line mis-reads it; the harness parses it separately and checks it against 08195.

With the traps handled, our build matches.

  • 0.09 mm

    vs Fortran

  • 0.12 mm

    vs MATLAB

  • 0.12 mm

    vs Java

  • 83×

    inside the 1 cm limit

  • 33 test cases
  • 666 positions, one by one
  • Linux · GCC
  • Windows · MinGW
Maximum position difference per satellite caseFor each of 33 official test cases, the largest position difference between ELION's SGP4 build and the Fortran, MATLAB and Java reference outputs, on a logarithmic scale. Every point lies far below the 1 cm tolerance line.identical1 µm10 µm0.1 mm1 mm1 cm10 cmtolerance (1 cm)Satellite 5 vs Fortran: identicalSatellite 5 vs MATLAB: identicalSatellite 5 vs Java: identical5Satellite 4632 vs Fortran: identicalSatellite 4632 vs MATLAB: identicalSatellite 4632 vs Java: identical4632Satellite 6251 vs Fortran: identicalSatellite 6251 vs MATLAB: identicalSatellite 6251 vs Java: identical6251Satellite 8195 vs Fortran: identicalSatellite 8195 vs MATLAB: identicalSatellite 8195 vs Java: identical8195Satellite 9880 vs Fortran: identicalSatellite 9880 vs MATLAB: identicalSatellite 9880 vs Java: identical9880Satellite 9998 vs Fortran: identicalSatellite 9998 vs MATLAB: identicalSatellite 9998 vs Java: identical9998Satellite 11801 vs Fortran: identicalSatellite 11801 vs MATLAB: identicalSatellite 11801 vs Java: identical11801Satellite 14128 vs Fortran: identicalSatellite 14128 vs MATLAB: identicalSatellite 14128 vs Java: identical14128Satellite 16925 vs Fortran: identicalSatellite 16925 vs MATLAB: identicalSatellite 16925 vs Java: identical16925Satellite 20413 vs Fortran: 0.01 mmSatellite 20413 vs MATLAB: identicalSatellite 20413 vs Java: identical20413Satellite 21897 vs Fortran: identicalSatellite 21897 vs MATLAB: identicalSatellite 21897 vs Java: identical21897Satellite 22312 vs Fortran: identicalSatellite 22312 vs MATLAB: identicalSatellite 22312 vs Java: identical22312Satellite 22674 vs Fortran: identicalSatellite 22674 vs MATLAB: identicalSatellite 22674 vs Java: identical22674Satellite 23177 vs Fortran: identicalSatellite 23177 vs MATLAB: identicalSatellite 23177 vs Java: identical23177Satellite 23333 vs Fortran: 0.07 mmSatellite 23333 vs MATLAB: 0.01 mmSatellite 23333 vs Java: 0.01 mm23333Satellite 23599 vs Fortran: identical (documented window only)Satellite 23599 vs MATLAB: identical (documented window only)Satellite 23599 vs Java: identical (documented window only)23599Satellite 24208 vs Fortran: identicalSatellite 24208 vs MATLAB: identicalSatellite 24208 vs Java: identical24208Satellite 25954 vs Fortran: identicalSatellite 25954 vs MATLAB: identicalSatellite 25954 vs Java: identical25954Satellite 26900 vs Fortran: identicalSatellite 26900 vs MATLAB: identicalSatellite 26900 vs Java: identical26900Satellite 26975 vs Fortran: identicalSatellite 26975 vs MATLAB: identicalSatellite 26975 vs Java: identical26975Satellite 28057 vs Fortran: 0.01 mmSatellite 28057 vs MATLAB: 0.01 mmSatellite 28057 vs Java: 0.01 mm28057Satellite 28129 vs Fortran: 0.01 mmSatellite 28129 vs MATLAB: 0.01 mmSatellite 28129 vs Java: 0.01 mm28129Satellite 28350 vs Fortran: identicalSatellite 28350 vs MATLAB: identicalSatellite 28350 vs Java: identical28350Satellite 28623 vs Fortran: identicalSatellite 28623 vs MATLAB: identicalSatellite 28623 vs Java: identical28623Satellite 28626 vs Fortran: identicalSatellite 28626 vs MATLAB: identicalSatellite 28626 vs Java: identical28626Satellite 28872 vs Fortran: identicalSatellite 28872 vs MATLAB: identicalSatellite 28872 vs Java: identical28872Satellite 29141 vs Fortran: identicalSatellite 29141 vs MATLAB: identicalSatellite 29141 vs Java: identical29141Satellite 29238 vs Fortran: identicalSatellite 29238 vs MATLAB: identicalSatellite 29238 vs Java: identical29238Satellite 88888 vs Fortran: identicalSatellite 88888 vs MATLAB: identicalSatellite 88888 vs Java: identical88888Satellite 33333 vs Fortran: identicalSatellite 33333 vs MATLAB: identicalSatellite 33333 vs Java: identical33333Satellite 33334 vs Fortran: identicalSatellite 33334 vs MATLAB: identicalSatellite 33334 vs Java: identical33334Satellite 33335 vs Fortran: identicalSatellite 33335 vs MATLAB: identicalSatellite 33335 vs Java: identical33335Satellite 20413 vs Fortran: 0.09 mmSatellite 20413 vs MATLAB: 0.12 mmSatellite 20413 vs Java: 0.12 mm20413
vs Fortranvs MATLABvs JavaSatellite numbers along the bottom; amber label = the documented Lyddane case.

← swipe the chart →

Each dot is one test case. Lower is closer. All sit far below the dashed limit.

▸How the checker works

A portable driver builds David A. Vallado's SGP4 unmodified, then compares every state vector, block by block, with each reference: position, velocity, row counts, and the step at which each of the 6 deliberately decaying or invalid cases stops. It runs on Linux (GCC, on every change) and on Windows (MinGW-w64 GCC), which catches compiler and maths-library differences.

The build stops at exactly the same step as every reference (666 state vectors from 33 cases in total). Tolerance: 1 cm in position, the limit of the digits the reference files publish.

Matching is not the same as accurate.

Our build copies the official code almost perfectly. Any SGP4 prediction is still about a kilometre from the real satellite.

▸What this proves, and what it does not

The build is compared, state vector by state vector, with the official Fortran, MATLAB and Java outputs published alongside it in AIAA 2006-6753.

These four implementations share an algorithm and a lineage — they were published together as companion code to the same paper. Agreement between them demonstrates that this build is numerically correct: it catches build errors, compiler and maths-library differences, and porting mistakes. It is not independent confirmation of the algorithm, and an error common to the lineage would not be caught here.

What this does not measure: SGP4's accuracy. A position propagated from a published TLE is typically around a kilometre from the true position at epoch, and the error grows from there. The sub-millimetre figures above describe agreement between implementations, not knowledge of where a satellite actually is. The two differ by roughly seven orders of magnitude.

Every tool is tested on every build.

8 of 8 known answers match. Each dot is one.

▸Where every known answer comes from

Each expected value comes from an independent source (a physical identity, a published example or an independent calculation), never from the tool's own output.

CheckSource of the expected valueResult
ORB-001Physical: a geostationary orbit's period equals one sidereal day (86164.0905 s).✓ Pass
ORB-002Closed form T = 2*pi*sqrt(r^3/mu), independently recomputed (92.56 min).✓ Pass
ORB-003Vis-viva for a circular orbit, v = sqrt(mu/r), independently recomputed.✓ Pass
ORB-004Vis-viva for a circular orbit, independently recomputed.✓ Pass
ORB-005Closed-form Hohmann transfer, independently recomputed; agrees with the widely published ~3.89 km/s for 300 km LEO to GEO.✓ Pass
ORB-006Closed-form Hohmann transfer, independently recomputed.✓ Pass
ORB-007Half the transfer-ellipse period, independently recomputed (5.275 h).✓ Pass
ORB-008Identity: a transfer to the same orbit costs nothing.✓ Pass

Toolkit commit dd0281f. Checks re-run on every build of this website and on every change to the toolkit.

SGP4 checked with GCC 15.2.0 (Linux, website build). SGP4 source: D. A. Vallado, P. Crawford, R. Hujsak and T. S. Kelso, “Revisiting Spacetrack Report #3,” AIAA 2006-6753, via CelesTrak. Accuracy figure: AIAA 2006-6753 and the Skyfield documentation. Verification harness by Jissal Gigi.