calculate_true_velocity_local

Function calculate_true_velocity_local 

Source
pub fn calculate_true_velocity_local(
    measured_drop_mil: f64,
    range_yd: f64,
    bc: f64,
    drag_model: DragModelArg,
    mass_gr: f64,
    diameter_in: f64,
    zero_distance_yd: f64,
    sight_height_in: f64,
    temperature_f: f64,
    pressure_inhg: f64,
    humidity: f64,
    altitude_ft: f64,
    bc_segments: &Option<Vec<BCSegmentData>>,
) -> Result<TrueVelocityLocalResult, Box<dyn Error>>
Expand description

Calculate the effective muzzle velocity that reproduces measured_drop_mil at range_yd, via binary search over the real trajectory solver (the classic single-observation true-velocity path).

Returns a TrueVelocityLocalResult carrying the fitted velocity (fps), the iteration count, the signed final residual in MIL (positive = the model still predicts more drop than measured), the model-predicted drop at the returned velocity, and a "high"/"medium"/"low" confidence label — see the field docs on TrueVelocityLocalResult for the exact banding.

Errors on degenerate inputs (range_yd non-positive or non-finite, measured_drop_mil non-finite) and on any trajectory-solver failure.