Expand description
Velocity / BC truing core (MBA-1343 Phase A).
The multi-observation joint MV+BC calibration (MBA-1316) extracted from the
CLI binary so non-CLI front ends (e.g. the WASM terminal) can reuse the
exact compute path. All rendering (table / JSON / CSV) stays with the front
ends; this module goes as far as building a MultiTruingReport. The
module is silent: it never writes to stdout/stderr, so progress reporting
is the caller’s job (see validate_truing_observations for how the CLI
sequences its progress line without double-reporting validation errors).
Structs§
- Multi
Truing Report - Final report produced by a multi-observation truing fit.
- True
Velocity Local Result - Result of the classic single-observation velocity truing
(
calculate_true_velocity_local). - Truing
Model Inputs V1 - Complete scalar-BC forward-model input used by the truing design and uncertainty APIs added in MBA-1346/MBA-1353.
- Truing
Observation - A single observed impact used for truing: range (internal yards) and the measured drop below line of sight expressed in the caller’s drop unit.
Enums§
- Drag
Model Arg - Drag-model selector for the truing commands, in the shape the CLI exposes
(a plain G1/G7 choice, lowercase-parsed by clap/the WASM terminal). It maps
onto the engine’s
DragModelinside the solvers; unlikeDragModelit deliberately offers only the two standard models the truing forward model supports. - Drop
Unit - Unit in which observed drops are supplied to (and residuals reported from)
true-velocity’s multi-observation joint calibration (MBA-1316). The historical single-observation path is always MIL, somilis the default and leaves that path byte-identical.
Functions§
- calculate_
true_ velocity_ local - Calculate the effective muzzle velocity that reproduces
measured_drop_milatrange_yd, via binary search over the real trajectory solver (the classic single-observationtrue-velocitypath). - fallback_
bullet_ length_ m - Resolve a bullet length (meters) for a bullet whose length the shooter did not supply (MBA-1135).
- parse_
truing_ observation - Parse an
--observed RANGE:DROPtoken. RANGE is in the caller’s distance units (yards imperial / meters metric) and is normalized to internal yards; DROP stays in the caller’s drop unit. Returns a user-facing error string on malformed input so the CLI can report cleanly instead of panicking. - run_
multi_ observation_ truing_ core - Orchestrate the multi-observation joint MV+BC calibration and build the
final
MultiTruingReport(MBA-1343: the compute half only — rendering stays with the caller). - validate_
truing_ observations - Validate a truing observation set: every range finite and positive, every
drop finite and non-zero, and no two observations at (numerically) the same
range.
run_multi_observation_truing_coreruns this itself, so callers don’t have to — it is public so a front end can pre-validate when it wants to sequence its own progress output strictly after validation (the native CLI prints its “Fitting N observations…” progress line only for sets that will actually be fitted). Error strings are the stable user-facing ones.