Module wind_scenarios

Module wind_scenarios 

Source
Expand description

MBA-1349: robust hold corridors across a bounded set of NAMED segmented-wind scenarios.

Field users usually have several concrete plausible wind calls — a low call and a high call, or two different downrange patterns — rather than a distribution they actually believe. A nominal trajectory hides that ambiguity; Monte Carlo demands a probability model they do not have. This module takes the middle path: solve a handful of named scenarios exactly, report every one of them, and report the corridor they span.

§No probabilities, anywhere

Nothing here assigns a likelihood to a scenario, interpolates between scenarios, or folds the finite set into a standard deviation. The corridor is the range spanned by the hypotheses the user supplied, at the ranges they asked about — no more, and deliberately no more. A three-scenario corridor is not a confidence interval, and this module never presents it as one. Statistical dispersion remains monte-carlo --wez’s job.

§What a “hold” is here

The same convention the rest of the 0.31.0 reticle work uses (see crate::reticle): angular milliradians the shooter must apply, with elevation positive = hold UP (the bullet fell below the line of sight) and windage positive = hold RIGHT (the wind pushed the bullet right).

§Determinism

Scenarios are sorted by name before anything is solved, so no result — corridor, minimax hold, or which scenario is named as the worst case — can depend on the order they appeared in the file. Every tie-break downstream is therefore over a fixed order.

§The zero is solved ONCE, in calm air

A rifle has one zero; the scenarios are hypotheses about the shot, not about the zeroing session. Re-zeroing per scenario would fold each hypothesis into its own datum and shrink the corridor toward nothing, which is exactly the ambiguity this command exists to show. So the muzzle angle is solved once against WindConditions::default() and reused verbatim by every scenario.

Structs§

CorridorLoad
The rifle, load and atmosphere every scenario is solved with. SI throughout.
CorridorRow
The corridor and chosen hold at one range.
NamedWindScenario
One named wind hypothesis: a label plus the downrange segments that define it.
RobustHoldReportV1
A complete robust-hold report (MBA-1349).
RobustHoldRequest
One robust-hold run.
ScenarioHold
One scenario’s hold at one range.
WindScenarioSetV1
A bounded, named set of wind hypotheses (MBA-1349).

Enums§

CorridorMetric
Which norm the minimax hold minimizes.
RobustHoldFormat
Rendering shape for the robust-hold report.
TargetSpec
The target a corridor is judged against.
WindScenarioError
Why a robust-hold run was rejected. Typed, and every variant is raised BEFORE any trajectory is solved except Self::SolveFailed.

Constants§

MAX_CORRIDOR_RANGES
Most ranges one run will sample. Same rationale: a bounded, checkable table, not a swept surface.
MAX_WIND_SCENARIOS
Most scenarios one run will accept.
ROBUST_HOLD_REPORT_VERSION
Schema version carried by RobustHoldReportV1.
TARGET_FIT_EPSILON_M
Slack (meters) allowed when deciding whether a miss is inside a target.
WIND_SCENARIO_SET_VERSION
Schema version carried by WindScenarioSetV1 and enforced on load.

Functions§

format_robust_hold_report
Render a robust-hold report, identically on every surface (MBA-1349).
parse_target_spec
Parse a rect:WxH or circle:D target specification.
parse_wind_scenario_set
Decode a wind scenario set from JSON TEXT (MBA-1349).
solve_robust_hold
Solve one robust-hold run (MBA-1349).