Satellite Orbit Propagator

How small a time step brings a circular orbit back to its starting point?

UndergraduateOrbital Mechanics3–5 weeks
Last reviewed: November 2026

Overview

A circular orbit around a spherical Earth returns to its starting point after exactly one period. Suppose your numerical orbit returns two meters away. How would you tell whether the difference comes from the time step, the starting conditions or the physics?

Build a propagator that advances position and velocity in time. Start with an invented orbit 400 km above Earth, choose a time step that meets a one-meter numerical tolerance, then change the gravity model and measure what happens to the orbit’s plane. The reference calculation runs offline in Python 3.8 or newer with the standard library. You can also implement the same checks in MATLAB.

What You'll Learn

  • ✓Calculate a circular orbit’s speed and period from its geocentric radius.
  • ✓Implement fourth-order Runge–Kutta integration and select a time step using position and energy errors.
  • ✓Convert between Cartesian states and orbital elements, including circular and equatorial cases.
  • ✓Measure how Earth’s equatorial bulge affects ascending-node drift at two inclinations.
  • ✓Explain which comparisons test a numerical model and which ones require an independent measurement.

Step-by-Step Guide

1

Define an orbit with a known answer

Work in fixed, Earth-centered equatorial axes, with north along +z. Use kilometers and seconds throughout. Earth’s equatorial radius is R = 6378.137 km and its rounded gravitational parameter is μ = 398600 km³/s². Adding 400 km of altitude gives the distance from the centre, r₀ = 6778.137 km. These are the constants used in the reference. NASA Earth Fact Sheet

Calculate the circular speed v₀ = √(μ/r₀) and the period T = 2π√(r₀³/μ). You should get 7.668554 km/s and 5553.627 s (92.5605 min). Begin on +x, crossing the equator toward the north at inclination i = 45°. Set position to (r₀, 0, 0) and velocity to (0, v₀ cos i, v₀ sin i). Use radians inside your trigonometric functions.

2

Integrate one complete period

Store position and velocity in a six-component state. Its derivative is (velocity, acceleration), with acceleration a = −μr / |r|³. A fourth-order Runge–Kutta (RK4) step samples this derivative at the start, twice at the midpoint and once at the end. Average those rates with weights 1, 2, 2 and 1, divide by six, then multiply by the step duration to update the state.

Take N equal steps of T/N so every run ends at exactly T. Use the full-precision period calculated from the constants. To reproduce the reference, download the file and run python3 orbit_reference.py from its folder. Download the Python reference

3

Choose a step size and check conservation

Measure the distance between the final and initial positions. The default run gives 32.4100 m at 90 steps, 1.7377 m at 180 steps and 0.0996 m at 360 steps. Which is the coarsest of these three that meets the one-meter goal? Explain why twice as many integration steps buy more than a factor of two in accuracy here. Full reference output

For spherical gravity, specific mechanical energy ε = |v|²/2 − μ/|r| stays constant. At every step compute |ε − ε₀| / |ε₀|, then keep the maximum. The 360-step run gives 2.827 × 10⁻¹⁰. Plot both errors against step size. The position check catches timing errors that a nearly constant energy value alone could miss.

4

Recover the orbit from a state vector

Calculate specific angular momentum h = r × v. Its direction identifies the orbital plane, so cos i = hz/|h|. Use the energy to recover the semimajor axis a = −μ/(2ε). For the starting state, recover 45° and 6778.137 km. NASA guide to orbital elements

For a round-trip test choose a second, invented ellipse with a = 8000 km, eccentricity 0.1, inclination 45°, ascending node 30°, argument of periapsis 20° and true anomaly 40°. Convert those elements to position and velocity, then recover the elements and compare angles modulo 360°. A circular orbit has no unique periapsis, so use the angle from the ascending node. For a circular equatorial orbit, use longitude measured from +x.

5

Test how the equatorial bulge moves the node

Turn on J₂ = 0.00108263, the dimensionless term representing Earth’s equatorial bulge in the reference acceleration. Starting from the same 45° state, interpolate to each south-to-north equator crossing. Read its angle in the fixed equatorial plane with atan2(y, x). Track the angle continuously across ±180° and divide the accumulated change by elapsed time over ten complete node intervals.

For an initially circular orbit, the first-order average rate is −(3/2) J₂ n (R/a)² cos i, where n = √(μ/a³). At 45° this gives −5.6946°/day. The integration gives −5.7186°/day. The formula averages the perturbation and uses the initial circular elements here, so small differences are expected. Repeat at 90° as a control. The cosine term vanishes and the computed drift is zero to rounding precision. NASA Goddard orbit primer, slide 4 (PDF)

6

Explain what your evidence establishes

Submit your initial state and units, the step-size comparison, and a plot of ascending-node angle against elapsed days. Say which test checked numerical accuracy and which tested the gravity model’s physical prediction. Name one observation, such as a time-stamped radio range with a stated uncertainty, that could independently test a real trajectory.

A two-line element set (TLE) contains mean orbital elements fitted to observations for the SGP4 family of models. A position produced by SGP4 is a model prediction. Comparing two propagators tests their agreement. Interpreting a difference from a measurement also requires a common time, reference frame and definition of what was measured. CelesTrak on fitted elements and prediction accuracy

Go Further

NASA’s CAPSTONE spacecraft flew a near-rectilinear halo orbit around the Moon. The mission used radio signals exchanged with the Lunar Reconnaissance Orbiter to measure separation and how quickly it changed. Earth and Moon gravity both shape that trajectory. Which parts of your model-checking process could you carry over, and which inputs would you have to replace? NASA’s CAPSTONE mission and radio measurements

To draw a ground track for your classroom orbit, start a fictitious prime meridian under +x at t = 0. Compute geocentric latitude from atan2(z, √(x² + y²)). Subtract Earth’s rotation angle from atan2(y, x) to get longitude, using a sidereal rotation period of 23.9345 hours and wrapping the result to ±180°. Label this as a spherical-Earth construction. NASA rotation period