EW-Sentinel is an intelligent electronic warfare simulation system written in Rust. It models a closed-loop EW workflow: generate radar emitter signals, receive and process SIGINT captures, classify threats, generate countermeasures, package them, and deploy updates to a friendly aircraft fleet.
The project is a simulation. The CNN classifier and AI waveform generator are initialized in-process for demonstration and workflow modeling; they do not load trained operational models.
The default scenario is Contested Airspace - IADS Penetration:
- A friendly package penetrates an integrated air defense system.
- Enemy emitters include SAM, early-warning radar, fire-control radar, AAA radar, and unknown/novel emitters.
- Friendly aircraft include platforms such as F-35, EA-18G, F-15EX, and UAVs.
- Each simulation cycle detects emitter pulses, classifies threats, generates jamming waveforms, and pushes EW package updates to aircraft.
Additional scenarios live in scenarios/, for example coastal_defense.json.
flowchart TD
A[Scenario JSON<br/>emitters + friendly aircraft + area] --> B[SignalEnvironment]
C[Threat Library JSON<br/>radar/SAM signatures + recommended CM] --> B
C --> H[ThreatClassifier]
B --> D[Emitter Simulation<br/>pulse/IQ generation]
D --> E[Propagation<br/>path loss + AWGN]
E --> F[Receiver]
F --> F1[Digitizer<br/>receiver noise + ADC quantization]
F1 --> F2[PDW Extractor<br/>freq/bandwidth/PW/AOA/modulation]
F1 --> F3[FFT/STFT Spectrogram]
F2 --> H
F3 --> H
H --> H1[CNN Classifier]
H --> H2[Library Parametric Match]
H1 --> I[Threat Tracks<br/>known or novel + threat level]
H2 --> I
I --> J[Technique Selector]
J --> K[Countermeasure Generation]
K --> K1[Noise Jamming<br/>barrage / spot]
K --> K2[Deceptive Jamming<br/>RGPO / VGPO]
K --> K3[DRFM<br/>repeat / modulated]
K --> K4[AI Waveform Generator<br/>fallback]
K --> L[Package Builder<br/>version + manifest + checksums]
L --> M[OTA Manager]
M --> N[Friendly Aircraft Fleet<br/>EW suite updated / failed / rollback history]
N --> O[EwState]
I --> O
L --> O
O --> P[TUI Dashboard / Headless Output]
sequenceDiagram
participant Main
participant Loop as EW Loop
participant Env as Signal Env
participant Rx as Receiver
participant AI as Threat Analysis
participant CM as Countermeasure
participant Deploy as Deployer
participant UI as Dashboard
Main->>Loop: load scenario + threat library
loop each cycle
Loop->>Env: tick simulated time
Env-->>Loop: IQ captures from emitters
Loop->>Rx: digitize + extract PDW + spectrogram
Rx-->>Loop: PDWs + spectrograms
Loop->>AI: CNN + library fusion
AI-->>Loop: threat tracks + novel count
Loop->>CM: select techniques + generate waveforms
CM-->>Loop: jamming waveforms
Loop->>Deploy: build package + push OTA
Deploy-->>Loop: deployment records
Loop->>UI: stage/threat/waveform/deploy events
end
src/main.rs: CLI entrypoint, scenario loading, threat library loading, dashboard startup.src/config.rs: CLI arguments and scenario JSON schema.src/pipeline/loop_runner.rs: main EW simulation loop.src/signal_env/: emitter creation, modulation generation, propagation effects.src/receiver/: digitization, PDW extraction, FFT spectrogram generation.src/threat_analysis/: CNN inference, threat library matching, unknown threat characterization.src/countermeasure/: technique selection and jamming waveform generation.src/deployer/: deployment package building, OTA update simulation, rollback helpers.src/models/: shared signal, threat, aircraft, countermeasure, and deployment types.src/ui/: terminal dashboard and headless output.src/ml/: lightweight neural network layers and tensor utilities used by the classifier/generator.
- Rust toolchain with Cargo.
The project uses dependencies from Cargo.toml, including tokio, serde, ratatui, crossterm, ndarray, and rustfft.
Run from the project root:
cargo runRun without the TUI dashboard:
cargo run -- --no-dashboardChoose a scenario:
cargo run -- --scenario scenarios/coastal_defense.jsonSet cycle count, seed, and time compression:
cargo run -- --max-cycles 5 --seed 123 --time-compression 60 --no-dashboardBuild release binary:
cargo build --release--scenario <PATH> Scenario JSON path
--max-cycles <N> Override scenario cycle count
--seed <N> RNG seed for reproducible runs
--time-compression <N> Simulation time compression factor
--no-dashboard Print headless progress instead of TUI
--debug Enable debug logging
--threat-library <PATH> Threat library JSON path
data/threat_library.json contains known threat signatures:
- frequency range
- typical PRI and pulse width
- modulation type
- scan type
- lethal range
- recommended countermeasure techniques
- classifier label
Scenario files in scenarios/ define:
- operating area
- emitter groups and modes
- friendly aircraft
- simulation cycle count
- simulated duration per cycle
- Emitter positions and signal parameters are randomized from scenario and threat library inputs.
- Unknown emitter types are modeled as novel threats and characterized heuristically.
- OTA deployment includes simulated failures such as degraded data links and version incompatibility.
- The dashboard is rendered with
ratatui; pressqto quit.