This is the 2D counterpart to the 3D circular-orbit GPS simulator, computed independently rather than flattened from a 3D scene. The 3D version only ever holds a circular orbit, where the special- and general-relativistic rate shifts are constant. Here the orbit is a real Kepler ellipse — perigee and apogee are set independently — so speed and altitude vary continuously, and a genuine numerical Kepler-equation solver (Newton–Raphson) drives the satellite's position every frame:
M(t) = n·t (mean anomaly, n = √(GM/a³))
M = E − e·sin(E) ⟶ solved for E each step
r = a(1 − e·cos E), v² = GM(2/r − 1/a) (vis-viva)
The instantaneous clock-rate shift is Δ(dτ/dt) = −v²/2c² + (GM/c²)(1/R⊕ − 1/r). Its orbit-time-average works out to the same closed form as the circular case with r → a: ⟨Δ(dτ/dt)⟩ = (GM/c²)(1/R⊕ − 3/2a) — this is the constant real GPS satellites are pre-tuned for before launch (the "mean frequency offset" toggle).
But an eccentric orbit still drifts within each orbit around that mean, because the pre-launch offset can only cancel a constant. That residual works out — exactly, not just approximately — to the real correction term broadcast in every GPS navigation message and applied by every GPS receiver on Earth:
Δt_r(t) = −(2/c²)·√(GM·a)·e·sin E(t)
- Perigee / apogee sliders — set the ellipse's closest and farthest altitude independently; equal values give a circular orbit identical in physics to the 3D sim.
- Mean frequency offset — the constant pre-launch clock tuning; toggling it off shows the full uncorrected drift including its constant part.
- Broadcast eccentricity term — the real per-satellite correction receivers compute live from the broadcast orbital elements; with both toggles on the displayed residual should collapse to near zero even for a strongly eccentric orbit, which is exactly why real receivers need this term whenever e is not negligible.
- The rate strip beneath the orbit map — a genuinely 2D-native view with no 3D equivalent — plots the net rate and the eccentricity term across one full orbit (by mean anomaly), with the satellite's current position marked.
All constants are the real physical ones (G, Earth's mass, c, Earth's radius); only the orbital period itself is sped up so it plays out in seconds rather than hours.