title: ntn-sagin - Space-Air-Ground integrated network simulation for ns-3 | ns3-ntn-toolkit description: Simulate SAGIN in ns-3: LEO satellites, HAPS, UAV swarms, aircraft and ground terminals over a 3GPP TR 36.777 air-to-ground channel and a real NR-NTN cell.
W5 - ntn-sagin¶
ntn-sagin is the ns3-ntn-toolkit module that turns satellite-only ns-3 simulations into full Space-Air-Ground Integrated Networks (SAGIN), stitching a LEO/MEO/GEO space layer, an air layer of HAPS, UAV swarms and aircraft, and a ground layer of maritime, high-speed-train and ADS-B terminals into a single session carried over a real mmwave NR-NTN cell.
Why it matters. Most ns-3 non-terrestrial work stops at "satellite plus ground", but a realistic 6G access network spans three layers and a single flow routinely traverses two or three of them. ntn-sagin gives NTN researchers a physically grounded SAGIN testbed with standardized air-to-ground propagation and measured radio KPIs, so they can study multi-layer routing, HAPS backhaul and UAV relaying without leaving the ns-3 discrete-event kernel.
What it simulates¶
- Space layer. LEO/MEO/GEO passes driven by SGP4 orbital mechanics with Walker constellation geometry and elevation-aware contact gating.
- Air layer. HAPS station-keeping as a figure-8 lemniscate (
HapsMobilityModel) or waypoint trajectory playback (HapsTrajectoryMobilityModel); UAV swarms in random-waypoint, patrol and lawnmower-search patterns (UavWaypointMobilityModel,UavPatrolMobilityModel,UavSearchPatternMobilityModel); commercial aircraft cruise (AeronauticalMobilityModel). - Ground layer. Maritime vessels via AIS trace replay (
AisMobilityModel), ADS-B aircraft via OpenSky traces (OpenSkyMobilityModel), and high-speed trains along a track (HstMobilityModel). - Air-to-ground channel. 3GPP TR 36.777 v15.0.0 path loss and LOS probability, exposed both as a calculator (
A2gChannelTr36777) and as a real ns-3 propagation loss model (SaginA2gPropagationLossModel). - Multi-layer routing. Greedy max-elevation Ground to UAV to HAPS to LEO routing (
MultiLayerRouter) and 5G QFI to S-NSSAI slice-aware routing (SaginSliceRouter). - Measured radio and data-plane KPIs. A real mmwave NR-NTN PHY/MAC/HARQ/RLC/PDCP/RRC/EPC stack via
NtnRealStackHelper, with in-band per-flow one-way delay, jitter, loss and goodput measured byNtnOranApplication,NtnOranPayloadHeaderandNtnOranSink.
Gallery¶
Standards & references¶
- 3GPP TR 36.777 v15.0.0 - air-to-ground channel model (path loss and LOS probability for UMa-AV, RMa-AV and UMi-AV reference scenarios).
- 3GPP TR 38.901 - channel modeling reference used for the high-speed-train track geometry.
- 3GPP 5QI / S-NSSAI - 5G QoS and slice identifiers consumed by the slice-aware router.
- SGP4 - satellite propagation standard for LEO/MEO/GEO orbital passes.
Use cases¶
- Aeronautical broadband. Passenger connectivity over oceanic and polar routes where aircraft hand off across LEO beams.
- HAPS backhaul. Stratospheric platforms relaying rural-cell traffic up to a LEO space layer.
- UAV swarm relay. Search-and-rescue or patrol drones extending coverage along a UAV to HAPS to LEO path.
- Maritime and ADS-B coverage. Ship-to-satellite and aircraft surveillance links replayed from real AIS and OpenSky traces.
- Slice-aware multi-layer routing. Evaluating QFI-driven layer selection so latency-sensitive flows skip high-altitude legs.