Skip to content
Module · ntn-constellation

LEO constellation, contact graph and ISL routing in ns-3

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.

Run it in the browser

Choose an example, set its parameters and run the real ns-3 binary on this server. The scene shows the configured geometry before the run and the results after it.

Two-satellite ISL route

UDP 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.

~60 sntn-constellation-isl-routed-traffic
Parameters
Simulation duration (s)
Satellite altitude (km)
Ignored, kept for CLI compatibility: the orbital speed follows from altKm (the measured value is printed and written to sim_health.csv)
Min GSL elevation for contact (deg)
Max ISL range for contact (km)
exact: per-packet light-time delay on the exact SGP4 state; fixed: delay refreshed every 1 s (pre-Wave-7B)
satlink: GSL hops carry the contact gate and a TR 38.821 Set-1 Ka C/N0 -> DVB-S2 8PSK 3/4 BLER model (P.676 gas, P.618 scintillation and rain); gate: gate only (pre-Wave-7B)
satlink: ITU-R P.618 point rain rate R0.01 (mm/h), 0 = clear sky
Scene: Walker constellation
The interactive 3D globe loads here.

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

SpecificationWhat the module takes from it
3GPP TR 38.821Set-1 and Set-2 reference constellations and link budgets used by the calibration harness
3GPP TR 38.811Geometry and elevation dependence
3GPP TS 38.300 Section 9.2.3Xn handover sequence between two regenerative satellites over the ISL
CCSDS contact-graph routing conceptsBasis 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 us1800 s STARLINK-1008 pass (tests/ of the Python companion)
Invalid propagated states in the Python companion against Skyfield
0 NaN24 h, 66 satellites, 1440 samples
Size of the ntn-constellation test suite
36 test casestest/ntn-constellation-test-suite.cc, run with ./test.py -s ntn-constellation

Examples (5)

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-traffic with its built-in defaults.

    shell
    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.

BibTeX
@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}
}