Skip to main content

tolerance_envelope

Function tolerance_envelope 

Source
pub fn tolerance_envelope(
    base: &ResolvedSolveRequestV1,
    axes: &[InputAxis],
    range_m: f64,
    target: TargetGeometryV1,
    domains: &[(InputAxis, (f64, f64))],
) -> Result<ToleranceReportV1, KernelError>
Expand description

How far may each of axes drift from its own current value, one at a time, before the impact leaves target – see the module doc for the full contract, and especially “The central hazard” for what unbounded_in_domain/nominal_inside_target mean together.

domains supplies, for each axis in axes, the (lower, upper) bound to search within; see “Domains are validated up front, per axis” in the module doc.

§Errors

  • KernelError::Observation immediately, before any solve, if range_m is not finite or falls outside [0, base.shot.max_range_m] – the same check crate::error_budget::error_budget applies to its own ranges_m.
  • KernelError::InvalidDomain immediately, before any solve for that axis, if domains has no entry for one of axes, either bound is not finite, the lower bound is not strictly less than the upper, or the axis’s own current value does not sit strictly between them.
  • Otherwise, propagates any KernelError that is not one of the four structural refusals recorded in ToleranceReportV1::unavailable_axes instead – see “Unavailable axes” in the module doc.