Radar Console is a mock radar backend + operator UI that simulates detections and 2D tracks in a clean, data-dense console. The focus is on the backend DSP pipeline in Haskell: synthetic signal generation, detection, classification, association, and tracking, all streamed to a realtime UI.
- Backend (Haskell): a DSP-style pipeline that turns synthetic sensor data into detections and tracks. It handles noise estimation, thresholding, classification from mock signatures, and alpha-beta tracking with lifecycle management.
- Frontend (React): a 2D radar scope with live track updates and a compact track table for operators.
Clone the repo:
git clone https://github.com/Sao-Ali/radar-console.git
cd radar-consolecd backend/radar-dsp
cabal run radar-dspThe server starts a WebSocket at ws://127.0.0.1:8080 and streams:
range_profile(1D synthetic profile)detections/tracks(1D peak detection + tracking)detections_2d/tracks_2d(2D simulated targets + tracking)
cd frontend/radar-ui
npm install
npm run devOpen the dev server URL shown in the terminal. The UI connects to the backend WebSocket and renders the live radar scope.
The backend is structured as a small DSP chain that emits structured messages over WebSocket:
-
Synthetic signal generation
DSP.RangeProfileproduces a 1D range profile with noise and moving peaks.Radar.TargetSimproduces 2D target truth for drone/plane/bird classes.
-
Detection
DSP.Detectestimates a noise floor (median) and finds local peaks above a threshold.- The output includes per-detection SNR and range information.
-
Classification (mock)
Radar.TargetSimuses a synthetic signature (mock rotor/prop behavior) to classify targets into drone/plane/bird with confidence.- This is intentionally simple but models a real classification stage.
-
Association + tracking
Tracker.Trackingperforms 1D nearest-neighbor association and alpha-beta tracking.Tracker.Tracking2Dperforms 2D nearest-neighbor association with gating and an alpha-beta filter for x/y and velocity.- Tracks move from tentative to confirmed and are removed after repeated misses.
-
Streaming + replay
Server.RangeProfileStreamruns the DSP loop and broadcasts payloads.- Range profiles are recorded to disk and can be replayed by switching mode.
backend/radar-dsp
app/Main.hs WebSocket server + stream control
src/DSP/Detect.hs Peak detection + SNR
src/DSP/RangeProfile.hs Synthetic range profile
src/Radar/TargetSim.hs 2D target simulator + classification
src/Tracker/Tracking.hs 1D association + alpha-beta filter
src/Tracker/Tracking2D.hs 2D association + alpha-beta filter
src/Server/RangeProfileStream.hs Stream loop + record/replay
frontend/radar-ui
src/App.tsx Radar scope + track table UI
src/shared/messages.ts Payload types
- The DSP modules are pure functions where possible and only the stream loop handles IO.
- The detection + tracking chain is designed to be replaceable with real sensor data later.
- 2D tracking uses mock measurements and simple association to keep the focus on software logic.