Module 05 · Lesson 3
Visualizing Orbits in 2D and 3D
Maps and globes turn orbit numbers into something people can check at a glance. This lesson covers projections, the antimeridian, inertial and Earth-fixed views, sampling and performance.
Learning objectives
After this lesson you will be able to:
- Explain how common map projections distort ground tracks and how to handle the antimeridian
- Distinguish an orbit drawn in an inertial frame from the same orbit drawn in an Earth-fixed frame
- Choose sampling, interpolation and rendering strategies for time-dynamic scenes with many objects
Why draw it at all
Operators want to know where a satellite is, which station it will reach next and whether a target is in sunlight. A map or globe answers those questions faster than a table of numbers.
Visualization is also a debugging tool. Errors that are hard to see in numbers are obvious in a picture: a ground track mirrored east to west, a satellite drawn below the surface, a pass that begins over the wrong ocean. A display works like a dashboard in that sense.
An error of 20 km is invisible on a world map and matters a great deal to an antenna, so the parallel has a limit. Visual checks complement numeric tests and do not replace them.
2D maps and projections
A flat map needs a map projection, a rule for flattening the globe. Every projection distorts something, and the choice affects how tracks look.
- Equirectangular. Longitude maps directly to x and latitude to y. It shows the whole Earth, with areas near the poles stretched sideways.
- Web Mercator. This is the projection used by most web map tiles. It stretches high latitudes increasingly and stops at about 85 degrees north and south. Parts of a polar orbit's track fall off the map.
- Polar projections. Centered on a pole, these suit high-latitude ground stations, where the other two are at their worst.
Shapes need care as well. A visibility footprint is a circle on the globe. On a flat map it is a distorted oval, or a band across the full width of the map when it contains a pole. The remedy is to compute enough points on the true shape and project each one.
The antimeridian
Longitude is discontinuous. At the antimeridian, 180 degrees from the prime meridian, values jump between +180 and -180. A track that crosses it produces two consecutive points on opposite edges of the map, and a naive polyline joins them with a line across the whole map.
The fix is to split the polyline where the longitude jumps by more than 180 degrees, and to add a point on each edge so that both pieces reach the border.
type LonLat = [number, number]; // [longitude, latitude] in degrees, longitude in -180..180
function splitAtAntimeridian(track: LonLat[]): LonLat[][] {
const segments: LonLat[][] = [];
let current: LonLat[] = [];
for (const point of track) {
const previous = current[current.length - 1];
if (previous && Math.abs(point[0] - previous[0]) > 180) {
const edge = previous[0] > 0 ? 180 : -180; // the map edge the track leaves by
const unwrapped = point[0] + (edge > 0 ? 360 : -360); // next longitude, continued past the edge
const t = (edge - previous[0]) / (unwrapped - previous[0]);
const lat = previous[1] + t * (point[1] - previous[1]); // linear interpolation
current.push([edge, lat]);
segments.push(current);
current = [[-edge, lat]]; // re-enter on the opposite edge
}
current.push(point);
}
if (current.length > 0) segments.push(current);
return segments;
}
const track: LonLat[] = [[170, 10], [178, 12], [-174, 14], [-166, 16]];
for (const segment of splitAtAntimeridian(track)) console.log(JSON.stringify(segment));
Running it prints:
[[170,10],[178,12],[180,12.5]]
[[-180,12.5],[-174,14],[-166,16]]
The track is cut between 178 and -174 degrees, and each segment ends exactly on a map edge at an interpolated latitude. The function assumes that consecutive samples are less than 180 degrees of longitude apart, which holds for a densely sampled track. The GeoJSON specification recommends cutting geometry at the antimeridian in the same way.
3D globes and the choice of frame
A globe removes projection problems and introduces a different question. Which frame is the scene drawn in?
In an inertial frame, the orbit is a closed ellipse that stays nearly still while the globe turns beneath it. This view suits questions about the orbit itself, such as the orientation of its plane and the spacing of satellites in a constellation.
In an Earth-fixed frame, the camera turns with the Earth. The globe is still, and the same orbit becomes an open path that winds around it, displaced westward on each revolution. It closes only for a repeat ground track. A geostationary satellite is a fixed point. This view suits questions about the ground, such as coverage, station contacts and targets.
Both pictures are correct. The defect to watch for is mixing them. Positions from a propagator are inertial. If they are plotted as Earth-fixed coordinates without the rotation from Module 3, the orbit looks reasonable, but the satellite sits over the wrong part of the Earth. The longitude is off by the Earth's rotation angle at that moment, which can be anything up to a full turn.
Time-dynamic data and sampling
An animated scene needs a position for every object in every frame, typically 60 times a second. Propagating at that rate is wasteful. The usual design samples positions at intervals and interpolates between them when drawing.
The interval and the interpolation method set the error. A satellite at 500 km turns through nearly 4 degrees of its orbit in 60 seconds. Joining 60-second samples with straight lines cuts across that arc and is wrong by almost 4 km at the midpoint. Ten-second samples reduce the error to about 100 meters. Higher-order interpolation that follows the curve does far better with the same data.
Many objects
The public catalog holds tens of thousands of tracked objects, and showing them all is a common requirement. The techniques are those of any large interactive display.
- Propagate off the rendering thread, in a background worker or on a server.
- Update positions at a lower rate than the frame rate and interpolate between updates.
- Draw objects as points in a small number of batched draw operations.
- Draw orbit paths, labels and footprints only for selected objects.
Open tooling
One widely used open-source option is CesiumJS, a JavaScript library for 3D globes and maps that renders in the browser with WebGL. It has a scene clock for animation, can display the scene as a 3D globe or a 2D map, and accepts positions defined in either an Earth-fixed or an inertial frame.
CesiumJS reads a format called CZML. A CZML document is a JSON array of packets, and each packet describes the properties of one object. A position can be supplied as a list of time-tagged samples with a stated reference frame and interpolation settings. A server can therefore convert an ephemeris to CZML and let the client animate it without running a propagator. Other rendering libraries can fill the same role.
A practical example: the track that crossed the whole map
A developer adds a ground track view for a satellite in a sun-synchronous orbit at 550 km. Three problems appear in the first review.
Lines across the map. Each time the track passes 180 degrees longitude, a horizontal line streaks across the display. The developer adds the splitting function above, with a unit test for a crossing in each direction.
Distortion near the poles. The base map is Web Mercator, and the track reaches about 82 degrees, where it is badly stretched. The team adds a polar view for its high-latitude station.
A satellite over the wrong ocean. In the 3D view the satellite marker is thousands of kilometers from the ground track on the 2D map. The 3D code was passing inertial positions from the propagator to the globe as if they were Earth-fixed. Declaring the positions as inertial, so that the library applies the rotation, makes the two views agree.
The team adds one automated check. For a fixed time and a fixed element set, the sub-satellite point shown by each view must match the pass predictor's value within a small tolerance.
The next module turns to the ground stations that communicate with a spacecraft and the networks that connect them to control centers.
Key takeaways
- A visualization makes frame, unit and time errors obvious, but a plausible picture is not proof of correctness. Keep numeric tests alongside it.
- On a 2D map a ground track must be split where it crosses 180 degrees of longitude, and the projection determines how tracks and footprints are distorted near the poles.
- The same orbit is a closed ellipse in an inertial frame and an open, winding path in an Earth-fixed frame. Mixing the two puts the satellite over the wrong part of the Earth.
- Sample positions at intervals and interpolate between them, and with many objects move propagation off the rendering thread and draw only the detail the user needs.
Knowledge check
Check your understanding. These questions are not graded and you can retry as often as you like.
0 of 3 questions answered.
Glossary
Map projection
A rule for flattening the curved surface of the Earth onto a plane. Every projection distorts shape, area, distance or direction somewhere.
Antimeridian
The line of 180 degrees longitude, opposite the prime meridian, where longitude values jump between +180 and -180.
Inertial frame
A reference frame that does not rotate with the Earth. An orbit drawn in it keeps a nearly fixed shape and orientation while the Earth turns underneath.
Earth-fixed frame
A reference frame that rotates with the Earth, so that points on the ground have constant coordinates.
CZML
A JSON-based format for describing time-dynamic scenes, used with the open-source CesiumJS library.
References and further reading
- CesiumJS - an open-source JavaScript library for 3D globes and maps (opens in a new tab)CesiumJS project on GitHub
- CZML Guide (opens in a new tab)czml-writer project on GitHub
- RFC 7946 - The GeoJSON Format (opens in a new tab)Internet Engineering Task Force
Finished this lesson?
Loading your progress…
Lesson version 1.0.0.