A multi-platform electronic warfare engineering calculator covering antenna analysis, RF propagation, link budgets, receiver performance, communications and radar jamming, emitter location, radar (range equation, detection statistics, Doppler & resolution), and spread-spectrum communications — implementing the standard formulas, inspired by and audited against the EW101 series by David Adamy.
Pre-built artifacts for all three platforms are attached to each GitHub Release:
| Platform | Artifact | Notes |
|---|---|---|
| Windows | .msix |
Unsigned by default; see frontend/windows/ewcalc-winui/README.md for sideloading a self-signed cert |
| macOS | .dmg |
Signed and notarized — opens directly, no Gatekeeper prompt |
| Linux | .AppImage |
chmod +x, then run directly; no installation required |
To build from source instead, see Building below.
Layered, with clean separation:
libew— pure C++20 calculation library, no UI, no external dependenciesewpresenter— platform-agnostic presenter/viewmodel layerbridge/— plain-C API overewpresenter, used by the macOS Swift frontend (Swift cannot import C++ directly); Linux and Windows linkewpresenterdirectlyfrontend/— platform-native UIs: WinUI 3 (Windows), SwiftUI (macOS), Qt6 (Linux)
Layer and frontend detail: docs/ARCHITECTURE.md.
| Module | Content |
|---|---|
core |
Strong-type units (Dbm, Db, Km, Mhz, Kelvin, …), constants |
propagation |
FSPL, 2-ray ground reflection, Fresnel zone, knife-edge diffraction, earth bulge, radar horizon range |
antenna |
ERP, gain conversions, beamwidth |
link |
One-way link budget, effective range |
receiver |
Sensitivity, cascaded NF (Friis), SFDR, digital DR and SQNR, noise temperature conversions |
jamming |
Comms J/S ratio, burnthrough range, partial-band optimization; radar self-protection and stand-off J/S and burnthrough range |
location |
CEP from AOA bearing error, TDOA timing error, and EEP |
radar |
Radar range equation, pulse compression, coherent integration gain, LPI advantage; detection statistics (Albersheim, Shnidman with Swerling 0–4, fluctuation loss, dwell/hits per scan, false-alarm rate); Doppler shift, unambiguous range/velocity, blind speed, range and cross-range resolution |
digital |
Eb/N₀ ↔ SNR conversion (both directions), DSSS process gain, jamming margin, required J/S |
Eleven presenters wrap the libew modules for use by any view layer:
| Presenter | Inputs | Key outputs |
|---|---|---|
PropagationPresenter |
distance, frequency, antenna heights, obstruction height | FSPL, 2-ray loss, Fresnel zone, regime, earth bulge, radar horizon, knife-edge diffraction loss |
AntennaPresenter |
gain, az/el beamwidth, Tx power, frequency | ERP, beamwidth from gain, gain from beamwidth, wavelength |
LinkPresenter |
Tx power/gain, Rx gain, geometry, sensitivity | Received power, link margin, effective range |
ReceiverPresenter |
Bandwidth, NF, SNR, stage chain, ADC bits | Sensitivity, cascaded NF, system noise temp, SFDR, digital DR, SQNR |
JammingPresenter |
Signal/jammer ERP, geometry, frequency, J/S threshold | J/S ratio, burnthrough range, partial-band optimum BW (N/A when hop range = 0 or J/S is below the threshold) |
RadarJammingPresenter |
Geometry (self-protection / stand-off), radar and jammer ERP, RCS, target range, J/S threshold; stand-off jammer range and mainbeam/sidelobe gains | J/S ratio, J/S margin, burnthrough range, status |
LocationPresenter |
Bearing error, range, TDOA timing error, EEP semi-axes | CEP (AOA, TDOA, and EEP methods) |
RadarPresenter |
Tx power, gain, RCS, frequency, NF, TB product | Max range, two-way loss, PC gain, coherent integration gain, LPI advantage |
DetectionPresenter |
Pd, Pfa exponent, pulses, Swerling case, beamwidth, scan rate, PRF, bandwidth | Required SNR (Shnidman and Albersheim), fluctuation loss, dwell time, hits per scan, false-alarm rate |
DopplerPresenter |
Frequency, radial speed, PRF, bandwidth, range, az/el beamwidths | Doppler shift, unambiguous range/velocity, blind speed, range and cross-range resolution |
DigitalPresenter |
SNR, bandwidth, data rate, chip rate, required Eb/N₀, impl. loss | Eb/N₀, SNR from Eb/N₀, DSSS process gain, jamming margin, required J/S |
Each presenter validates inputs, calls libew, and fires a std::function callback with formatted output strings. No platform types are exposed.
A console harness (ewpresenter_harness) exercises all presenters against default inputs.
Requires CMake ≥ 3.25 and a C++20 compiler. See AGENTS.md
for per-platform toolchain prerequisites (Xcode, Qt6, Visual Studio, etc.).
cmake -B build
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure
To run the presenter harness:
build/bin/Release/ewpresenter_harness
Platform build scripts are in scripts/. Each builds the native libs then the
frontend, and accepts --config Debug|Release and (on Linux/macOS) --package
to produce a distributable artifact.
| Platform | Script | Package output |
|---|---|---|
| Windows | scripts/build-windows.ps1 |
unsigned .msix (-Sign for signed) |
| macOS | scripts/build-macos.sh |
signed + notarized .dmg |
| Linux | scripts/build-linux.sh |
.AppImage |
macOS packaging requires a Developer ID Application certificate in the keychain
and xcrun notarytool credentials stored under the ewcalc-notarytool profile.
See docs/formulas.md for the equations, units, assumptions, and references behind each calculator output.
libew and ewpresenter headers use Doxygen-style /// comments. Build the
HTML API reference locally with:
doxygen Doxyfile
Output lands in docs/html/index.html. CI runs the same command on every push
and pull request and publishes docs/html/ as a workflow artifact; it does not
publish to GitHub Pages yet (a reasonable future enhancement).
See CONTRIBUTING.md for the branch/PR workflow, build and
test instructions, and code style. See CHANGELOG.md for
release history. Found a security issue? See SECURITY.md
for how to report it privately.
All three platform frontends — Windows (WinUI 3), macOS (SwiftUI), and Linux
(Qt6 Widgets) — are feature-complete across all eleven calculators plus a
thirteen-page reference library (glossary, units, frequency bands, and a
formulas-and-tables page per calculator domain), with collapsible
geometry-diagram sections on seven of the calculator panes. See
CHANGELOG.md for release history.
MIT — see LICENSE.