What ntn-constellation does
ntn-constellation is an ns-3 module that builds LEO satellite shells from two-line element sets or Walker-Delta and Walker-Star parameters and propagates them during Simulator::Run(). It adds a contact graph over ground and inter-satellite links, with limb clearance and range caps, and computes routes over that time-varying graph from shortest delay to a lifetime-aware search.
Accompanying studyRoute Breaks and Lifetime-Aware Routing in Low Earth Orbit Constellations With Range-Limited +Grid Laser Links. Code and data are in this repository.
What it models
The module gives every layer of a simulation one shared ephemeris. Shells come from TLE files (parsed with checksums) or from Walker configurations with planes, satellites per plane, phasing, altitude and inclination. Each satellite is an ns-3 MobilityModel. By default it propagates analytic Kepler orbits with secular J2 drift on RAAN and argument of perigee; a TLE-sourced satellite can switch to full Vallado SGP4 with the drag term. ECEF, ECI and geodetic accessors and a common simulation epoch let the radio, handover, routing and visualization code read the same positions. An exact argmax-elevation index returns the satellite a brute-force scan would choose without looping over every satellite and terminal.
On top of the geometry, a contact-graph scheduler tracks ground-to-satellite and satellite-to-satellite visibility with limb clearance and range caps and raises link up, down and update events. A router computes paths by BFS, weighted Dijkstra, a caller-supplied edge cost, a lifetime-aware search, or a regenerative-only transit filter; examples install the result as IPv4 host routes on point-to-point links whose delay follows the live range. A per-packet error model maps Es/N0 from the slant range through a DVB-S2 MODCOD waterfall. The module also carries the 3GPP TS 38.300 Section 9.2.3 Xn handover sequence between regenerative satellites over the ISL, and a calibration harness that compares the free-space link budget with the 3GPP TR 38.821 Set-1 and Set-2 reference budgets. Contact-graph routing follows CCSDS concepts, without a bundle protocol.
Measured numbers
Largest error of the Python companion's SGP4 propagation against an independent Skyfield reference
1800 s STARLINK-1008 pass (tests/ of the Python companion)Invalid propagated states in the Python companion against Skyfield
24 h, 66 satellites, 1440 samplesSize of the ntn-constellation test suite
test/ntn-constellation-test-suite.cc, run with ./test.py -s ntn-constellationEach number states the run it comes from; the README of the module lists the command that reproduces it.
Standards it follows
| 3GPP TR 38.821 | Set-1 and Set-2 reference constellations and link budgets used by the calibration harness |
| 3GPP TR 38.811 | Geometry and elevation dependence |
| 3GPP TS 38.300 Section 9.2.3 | Xn handover sequence between two regenerative satellites over the ISL |
| CCSDS contact-graph routing concepts | Basis of the contact-graph routing (no bundle protocol) |
New on 6g-ntn.live
The toolkit now runs in the browser at 6g-ntn.live: pick an example of ntn-constellation or any other module, change its parameters, and the real ns-3 binary runs on the server.
Type ./ns3 run with your own arguments; the real binary runs on the server and streams its output.
Open →115 runnable examplesEvery example of the 14 modules, each with a typed parameter form and its measured KPIs.
Open →Live 3D globeReal constellations from CelesTrak elements, propagated with SGP4, with their service and feeder links.
Open →Open datasetsEvery finished run becomes a dataset under CC BY 4.0, with its provenance and configuration.
Open →Validation690 test cases in 41 toolkit suites, and a health check on every example.
Open →Shared scenariosResearchers post a configuration with its parameters and results; anyone can rerun it.
Open →Watch
Watch on YouTube: the NTN Control Center running and visualizing the toolkit examples, in five minutes.
Install
Every module ships in the ready-built container image of the toolkit (version 3.0.1):
docker pull uzairdocker69/ns3-ntn-toolkit:latest
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest bash
To build from source, clone ns3-ntn-toolkit, which vendors this module under contrib/, or follow the README of this repository (branch ntn-constellation-v4).
Cite
If you use ntn-constellation, please cite the toolkit article (doi:10.1109/OJCOMS.2026.3745010):
@article{uzair2026ns3ntntoolkit,
author = {Uzair, Muhammad and Aldahlan, Bassma G. and Albar, Ali A. and
Althumali, Huda and Alghammas, Adnan},
title = {ns3-ntn-toolkit: An Integrated ns-3 Platform for 6G
Non-Terrestrial Networks},
journal = {IEEE Open Journal of the Communications Society},
volume = {7},
pages = {13440--13467},
year = {2026},
doi = {10.1109/OJCOMS.2026.3745010}
}