Files
overwatch/simulation/radar_gui_port.md
thebadking b3608ecfd7
Some checks failed
AERIS-10 CI / Python Lint + Tests (push) Has been cancelled
AERIS-10 CI / MCU Firmware Tests (push) Has been cancelled
AERIS-10 CI / FPGA Regression (push) Has been cancelled
AERIS-10 CI / Cross-Layer Contract Tests (push) Has been cancelled
Rename the simulator to Overwatch and organize the repository for presentation.
The operator interface now uses that name. The radar design, parts list, and simulation sit in separate directories, and the earlier simulator and project license are removed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-21 06:04:46 +00:00

5.4 KiB

PLFM radar console port

Implemented 2026-10-03. Open Radar List beside 3D Simulation, then select a site; radar markers in Three.js also select their consoles. Open V6 Demo / CSV Lab works without a running scene.

Sources and processing

The visual reference ../firmware/9_3_GUI/GUI_V6.gif shows the demo interface in GUI_V6_Demo.py. Its RadarTarget, RadarSettings, and SimulatedRadarProcessor are adapted into src/defense_sim/radar/v6_demo.py, without Tkinter or Matplotlib. Changes include isolated seeded RNG, dimension-aware clutter, power-domain SNR scaling and configured range/velocity bounds. Vue owns the interface; Python owns processing and streams per-connection console state.

Reference feature Vue/Python port
Radar Display Range/Doppler heatmap, color scale, grid, detection overlay, target table and pitch correction
A-Scope Mean power across Doppler bins versus range
Doppler Spectrum Selected range-bin spectrum; slider or map selection
Radar settings Carrier, long/short chirp duration, chirps/frame, range/Doppler bins, PRF, range/velocity bounds, CFAR threshold
Display settings Requested update rate, color map, grid and target visibility
Simulation settings Noise, clutter, target count; additional scene measurement sigmas and forecast horizon
Operator controls Start/stop, bounded recording, save/load JSON configuration, JSON data export, demo reset, clear visible target list
Additional diagnostics Delivered evidence, tracker gate decisions, expected angular scatter, forecast uncertainty, source-derived board information

Three sources are explicitly identified:

  • Scene evidence: delivered noisy radar observations. The range/Doppler map is a display proxy, not raw ADC data. Stop pauses this console while the simulated radar continues scanning. Noise controls on the map affect visualization; range/angular/Doppler measurement sigmas change only the selected radar's future measurements.
  • V6 simulated samples: the headless reference demo engine, with illustrative target returns/noise/clutter. Waveform settings retain the reference GUI semantics; they do not constitute a calibrated ADC/waveform simulator.
  • PLFM I/Q CSV replay: bundled copy of test_radar_data.csv, a synthetic GUI test file. The compact binary data/plfm_gui_samples.iq.xz (produced by tools/export_replay_iq.py) is the primary load path; the CSV remains as byte-exact fallback and upstream reference. NumPy Hann-windowed slow-time FFT, FFT shift, and noncoherent LONG/SHORT power fusion produce spectra. The generator's 20 m sample-index spacing and selected velocity scale are illustrative. This file has no bearing channels: angle fields remain unknown. Replay does not feed the scene tracker.

SciPy supplies the local-maximum overlay; the median-background threshold is a host CFAR-like diagnostic, not the FPGA's bit-accurate CFAR or a calibrated probability-of-false-alarm detector. The v7 software FPGA model remains a separate reference, not an engine silently substituted for the GIF's demo.

Status and hardware boundary

Each list card reports simulated scan state, central report freshness, processing latency, cumulative received/accepted/rejected counts, pending reports, scan range/revisit/slot and site position. Freshness uses simulation time. Browser disconnect is shown separately. USB shows not connected / adapter pending, with no claimed hardware heartbeat.

Reference information comes from ../firmware/9_2_FPGA/tb/cosim/radar_scene.py (10.5 GHz carrier, 400 MSPS ADC, 100 MHz IQ/system rate, 120 MHz IF, 20 MHz bandwidth, 30/0.5 microsecond chirps, 167/175 microsecond PRI, 16 chirps per CPI) and the EAGLE main-board schematic (AD9484, FT2232H, STM32F746, ADAR1000 and LTC5552). These are source-derived values, not hardware readback. FT2232H/FT601 transport, register programming, real health/heartbeat, calibrated axes and angle estimation require a future hardware adapter.

Radar tracking corrections

Stone Soup's elevation/bearing/range/range-rate measurement model and Joseph-form extended Kalman update now fuse radial Doppler without inventing tangential velocity. A chi-square innovation gate rejects gross inconsistent reports and retains accepted track state. Raw evidence remains visible, including rejections. Heatmap reduction uses peak-preserving range pooling so isolated returns cannot disappear between display rows. At 20 km, 0.5 degree angular noise implies approximately 175 m lateral sigma; this cannot be removed by relocating raw samples.

Displayed constant-velocity forecasts default to a 30 second cap and shorten using track position/velocity covariance and acceleration diffusion. They propagate measurement age, omit stale/grounded tracks and truncate at ground. Controller planning retains its separate longer horizon; neither path uses hidden attacker dynamics to correct measurements.

Verification

91 Python regressions pass after the replay-data change (artifact loader verified byte-equal to the CSV path), including noisy multi-site radial tracking, angular wrapping, innovation rejection, recording bounds, settings validation, replay metadata and isolated Socket.IO consoles. Frontend type checking and production build pass. Authenticated browser checks verify the list, site selection (including 3D marker clicks), all views, start/stop, recording and synthetic CSV replay. The served frontend was rebuilt and backend restarted.