hold_point_in_reticle

Function hold_point_in_reticle 

Source
pub fn hold_point_in_reticle(
    drop_mil: f64,
    wind_mil: f64,
    magnification: f64,
    reticle: &ReticleDescription,
) -> Result<ReticleHold, ReticleError>
Expand description

Place a firing solution in a reticle (MBA-1361).

drop_mil is the angular drop below the line of sight (positive = below, i.e. the come-up the shooter would otherwise dial) and wind_mil the angular wind deflection (positive = the bullet goes RIGHT). magnification is the optic’s CURRENT setting.

The returned hold coordinates are TRUE angular and equal to the inputs (see the module header). The work this function does is the mark search: it scales the reticle’s marks into true angular space for the given magnification and focal plane, finds the nearest one, and reports whether the hold has run off the marked part of the reticle.

§Errors

ReticleError::NonPositiveMagnification for a non-physical magnification (on EVERY focal plane), ReticleError::NonPositiveReferenceMagnification for an SFP reticle with no usable calibration magnification, ReticleError::NonFiniteHold for a non-finite firing solution, and the ReticleDescription::validate errors for a malformed description.