Skip to content
Projects

About

Open-source radar simulation for education and research. Features radar equation, clutter models, ECM/ECCM, and ML classification.

Science & Engineering

How these counts are measured

Measured star growth

in 24h
Collecting history
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

RadarSim

A radar simulator that works one dwell at a time and shows the result the way a radar display would. I wrote it to answer questions like: at what range is this fighter first seen, how far does a jammer push that out, why does the track break in a hard turn, what do the horizon and sea clutter leave of a missile at 5 m, and where is the jammer that two radars can only see as a strobe.

RadarSim: the film, 78 seconds

Documentation: https://spaceengineerss.github.io/RadarSim/ · Manual (PDF): RadarSim-5.0-Manual.pdf

Every echo, track and number in the film comes from a run of the simulator with a fixed seed.

What is in it

  • Detection. The radar equation with noise temperature, pulse compression (LFM, Barker, Frank), the hits and beam-shape loss the scan gives, elevation coverage, range ambiguity and eclipsing, Swerling 0–4 statistics for non-coherent or binary integration, CFAR loss, and false alarms at the rate the threshold implies.
  • Propagation. Radar horizon on a 4/3 Earth, ITU-R P.676 absorption integrated along the slant path, P.838 rain, two-ray multipath over a spherical surface, terrain masking.
  • Clutter. Land, sea and rain clutter through the elevation pattern, the response and improvement factor of a one- or two-delay canceller, false alarms from Weibull and K-distributed clutter.
  • Electronic attack. Noise jamming through main lobe and sidelobes, so self-screening, escort and stand-off geometry all follow; burn-through; repeater range and velocity gate pull-off whose false echoes are detected and tracked; chaff and decoys.
  • Tracking. Unbiased converted measurements with their covariance; Kalman, extended and IMM filters; nearest-neighbour or PDA association; M-of-N confirmation; height; OSPA to measure the result.
  • Networks. Several radars on one scene, track fusion by covariance intersection, jammers located by crossing strobes.
  • Signal level. A coherent pulse-Doppler chain for the range–Doppler view, the A-scope's range profile, and SAR and ISAR imaging.
  • Tools. Coverage curves, Monte Carlo checks with confidence intervals, tracking accuracy over repeated runs, an event log, reports, recordings that replay on the displays, and a scenario editor that draws on the scope.

Each model names its source and its range of validity and is tested against something that does not share its code: a closed form, a published value, a hand calculation or a pulse-level simulation. The suite has more than 800 tests. What the program leaves out is listed in one place.

Coverage curve RHI with a ridge
Sea-skimming missiles in sea clutter A jammer located by two radars

Install

Python 3.10 to 3.13.

pip install "radarsim[gui]"
radarsim

pip install radarsim alone gives the library and the command-line runner, without Qt. Ready-to-run builds for Windows, Linux and macOS are attached to each release. From a checkout:

git clone https://github.com/SpaceEngineerSS/RadarSim.git
cd RadarSim
python -m venv .venv
.venv/bin/pip install -e ".[gui]"        # .venv\Scripts\pip on Windows
.venv/bin/radarsim

First five minutes

The PPI of the escort jamming scenario: two fighters, one behind its own noise, a decoy and a chaff cloud

  1. radarsim escort_jamming opens two fighters coming in on a search radar, one of them with a jammer. Press Space.
  2. Fighter Bravo is tracked from the first scans. Alpha is a red strobe: the radar knows the bearing of the noise and not the range.
  3. Click Bravo. The inspector shows its SNR, its Pd and every loss of the last look.
  4. Turn Jammers on off in the settings panel and Alpha appears on the next sweep. Turn it on again and watch how close Alpha has to come before the radar burns through.
  5. Open Coverage in the drawer for the detection range of the radar as you have just set it.

Without the interface:

$ radarsim --headless escort_jamming --duration 120 --seed 3
Escort Jamming  (120 s simulated in 1.00 s)
object                      looks   det     Pd  first det [s]  median SNR [dB]
Fighter Alpha                  12     3   0.25           47.7             -1.7
Fighter Bravo                  12    12   1.00            7.4             37.5
Chaff 1                         6     6   1.00           67.7             11.8
Decoy                           9     8   0.89           37.7             27.1
tracks: 5 (1 confirmed)

From Python:

from radarsim.io.scenario_loader import ScenarioLoader, resolve_scenario

engine = ScenarioLoader(resolve_scenario("naval_battlegroup")).create_simulation_engine()
engine.seed = 7
log = engine.run(60.0)
for event in engine.event_log:
    print(f"{event.time:6.1f} s  {event.message}")

The documentation has a worked example that takes one detection range from pencil and paper to the program.

Scenarios

Scenario What it shows
basic_tracking three targets of different RCS and fluctuation; the life of a track
close_air_combat sector scan from a fighter, a 4.7 g break, what the filter needs to hold it
drone_swarm_saturation thirty small drones and the limits of data association
ecm_environment barrage noise and a repeater over the sea
escort_jamming a jammer that hides its carrier, burn-through, a decoy and chaff
ground_clutter_filtering land clutter sectors and the canceller
hypersonic_interception a staring Ka-band seeker, Doppler ambiguity and eclipsing
mountain_ambush terrain masking and a pop-up target
naval_battlegroup the horizon and sea clutter against sea-skimming missiles
radar_network two sites fuse their tracks and locate a stand-off jammer
stealth_deep_penetration a 0.01 m² bomber against a UHF early-warning radar

Scenarios are YAML or JSON files with a checked schema; the format reference covers every key.

Limits

RadarSim is a tool for engineering study and teaching. It works at the level of the dwell, not of samples; its radars and targets are typical of a class and none is a model of real equipment; nothing in it has been compared with measurements. Targets are points, refraction is standard, there is no diffraction, the tracker does not use range rate and resolves no raids. The limitations page has the full list.

Development

pip install -e ".[gui,dev,docs]"
pytest && ruff check . && mypy radarsim

See CONTRIBUTING.md and the development notes.

Licence and citation

MIT, see LICENSE. The bundled IBM Plex fonts are under the SIL Open Font Licence. If RadarSim contributes to published work, please cite it with CITATION.cff and give the version, the scenario file and the seed.

Explore related projects

Loading…