What this module 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.
Outputs
- sim_health.csv in --outputDir for each example that has one, plus a measured summary on stdout
- SINR, TBLER and throughput from the NR PHY trace in the walker and SGP4 traffic examples
- Delay, jitter and loss measured at NtnOranSink from the in-band header in the ISL-routed example
- Python companion exports for the SNS3 scenario layout and CesiumJS CZML
Standards
| Specification | What the module takes from it |
|---|---|
| 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) |
Key numbers
Stated in the module documentation, each with the conditions it was measured under.
- Largest error of the Python companion's SGP4 propagation against an independent Skyfield reference
- 23.5 us
- Invalid propagated states in the Python companion against Skyfield
- 0 NaN
- Size of the ntn-constellation test suite
- 36 test cases
Examples (5)
- Two-satellite ISL routeUDP packets forwarded from one ground station through two satellites and an ISL to another; hops drop when out of contact. Measures delivery, delay, jitter and loss.
- Contact-graph routing with link errorsA contact-graph router installs routes as satellites rise and set, so traffic reroutes between them; GSL losses follow a C/N0 to BLER model. Also reports TR 38.821 residuals.
- Route recomputation policiesGround-to-ground routing over a Walker shell with +Grid ISLs on a real IPv4 plane. Compare snapshot, on-demand, merged-snapshot and lifetime-aware policies on loss and delay.
- Single satellite from a TLEOne LEO satellite propagated from a TLE with full SGP4 serves ground UEs over a measured NR cell (Set-1, gateway feeder). The default 20 s window sits near zenith; a longer simSeconds shows the outage once the satellite is below the horizon. Reports SINR, TBLER and throughput.
- Walker shell with UDP trafficA Walker-Delta shell supplies GSL and ISL contact context while one serving satellite carries a measured NR cell (Set-1, gateway feeder) to ground UEs. The contact graph is context only: its ground stations are not tied to the UE site.
Run it
In the browser
Pick an example in the run panel above, set its parameters and press Run. The console streams live and the result opens with KPI charts.
In the ns-3 console
The browser console accepts ns-3 style commands, for example
ns3 run "ntn-constellation-isl-routed-traffic --PrintHelp".Locally with Docker
The public image has the whole toolkit prebuilt. This runs
ntn-constellation-isl-routed-trafficwith its built-in defaults.docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "ntn-constellation-isl-routed-traffic"
Cite this
If you use this module, please cite the article that describes the toolkit: doi:10.1109/OJCOMS.2026.3745010.
M. Uzair, B. G. Aldahlan, A. A. Albar, H. Althumali and A. Alghammas, "ns3-ntn-toolkit: An integrated ns-3 platform for 6G non-terrestrial networks," IEEE Open Journal of the Communications Society, vol. 7, pp. 13440-13467, 2026, 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}
}