Skip to content
Example · Vehicular (V2X)

Street-canyon relaying over sidelink

Vehicles in an urban street canyon report status through LEO satellites; blocked vehicles relay over NR sidelink Mode 2 to a neighbor with line of sight. Compare policies.

ntn-v2x-canyon-relay about 30 s on the server

Parameters (41)

Defaults are the values the browser run form starts from. Pass any of them on the command line as --name=value.

ParameterDefaultUnitDescription
TLE file of the satellites
--tle
contrib/ntn-v2x/data/starlink_dtc_20261002.tle-TLE file of the satellites
Output CSV file
--out
canyon_relay.csv-Output CSV file
Wave 7A
--nrCheckS
20-Wave 7A: seconds of vehicle 0 on a packet-level NR-NTN cell with the facades on the radio path, after the study run (0 = off)
Directory of the NR check
--nrOutputDir
(empty)-Directory of the NR check (default: <out stem>_nr_check)
Number of vehicles on the street
--nVeh
60-Number of vehicles on the street
Simulated time
--simSeconds
300sSimulated time (s)
Uplink policy
--policy
relay-Uplink policy: direct, multisat, relay, blind, blindfar, blindlb or random
Street width, wall to wall
--width
20mStreet width, wall to wall (m)
Simulated street length, wrapping
--length
1200mSimulated street length, wrapping (m)
Building length along the street
--bldLen
30mBuilding length along the street (m)
Median facade height
--h50
18mMedian facade height (m)
Log standard deviation of facade heights
--hSigma
0.5-Log standard deviation of facade heights
Minimum satellite elevation
--mask
20degMinimum satellite elevation (deg)
Largest sidelink distance for a relay
--maxRelayM
300mLargest sidelink distance for a relay (m)
Optional CSV of facade heights and per-tick link states of...
--traceOut
(empty)-Optional CSV of facade heights and per-tick link states of vehicles 0 to 7
Unused, kept for script compatibility
--discMs
1000msUnused, kept for script compatibility (ms)
Uplink interruption at each change of uplink satellite
--hoMs
0msUplink interruption at each change of uplink satellite (ms)
Status message period, equal to the sidelink reservation period
--periodMs
100msStatus message period, equal to the sidelink reservation period (ms)
Capacity of a satellite's uplink left for this street
--ulKbps
0-capacity of a satellite's uplink left for this street (kb/s); 0 = no limit
Round trips from scheduling request to grant
--grantRtt
0-round trips from scheduling request to grant
Largest wait for an uplink opportunity
--ulMaxQueueS
1slargest wait for an uplink opportunity (s)
Latency of a link to a relay the source did not name last
--relaySetupMs
0mslatency of a link to a relay the source did not name last (ms)
Neighbor entries age out after this time
--nbAgeS
1sneighbor entries age out after this time (s)
Expected number of forwards
--kappa
1-anyp: expected number of forwards
Neighbors named per message
--relayK
1-relayk, relayrand, randk: neighbors named per message
Own uplink messages before forwards
--ulPrio
false-own uplink messages before forwards
Allowed: true, false
Constant speed range, low
--vMin
6m/sconstant speed range, low (m/s)
Constant speed range, high
--vMax
14m/sconstant speed range, high (m/s)
Mob Trace
--mobTrace
(empty)-CSV: first line dt, then one line per vehicle: x0,dir,s(0),s(dt),...
Facade File
--facadeFile
(empty)-CSV: side (0 left, 1 right),x0,x1,height
A cross street every this many meters
--gapEveryM
0-a cross street every this many meters (0 = none)
Width of a cross street
--gapLenM
0mwidth of a cross street (m)
Share of vehicle pairs given the NLOS law
--slNlosP
0-stress: share of vehicle pairs given the NLOS law
TR 37.885 urban sidelink channel
--slUrban
false-TR 37.885 urban sidelink channel
Allowed: true, false
Message arrivals on a fixed period with a random phase
--alignResel
false-message arrivals on a fixed period with a random phase
Allowed: true, false
Street latitude
--lat
40.75degStreet latitude (deg)
Street longitude
--lon
-73.99degStreet longitude (deg)
Street azimuth from north
--streetAzDeg
29degStreet azimuth from north (deg)
Gateway latitude
--gwLat
40degGateway latitude (deg)
Gateway longitude
--gwLon
-75degGateway longitude (deg)
Simulation start time
--epochUnix
1792800000-Simulation start time (Unix s)

Reproduce it locally

With the example's built-in defaults, in the public Docker image:

shell
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "ntn-v2x-canyon-relay"

With the same parameters the browser run form starts from:

shell
docker run --rm -it uzairdocker69/ns3-ntn-toolkit:latest ./ns3 run "ntn-v2x-canyon-relay --tle=contrib/ntn-v2x/data/starlink_dtc_20261002.tle --out=canyon_relay.csv --nrCheckS=20 --nVeh=60 --simSeconds=300 --policy=relay --width=20 --length=1200 --bldLen=30 --h50=18 --hSigma=0.5 --mask=20 --maxRelayM=300 --discMs=1000 --hoMs=0 --periodMs=100 --ulKbps=0 --grantRtt=0 --ulMaxQueueS=1 --relaySetupMs=0 --nbAgeS=1 --kappa=1 --relayK=1 --ulPrio=false --vMin=6 --vMax=14 --gapEveryM=0 --gapLenM=0 --slNlosP=0 --slUrban=false --alignResel=false --lat=40.75 --lon=-73.99 --streetAzDeg=29 --gwLat=40 --gwLon=-75 --epochUnix=1792800000"

List every argument with ./ns3 run "ntn-v2x-canyon-relay --PrintHelp".

More Vehicular (V2X) examples

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