6G NTN
ns3-ntn-toolkit module

ntn-v2x

ntn-v2x: satellite-assisted V2X with NR sidelink in ns-3

ns-3 module for satellite-assisted V2X: NR PC5 sidelink Mode 2, SAE J2735 basic safety messages and relay decisions that gate real packets to LEO.

Fig. 1 of the accompanying study: the system model. Click to zoom.
Fig. 1 of the accompanying study: the system model. Click to zoom.

What ntn-v2x does

ntn-v2x is an ns-3 module for satellite-assisted vehicle-to-everything communication that combines an NR PC5 sidelink Mode 2 model, SAE J2735 basic safety messages encoded as ns-3 headers, and direct-or-relay decisions that start and stop real uplink flows to LEO satellites. Vehicle motion comes from replayed floating-car data, and the satellite leg uses SGP4 orbits over an NR NTN cell or a point-to-point path.

Accompanying studyWhich Neighbor Should Forward? Sidelink Relaying of Vehicle Status to Direct-to-Cell Satellites in Urban Street Canyons. Code and data are in this repository.

What it models

The sidelink follows NR PC5 Mode 2 as described in 3GPP TS 38.321 Section 5.22, with an SL-ResourcePool of subchannels and slots (TS 38.331). NtnSlUeMac performs sensing-based autonomous selection: candidates in the T1 to T2 window, exclusion above an SL-RSRP threshold, the 20 percent rule with 3 dB steps, and periodic reservation with a reselection counter. NtnSlChannel applies the TR 37.885 highway LOS path loss with log-normal shadowing and NLOSv blockage, enforces half duplex, decodes on SINR with co-channel interference summed in linear power, and reports PRR by distance following TS 38.885. It is a MAC abstraction and does not decode PSCCH or PSSCH bits or combine HARQ.

Basic safety messages are SAE J2735 (2016) BSMcoreData, 21 octets on the wire with UPER offset-from-lower-bound integers and the standard's range clamps. SumoTraciBridge replays floating-car data offline and applies both position and velocity, so BSM speed and heading fields are real; live TraCI co-simulation is not implemented. V2xLeoRelay assigns each vehicle direct or relay service from a minimum direct SNR and a maximum V2V range, and a runtime transmit gate lets those decisions start and stop flows mid-run. The satellite leg uses SGP4 orbits over an NR NTN cell or a point-to-point path whose delay follows slant range, with TR 38.811 and TR 38.821 for its geometry and budget. V2xLeoDirect, a closed-form TR 38.821 Set-1 S-band budget, is kept as a reference. TS 23.287 is cited for the V2X architecture.

Measured numbers

0.53 s and 0.58 s

Age of information at the server when a blocked vehicle forwards through the nearest neighbor that announced an uplink, urban and dense canyon

ntn-v2x-canyon-relay study: 638 Starlink direct-to-cell satellites via SGP4 (element sets of 2 October 2026), straight Manhattan street with per-run facade heights, LOS by ray geometry every 100 ms, SUMO stop-and-go traffic on a 1.2 km ring, one report per vehicle per second, assumed 300 kb/s shared uplink per satellite; median over 20 starts
4.08 s and 8.42 s

Age of information using the serving satellite only, urban and dense canyon

Same canyon study; median over 20 starts
1.19 s and 3.63 s

Age of information using any satellite in line of sight, urban and dense canyon

Same canyon study; median over 20 starts
23 % and 20 %

Median model error on the age above its floor over eight baseline forwarding rules, urban and dense canyon

Same canyon study, analytical model against ns-3
1.000 and 0.997

Measured sidelink PRR within 50 m at 10 vehicles, and at 30 and 60 vehicles

Shipped highway scenario at 23 dBm and 5.9 GHz with the TR 37.885 highway model; residual loss from half duplex and same-subchannel collisions
14 792 packets on air, 0 gated

Traffic from terminals allowed on air against traffic from gated terminals under the relay transmit gate

Default run, re-measured on 2026-09-01 at 2.185 GHz and 20 MHz

Each number states the run it comes from; the README of the module lists the command that reproduces it.

Standards it follows

3GPP TS 38.321Section 5.22 sidelink Mode 2 resource selection
3GPP TS 38.331SL-ResourcePool configuration
3GPP TS 38.885V2X evaluation methodology and PRR (designation as written in the module docs)
3GPP TR 37.885Highway and urban sidelink channels, PRR evaluation
3GPP TS 23.287V2X architecture
SAE J2735Basic safety message core data and UPER encoding
3GPP TR 38.811Satellite leg
3GPP TR 38.821Satellite leg; Set-1 S-band defaults of V2xLeoDirect

New on 6g-ntn.live

The toolkit now runs in the browser at 6g-ntn.live: pick an example of ntn-v2x or any other module, change its parameters, and the real ns-3 binary runs on the server.

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-v2x-v4).

Cite

If you use ntn-v2x, 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}
}

Links