Expand description
MBA-1392: back-solve the effective crosswind from an observed horizontal miss.
The rest of the truing family fits muzzle velocity and BC from VERTICAL drop. This module fits the other axis: given where a group actually landed left/right of the aim point, it reports the constant crosswind that reproduces that miss through the real forward model — the number a shooter compares against the wind they called, so their wind calls can be calibrated instead of guessed at.
§Sign conventions (the whole set, in one place)
- Observed miss (
WindObservation::miss_right_m, CLI--miss): signed, POSITIVE = the group landed RIGHT of the aim point. - Solved crosswind (
WindTruingSolution::solved_crosswind_mph): signed, and the sign follows the deflection it produces — POSITIVE = a wind FROM the shooter’s LEFT (9 o’clock) that pushes impacts RIGHT; NEGATIVE = a wind FROM the shooter’s RIGHT (3 o’clock) pushing impacts LEFT. It is a full-value crosswind (a 90-degree wind), not a half-value component of some other bearing. - That maps onto the engine’s wind-FROM convention (
crate::wind::wind_vector,0 = headwind,PI/2 = from the right,3*PI/2 = from the left) — the convention established by the 0.19.0 wind-direction sign fix, which flipped0from tailwind to headwind. A positive solved crosswind is therefore direction3*PI/2. - Twist (
crate::truing::TruingTwist::right_hand): a right-hand twist drifts RIGHT (positive lateral), a left-hand twist drifts LEFT. - Shot azimuth (
crate::truing::TruingEarthFrame::shot_azimuth_deg): compass bearing fired ALONG, 0 = North, 90 = East.
§What the solved wind actually contains
A horizontal miss is not purely wind. Spin drift is always modelled here (a twist rate
is required, precisely so it can be), and Coriolis is modelled when a latitude and shot
azimuth are supplied. Anything the model was not given data for stays ABSORBED in the
solved crosswind, and the report says so (WindTruingReport::unsubtracted_effects)
rather than quietly presenting a contaminated number as pure wind.
§No scope-tracking correction
--miss values are LINEAR measurements off the target (inches), not dial readings, so
the MBA-1358 tracking correction factor does NOT apply to them — only DIALED
observations are CF-converted. This module deliberately has no CF input.
Structs§
- Wind
Interval V1 - A two-sided interval on the combined crosswind, plus both estimates behind it.
- Wind
Observation - A single observed horizontal miss used to back-solve effective wind (MBA-1392).
- Wind
Truing Report - The complete wind-truing result: one fit per observation plus the combined answer.
- Wind
Truing Request - Everything the wind fit needs: the observed misses plus the load, rifle, atmosphere and the opt-in earth frame (MBA-1392).
- Wind
Truing Solution - The wind fitted from ONE observed miss (MBA-1392).
- Wind
Uncertainty Failure V1 - Structured explanation for an absent interval, mirroring
true.fit’s failure shape.
Enums§
- Wind
Truing Output - Which rendering
format_wind_truing_reportshould produce. Front-end-agnostic so the native CLI’sOutputFormatand the WASM terminal’s--outputstring map onto ONE formatter and cannot drift apart. - Wind
Uncertainty Basis V1 - Which of the two independent uncertainty estimates set the reported interval.
- Wind
Uncertainty Failure Code V1 - Why no interval could be produced.
- Wind
Uncertainty V1 - The interval, or a structured reason there is not one.
Constants§
- MAX_
SOLVABLE_ CROSSWIND_ MPH - Widest crosswind the solver will bracket, in mph (signed, so the bracket is
-100..=+100). Comfortably past any wind a rifle shooter reports; a miss that needs more than this is a data-entry or sign error, not a wind call, and is rejected with a diagnostic rather than solved into a fantasy number. - MIN_
WIND_ SENSITIVITY_ IN_ PER_ MPH - Guide value for the wind-truing validity note: below this many inches of lateral movement per mph of crosswind, the observation barely constrains the wind and the number solved from it is weakly identified. Same spirit as the MV-calibration window (MBA-1405) — a stated band the report checks each observation against, not a hard gate.
- MPH_
TO_ MPS - Miles per hour to meters per second (exact, by definition of the international mile).
pubso the front ends convert--called-windwith the same factor this module renders with, rather than each re-typing the literal. - WIND_
SOLVE_ TOLERANCE_ M - Convergence tolerance on the modelled-minus-observed lateral miss, in meters
(0.01 mm — four orders of magnitude finer than anyone can measure a group centre).
pubbecause it is the published meaning of a convergedWindTruingSolution::residual_m.
Functions§
- format_
wind_ truing_ report - Render a
WindTruingReport(MBA-1392). - modeled_
miss_ right_ m - The FORWARD direction of
solve_wind_truing: the lateral miss (meters, positive = right of the line of sight) this request’s load / atmosphere / twist / earth frame predicts atrange_munder a signedcrosswind_mph(MBA-1392). - parse_
wind_ observation - Parse a
--miss RANGE:RIGHT[:SIGMA]token. - solve_
wind_ truing - Back-solve the effective crosswind from every observed miss in
request(MBA-1392). - wind_
truing_ json_ value - The wind-truing report as a JSON document (MBA-1392).