solve_wind_truing

Function solve_wind_truing 

Source
pub fn solve_wind_truing(
    request: &WindTruingRequest,
) -> Result<WindTruingReport, Box<dyn Error>>
Expand description

Back-solve the effective crosswind from every observed miss in request (MBA-1392).

Each observation is fitted independently with a bracketed root find on the constant crosswind speed, against the real forward trajectory model (the truing core’s own solver assembly, zero-angle solve and atmosphere — the same one the drop-based truing commands use, now sampled on the lateral axis and carrying spin drift, and optionally Coriolis). See modeled_miss_right_m for that forward direction on its own.

Errors on an invalid request, on any trajectory-solver failure, and when an observed miss cannot be produced by any crosswind inside +/-MAX_SOLVABLE_CROSSWIND_MPH — which in practice means the miss was entered with the wrong sign, or is not a wind effect at all.