derive_dsf_point_from_solve_v1

Function derive_dsf_point_from_solve_v1 

Source
pub fn derive_dsf_point_from_solve_v1(
    result: &TrajectoryResult,
    range_m: f64,
    observed_drop: f64,
    drop_unit: DropUnit,
) -> Result<DsfPointResultV1, DsfServiceErrorV1>
Expand description

The post-solve half of a dsf point derivation: interpolation, Mach computation, both gates, and the DSF ratio, run against an ALREADY-SOLVED result (MBA-1357 Task 9).

Shared by derive_dsf_point_v1 (which solves from a bare TruingModelInputsV1) and the CLI’s saved-profile dsf command (which solves via the profile-rich DsfSolveInputs instead, preserving every field Task 8 fixed — see this module’s own doc comment) so the two callers’ arithmetic cannot drift apart.

range_m is the observation’s horizontal range in meters. The two gates carried over from the CLI exactly:

  • A supersonic observation (mach > DSF_MACH_CEILING) is an error — that’s true-velocity’s job, not DSF’s.
  • The “beyond Mach 1 AND beyond 90% of the solved range” case (a COMPOUND condition, not the 90% ratio alone) is a warning appended to the result’s warnings, not a failure.
  • A zero or non-finite predicted drop is an error; no DSF ratio exists.