Skip to content

Sao-Ali/radar-console

Repository files navigation

Radar Console

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.

What we are building

  • 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.

Quick start

Clone the repo:

git clone https://github.com/Sao-Ali/radar-console.git
cd radar-console

Backend (Haskell)

cd backend/radar-dsp
cabal run radar-dsp

The 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)

Frontend (React)

cd frontend/radar-ui
npm install
npm run dev

Open the dev server URL shown in the terminal. The UI connects to the backend WebSocket and renders the live radar scope.

Backend DSP pipeline (Haskell focus)

The backend is structured as a small DSP chain that emits structured messages over WebSocket:

  1. Synthetic signal generation

    • DSP.RangeProfile produces a 1D range profile with noise and moving peaks.
    • Radar.TargetSim produces 2D target truth for drone/plane/bird classes.
  2. Detection

    • DSP.Detect estimates a noise floor (median) and finds local peaks above a threshold.
    • The output includes per-detection SNR and range information.
  3. Classification (mock)

    • Radar.TargetSim uses 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.
  4. Association + tracking

    • Tracker.Tracking performs 1D nearest-neighbor association and alpha-beta tracking.
    • Tracker.Tracking2D performs 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.
  5. Streaming + replay

    • Server.RangeProfileStream runs the DSP loop and broadcasts payloads.
    • Range profiles are recorded to disk and can be replayed by switching mode.

Project layout

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

Notes

  • 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors