solve_for_dsf

Function solve_for_dsf 

Source
pub fn solve_for_dsf(
    inputs: &DsfSolveInputs,
    max_range_m: f64,
) -> Result<TrajectoryResult, String>
Expand description

Solve a DsfSolveInputs’s own trajectory for the dsf command’s derivation step (MBA-1357 Task 8), given plain values directly rather than a saved Profile — the JSON bridge cannot construct a Profile, and must not read one from disk.

This is the library half of what was main.rs’s private solve_profile_for_dsf. The CLI keeps its saved-profile path by converting a loaded profile into DsfSolveInputs (ALL of the profile fields the historical solve honored — see that struct’s own doc comment for exactly which, and which three are deliberately absent because they’re provably inert here) and delegating. A bridge caller with only a TruingModelInputsV1 can go through DsfSolveInputs::from instead — see that impl’s doc comment for the explicit defaults it assumes.

max_range_m is the solve envelope; inputs.zero_distance_yd (None = flat, no zero applied — see that field’s doc comment) supplies the zero.

Advanced physics toggles this struct has no field for (Magnus/Coriolis/spin-drift/ aerodynamic-jump/wind-shear/pitch-damping/precession/powder-sensitivity/cd_scale, plus twist rate/direction and bullet length — see DsfSolveInputs’s doc comment) stay off/neutral, matching solve_profile_for_dsf’s own historical behaviour for every profile-only command (come-ups, lead, mpbr).