tsim is a high-performance, modular simulation suite built in C++20 to bridge the gap between military protocol interoperability, sensor kinematics, physical-layer RF signal environments, and orbital mechanics. Rather than relying on monolithic, opaque simulation frameworks, tsim is structured as a decoupled ecosystem of high-throughput libraries and companion services designed for composition.

Foundational Graphics & Compute Engine: tsim’s entire visualization and real-time GPU compute layer is built directly on WGFX: Modern WebGPU & C++20 Graphics Engine. WGFX manages the underlying Google Dawn device contexts, compute shader dispatches, reactive frame scheduling, and Dear ImGui / ImPlot harnesses across iqgen, waterfall, satviz, and antenna.

tsim Tactical Situational Awareness (tview): 3D Earth rendering with global orbital satellite swarms, DIS 7 entity network streams, multi-sensor kinematic coverage footprints, and live GRIB2 atmospheric weather layers running at 144 FPS


Multi-Domain System Architecture

graph TD
    subgraph TruthLayer ["Ground Truth & Physical World"]
        TRUTH["Simulation Truth
Entities, Waypoints & Kinematic Movers"] end subgraph SimulationServices ["Distributed Simulation & Propagation Services"] TRK["backend + tracktor
Kinematic Radar, AESA,
EO/IR & Passive RF Sensors"] SAT["satviz
SGP4/SDP4 Orbital Mechanics
& Constellation Shells"] end subgraph SignalAndFusion ["Signal Synthesis & Fusion Engines"] FUSE["trackfuse
Passive Bearing Triangulation
& Multi-Sensor Fusion"] IQ["iqgen + antenna
Real-Time WebGPU RF Signals
& Phased Array Multi-Beams"] GRAY["grayscale
Radiometric EO/IR Image Sensors
& Synthetic Video"] end subgraph VisualizationLayer ["Operator Displays & Analysis"] TVIEW["tview
Tactical 2D/3D Map
& Common Operating Picture"] WF["waterfall
Real-Time PSD, Spectrogram
& SigMF Binary Recording"] end subgraph EngineBase ["Foundational GPU Architecture"] WGFX["WGFX Core Engine
WebGPU (Dawn) / C++20 / Compute Pipelines / ImPlot
[See /projects/wgfx/]"] end TRUTH --> TRK TRUTH --> SAT TRK -->|"TTR1 Multicast (239.255.0.2:5000)"| FUSE TRK -->|"Truth Locations & Bearings"| IQ SAT -->|"Line-of-Sight & Slant Range"| GRAY SAT -.->|"Doppler & Link Geometry"| IQ FUSE -->|"Fused 9D ECEF Tracks"| TVIEW IQ -->|"VITA-49.0 UDP Stream"| WF WGFX ==> TVIEW WGFX ==> WF WGFX ==> GRAY WGFX ==> IQ

1. iqgen + waterfall + antenna: Real-Time RF Signals, Spectrum Analysis & Phased Arrays

Real-Time RF Signal Generator (iqgen)

iqgen is a high-throughput physical-layer RF signal and emitter simulator built in C++20 on top of the WGFX compute architecture (WebGPU via Google Dawn), with optional CUDA and ROCm acceleration paths:

  • Spatial RF Geometry: Transmitters and receivers possess synchronized double-precision WGS-84 and Earth-Centered Earth-Fixed (ECEF) coordinates. iqgen computes exact 3D slant ranges for free-space path loss and true-north bearings for antenna radiation patterns.
  • Extensive Waveform Library:
    • OFDM: Multi-carrier modulation with presets for Wi-Fi, LTE, 5G-NR, and DVB. Features configurable pilot subcarriers, cyclic prefixes, guard carriers, raised-cosine symbol windowing, DC nulling, payload scrambling, and a GPU IFFT table path.
    • Link 16-like FHSS: Fast frequency-hopping spread spectrum across a 255 MHz bandwidth with 128 time slots/second, constant-envelope MSK/CPFSK chip modulation, and pseudo-random hop sequences.
    • Surveillance Radar (ASR-9 / ASR-11): S-band pulsed radar waveforms with 12.5 RPM rotating antenna scan modulation, horizontal beamwidth shaping, dynamic target azimuth modeling, and sidelobe floor emulation.
    • Digital M-ary PSK & QAM: Gray-coded constellations (QPSK, 16-QAM, 64-QAM) with GPU polyphase Root-Raised Cosine (RRC) pulse-shaping filters and PRBS or binary payloads.
    • Analog & Noise: Bandlimited Gaussian white noise (Box-Muller transform in WGSL), continuous wave (CW) carriers, and AM/FM with real-time mic or audio file streaming via miniaudio.
  • Physical RF Impairments & PA Compression: Evaluates carrier frequency offsets (CFO), DC I/Q offsets, I/Q gain and phase skew, phase noise, additive spurs, and non-linear power amplifier (PA) soft-limiting and hard-clipping.
  • VITA-49.0 (VRT) UDP Streaming: Streams standardized VITA-49 IF data packets and context frames (sample rate, center frequency, timestamp) over UDP with support for Float32, Int16 (default), and 3-byte packed Int12 formats.

Phased Array Simulation & Beamforming (antenna)

Complementing iqgen is the antenna simulation module, a GPU-accelerated phased array antenna modeling tool built on WGFX:

  • Coherent Multi-Beam Summation: Simulates simultaneous steerable beams evaluating constructive and destructive electromagnetic wave interference (spatial fringes) across observation vectors in direction cosine (u, v) space.
  • Aperture Partitioning & Subarrays:
    • Overlapped: All elements participate in every beam with split element transmit power.
    • Subarray Strips: Aperture is partitioned horizontally or vertically, widening beamwidth but concentrating power.
    • Interleaved (Every N-th Element): Maintains full aperture sharpness while accurately introducing grating lobes.
  • Array Geometries & Tapering:
    • Grids: Uniform Rectangular Arrays (URA), concentric hexagonal rings, linear arrays, and sparse planar layouts.
    • Analytical Radiators: Parabolic dish, horn, dipole, helical, patch, and corner reflector models.
    • Tapering Windows: Hamming and Taylor amplitude weighting to minimize sidelobes.
    • Scan Loss & Element Patterns: Realistic cosine rolloff (cos¹·⁵(θ)) with stochastic phase error perturbation.
  • Dynamic Gain Coupling to iqgen: Antenna radiation patterns exported from antenna feed directly into iqgen’s spatial link-budget pipeline, applying realistic directional gain based on real-time transmitter and receiver orientation.

Antenna Pattern Simulation (Uniform Rectangular Array): 42×40 element grid with Hamming amplitude tapering (0.747), dual steerable active beams, grating lobe analysis, and WebGPU compute shader evaluation

Antenna Pattern Simulation (Concentric Hexagonal Ring Array): 42-ring phased array with vertical strip aperture partitioning and full coherent electromagnetic wave summation in direction cosine space

Spectrum Visualizer & SigMF Recorder (waterfall)

waterfall is a dedicated frontend receiving the VITA-49 stream, leveraging WGFX for GPU-accelerated visualization:

  • Power Spectral Density (PSD): Real-time spectrum line plot with adjustable exponential moving average (EMA) smoothing, calibrated in dBm via ImPlot.
  • Waterfall Spectrogram Heatmap: High-frame-rate time-history rendering powered by WebGPU compute shaders, featuring automatic dynamic range autoscaling and manual dBm floors.
  • SigMF Recording: Records live RF captures directly to disk following the open SigMF standard, producing paired .sigmf-data binary I/Q streams and .sigmf-meta JSON metadata.

waterfall Spectrum & Spectrogram Analysis: 24 MHz instantaneous bandwidth (2412 MHz center) displaying instant/average PSD curves, FFT bin resolution of 7.324 kHz at 142.1 FPS, Turbo-colored waterfall heatmap, concurrent multi-waveform synthesis (FM, OFDM, QAM, pulsed radar, white noise), and live SigMF binary recording


2. backend + tracktor + trackfuse + tview: Kinematic Tracking & Multi-Sensor Fusion

graph LR
    subgraph S1 ["Sensor Modeling"]
        tracktor["tracktor
Kinematic Sensors
AESA / Surveillance Radar / IR / RF"] end subgraph S2 ["Correlation & Fusion"] trackfuse["trackfuse
Passive Bearing Triangulation
& Angular Kalman Filter"] end subgraph S3 ["Tactical Map"] tview["tview
2D/3D Situational Awareness Map
(144 FPS / WGFX)"] end tracktor ==>|"TTR1 Multicast (239.255.0.2:5000)
Raw Reports (Cartesian + LOBs)"| trackfuse tracktor -->|"Direct Diagnostic Display"| tview trackfuse ==>|"Fused 9D ECEF Tracks
(Position, Velocity, Accel)"| tview

Simulation Backend (src/satviz/backend)

The backend orchestrates the scenario’s physical ground truth:

  • High-Resolution Scenario Clock: Deterministic fixed-step ticking maintaining millisecond time synchronization across distributed network processes.
  • Mover Pipelines: Realistic waypoint and kinematic path models for commercial and military aircraft, surface naval vessels, and ground vehicles.
  • DIS 7 State Dispatch: Translates internal truth states into IEEE 1278.1 Entity State PDUs, managing spatial coordinate transformations between WGS-84, ECEF, and local tangent frames (NED/ENU).

Kinematic Sensor Modeling (tracktor)

tracktor models active and passive sensors, generating realistic measurement vectors corrupted by physics-based noise:

  • Sensor Modalities:
    • AESA & Surveillance Radars: Models Active Electronically Scanned Arrays with agile beamforming, SNR-dependent detection probabilities, scan volume limits, Doppler range-rate, and rotating antenna mechanical timing.
    • EO/IR Cameras: Optical cameras with contrast-based target detection and pixel centroid extraction.
    • Passive RF Direction Finders: Intercepts emitter signals to produce high-accuracy angle-of-arrival (AoA) lines of bearing.
  • 9D ECEF Kalman State Tracking: Range-capable sensors produce 9D kinematic state estimates in Earth-Centered, Earth-Fixed coordinates: x = [x, y, z, ẋ, ẏ, ż, ẍ, ÿ, z̈]ᵀ (position, velocity, and acceleration vectors) along with fully populated 9×9 error covariance matrices.
  • TTR1 Multicast Protocol: Publishes standardized version-2 binary reports over the loopback multicast group (239.255.0.2:5000).

tracktor Multi-Radar Sensor Network in tview: Real-time rotating surveillance radar and AESA coverage rings across Europe, target truth kinematics, and 9D ECEF Kalman filter covariance uncertainty ellipsoids evaluated at 20 Hz / 144 FPS

Multi-Sensor Data Fusion (trackfuse)

trackfuse is a standalone daemon that listens to the TTR1 report feed and resolves multi-sensor track association without “truth cheating”:

  • Passive Line-of-Bearing Triangulation: Intersects contemporaneous bearing reports from disparate infrared cameras and passive RF sensors. It requires non-parallel line geometry and coherent support from at least two passive-RF or three IR sensors to eliminate false ghosts.
  • Parallel Candidate Solving (Taskflow): Utilizes a Taskflow worker pool to unpack UDP packets, maintain prediction caches, and solve sparse candidate assignments in parallel using greedy cost ordering or bipartite minimum-cost matching.
  • Covariance-Weighted Angular Kalman Filter: Once triangulated, subsequent lines of bearing apply angular innovation updates directly to the 9D ECEF covariance filter, establishing target velocity and acceleration over successive observation epochs.
  • Loop-Free Re-broadcasting: Publishes fused Cartesian tracks back to TTR1 with unique track identifiers and loop-prevention guards.

Passive RF Bearing Triangulation: Intersecting contemporaneous Line-of-Bearing (LOB) vectors in magenta from three distributed ground sensors to solve emitter coordinates without active radar emissions

Multi-Sensor Optical & IR Tracking: Scanning infrared camera network across the Hawaiian archipelago tracking commercial air traffic with field-of-regard limits and kinematic velocity vectors

Large-Scale Multi-Sensor Fusion: Dense ADS-B and passive RF track correlation over the Texas and Gulf Coast corridor, fusing distributed receiver feeds into unified kinematic tracks

Tactical Situational Display (tview)

Built on WGFX using Dear ImGui and reactive rendering primitives, tview provides real-time situational awareness:

  • Visualizes raw radar contacts, sensor field-of-regard coverage cones, active lines of bearing, kinematic uncertainty ellipses, and fused track histories on a responsive 2D/3D map.
  • Real-time interaction with the tracktor and trackfuse daemons over HTTP REST APIs, allowing runtime parameter tuning, sensor injection, and scenario recording.

3. satviz + grayscale: Orbital Mechanics & Radiometric Imaging

Orbital Propagation & Constellation Visualization (satviz)

satviz simulates orbital space assets and evaluates cross-domain interactions with air and ground systems, rendering via WGFX:

  • SGP4/SDP4 Ephemeris Propagation: Propagates satellite orbits in real time from Two-Line Element (TLE) catalogs, modeling atmospheric drag, Earth oblateness (J₂, J₃, J₄ zonal harmonics), and solar/lunar gravitational perturbations.
  • Ground Track & Geometry Pipeline: Computes subsatellite ground tracks, orbital apogee/perigee, true anomaly, line-of-sight visibility cones, and ground-station elevation masks.
  • Cross-Subsystem RF Link Geometry: Feeds satellite-to-ground slant ranges, look angles, and relativistic Doppler frequency shifts directly into iqgen for communication link modeling.
  • Constellation Mesh & Inter-Satellite Links (ISL): Models dynamic optical and RF inter-satellite links across dense LEO constellations, solving real-time end-to-end routing paths and communication latency between mobile ground, airborne, and space nodes.

Grayscale Constellation Mesh & SATCOM Routing: Thousands of LEO satellites interconnected via optical Inter-Satellite Links (ISL), computing transatlantic packet routes (green line) between aircraft sender ae6808 and receiver RYR3WU, with live ImPlot latency (ms) and hop-count telemetry

Synthetic EO/IR Sensor Imaging (grayscale)

The grayscale subsystem provides synthetic sensor video generation:

  • Radiometric Sensor Pipeline: Simulates electro-optical and infrared (EO/IR) detectors across Mid-Wave (MWIR) and Long-Wave (LWIR) infrared spectral bands.
  • Thermal Signature Rendering: Computes target thermal contrast against ambient terrestrial and cloud backgrounds in calibrated monochrome grayscale.
  • Frustum & Occlusion Culling: Fast spatial bounding-sphere culling determining target visibility within narrow optical sensor fields of view.

Real-Time GRIB2 Environmental & Weather Pipeline

tsim integrates high-resolution NOAA GRIB2 atmospheric forecast datasets into the 3D globe rendering engine, modulating optical sensor attenuation, RF atmospheric absorption, and cloud occlusion:

Global Cloud Cover Layer: Ingesting GRIB2 total cloud cover forecasts mapped onto the 3D terrestrial globe surrounded by the orbital satellite shell

Atmospheric Wind Velocity Fields: Dynamic global wind speed and directional flow streamlines resolving Pacific cyclonic storm vortices and typhoon eyes

Surface Temperature Heatmap: Global isobaric and terrestrial temperature gradient mapping integrated into electro-optical and infrared sensor contrast calculations


4. disrupt: Modern IEEE 1278.1 / DIS 7 Protocol Engine

At the core of tsim’s network interoperability is disrupt, a modern C++20 implementation of the IEEE 1278.1-2012 (DIS 7) standard:

  • Entity-Component Architecture: Built around EnTT for high cache locality during large-scale simulation ticks.
  • Automated Dead-Reckoning: Computes DRM algorithms (FPW, RPW, RVW, FVW) and automatically issues Entity State PDUs when kinematic deviation thresholds or heartbeat timers expire.
  • Zero-Fragmentation PDU Bundling: Concatenates multiple PDUs produced during the same simulation step into single UDP datagrams up to the network MTU, slashing socket kernel transitions and packet fragmentation.
  • Comprehensive Protocol Support: Implements over 20 PDU types including Entity State, Fire, Detonation, Collision, Electromagnetic Emission (EE), IFF/ATC/NAVAIDS, Transmitter/Receiver/Signal, and Simulation Management.
  • Asynchronous Networking: Uses Asio for non-blocking UDP I/O with pluggable deterministic in-memory sinks for automated CI testing.

Full Tech Stack & Dependencies

  • Graphics & Compute Engine: WGFX (WebGPU / Google Dawn / C++20)
  • Language: Modern C++20
  • Simulation Standards: IEEE 1278.1-2012 (DIS 7), VITA-49.0 (VRT), SigMF
  • Compute & Graphics: WebGPU (Dawn), WGSL Shaders, CUDA, ROCm/HIP, Dear ImGui, ImPlot
  • Math & Kinematics: GLM, SGP4, Kalman Filters (9D ECEF with 9×9 Covariance Matrices)
  • Concurrency & ECS: Taskflow, EnTT
  • Networking & I/O: Asio (UDP Multicast & Unicast), WebSockets, HTTP REST API
  • Audio DSP: miniaudio
  • Build System: Modern CMake with CPM.cmake & vcpkg