Hi everyone,
Following the discussion about the Sandcastle gallery (thanks @darcyvdd for the suggestion), here is the project as a showcase.
cesium-sgp4-viewer is an open-source (Apache-2.0) library that shows a whole satellite catalog on a CesiumJS globe from a list of TLEs: every object at its SGP4 position, its orbit and its name, following the scene’s clock.
The use case
Plotting satellites from TLEs is a common need. The straightforward way in Cesium, one Entity with a SampledPositionProperty and a path per satellite, works well for a few hundred objects, but a public catalog like CelesTrak’s active list has tens of thousands. I wanted the full catalog to stay smooth, with any clock behaviour: live, paused, accelerated, reversed or scrubbed.
How it uses Cesium
- Points: a single
PointPrimitiveCollectionfor the whole catalog, updated in place: one draw call. - Orbits: one custom primitive with its own vertex and fragment shaders. Rings are uploaded to the GPU as they come out of the workers and rotated under the Earth with one matrix per frame. In 2D, the same buffers are drawn as ground tracks computed in the vertex shader.
- Clock: everything follows
viewer.clock, so the standard timeline and animation widgets just work. - Inertial camera (optional): the camera stays fixed in ICRF, using Cesium’s Earth orientation data, so the Earth turns under the orbits.
- Picking and labels: click selection with the orbit highlighted, names on hover or for every visible satellite.
Outside Cesium, SGP4 (via satellite.js) runs in a small pool of web workers. The main thread only interpolates (degree-5 Lagrange, error bounded at 50 m in the tests), and filtering by regime (LEO/MEO/GEO/HEO), name or NORAD ID never triggers a new propagation.
What I learned
Moving from entities to primitives was the key to scaling. The honest trade-off: the orbit primitive relies on renderer classes that are exported but not documented (DrawCommand, VertexArray, ShaderProgram, …). If a future release changes them, the library turns orbits off with a console warning, and points, labels and picking keep working since they only use the public API. Feedback on a better approach is very welcome.
Try it
- Live demo: cesium-sgp4-viewer examples (vanilla TypeScript and React versions)
- Sandcastle: open the demo
- GitHub: GitHub - dsanchez31/cesium-sgp4-viewer: Show a whole satellite catalog on a CesiumJS globe, from a list of TLEs: every object at its SGP4 position, its orbit, its name, following the scene's clock. · GitHub
- npm:
npm install @dsanchez31/cesium-sgp4-viewer cesium
TLE data from CelesTrak, maintained by Dr. T.S. Kelso.
Questions, ideas and bug reports are welcome, here or on GitHub!
David Sanchez

