calculate_lead

Function calculate_lead 

Source
pub fn calculate_lead(
    inputs: BallisticInputs,
    wind: WindConditions,
    atmo: AtmosphericConditions,
    speed_mps: f64,
    angle_deg: f64,
    range_m: f64,
) -> Result<LeadSolution, LeadError>
Expand description

Compute the lead solution for a target moving at speed_mps along angle_deg (see module docs for the datum) at initial range range_m.

Runs ONE wind-aware solve past the range (with outbound headroom), interpolates time of flight from its points, and fixed-point iterates the intercept range for radial motion. Errors are typed (LeadError).