The snakes, loops and figure eights real orbits trace over a turning world.
Six satellites fly Keplerian orbits, solved with Newton's method on Kepler's equation, plus the secular drift that Earth's equatorial bulge (J2) gives the node and the perigee. That drift is the whole trick of the sun-synchronous orbit, whose plane turns once a year so it keeps crossing the equator at the same local time (the panel computes it live), and it vanishes at 63.4 degrees, which is why Molniya and Tundra orbits can hold their apogee over the north. Each ground track is the inertial orbit turned by sidereal time into latitude and longitude, sampled with time steps that shrink near perigee, and drawn fading into the past with the future dashed. Coverage footprints follow from altitude and a minimum elevation angle, the terminator and twilight come from the subsolar point with city lights on the night side, and an inset shows the same orbits in 3D.
Try it. Tap a preset (or use the arrow keys) to focus an orbit, or click a satellite on the map. Drag the inclination dial and let go to launch a new 550 km orbit from the launch site; inclinations below the site's latitude are out of reach (up and down arrows nudge the dial, Enter launches). Click the map or press Space to pause, and use [ and ] to change the time warp. Left alone it tours the orbits and launches new ones.
Paste this into Claude Code, Codex or any coding agent to get a simple version running, then take it wherever you like.
Build a satellite ground track visualizer with JavaScript and the HTML canvas element: orbits drawn as the paths they trace over a rotating Earth. Put everything in a single index.html file with no libraries or build step, so I can open it directly in a browser.
Start simple:
- Make a canvas that fills the window, stays sharp on high-DPI screens (scale by devicePixelRatio), and resizes with the window. Draw an equirectangular world map: a dark blue ocean, a 30 degree grid, and continents made from 3D noise sampled on the sphere at each pixel's latitude and longitude.
- Model a circular orbit by its radius, inclination and node. Its inertial position at time t is a point on a tilted circle. Rotate that by Earth's spin (7.29e-5 radians per second) and convert to latitude and longitude.
- Run a simulation clock about 600 times faster than real time, and draw each satellite's track for the last orbit or two as a polyline, breaking the line where it wraps across the map edge.
- Add a few presets: a 400 km orbit at 51.6 degrees, a polar orbit, and a geostationary one that sits still.
Once that works, make it beautiful:
- Support eccentric orbits by solving Kepler's equation with Newton's method, and add a Molniya orbit (12 hours, eccentricity 0.74, inclination 63.4 degrees, perigee at 270 degrees) to see its loops.
- Shade night from the subsolar point and draw each satellite's coverage circle.
- Fade old parts of each track, give every orbit its own color, and show the selected one's altitude and period.
Explain the key ideas in short code comments. When you're done, tell me how to open it and suggest three directions I could take it next, such as adding the J2 drift that makes sun-synchronous orbits work, a 3D inset of the orbits, or launching new orbits from a chosen site.