Module wez

Module wez 

Source
Expand description

WEZ (Weapon Employment Zone) sweep core – MBA-1317, extracted MBA-1343 Phase B.

monte-carlo --wez reports hit probability vs range for a fixed target size, treating the shooter’s wind-CALL error (how well they estimate the current wind) as a source of dispersion distinct from the ballistic –wind-std (gust-to-gust physical variability). See the “WEZ” doc section in CLI_USAGE.md for a worked example.

Extracted from the CLI binary so non-CLI front ends (e.g. the WASM terminal) can reuse the exact compute path. All rendering (summary table / statistics CSV / full JSON) stays with the front ends; this module goes as far as building a WezResult.

Structs§

WezResult
WezRow
One range step of a WEZ sweep.
WezTargetSizeJson

Enums§

TargetSize
A parsed --target-size value, still in the CLI’s chosen unit (inches imperial / cm metric) – call TargetSize::to_metric before using it.
TargetSizeMetric
A TargetSize converted to meters, ready for MonteCarloResults’s hit-probability methods.
WezErrorBucket
Which WEZ variance-attribution bucket a miss-variance source belongs to.

Functions§

compute_wez
Run a WEZ sweep and return its per-range rows plus the sweep-level parameters as a WezResult, leaving all rendering (summary table / statistics CSV / full JSON) to the caller. All inputs are metric (the CLI converts from user units before calling).
parse_target_size
Parse a --target-size argument: WIDTHxHEIGHT (e.g. 18x30) for a rectangle, or a bare number (e.g. 12) for a circular radius fallback. Case-insensitive on the x separator.