Skip to main content

Module moving_target

Module moving_target 

Source
Expand description

Moving-target lead calculation (MBA-1287).

Computes the hold (“lead”) required to hit a target moving at constant speed along a straight ground track, using the engine’s own wind-aware time of flight.

§Conventions (locked — see CLI_USAGE.md “Moving-Target Lead”)

  • angle_deg is the direction of target TRAVEL relative to the line of sight: 0 = directly away (outbound), 90 = full crossing left→right, 180 = directly toward (inbound), 270 = crossing right→left.
  • Positive lead = hold in the target’s direction of travel (right for 90°).
  • lead_mil = lead/range·1000; lead_moa = lead/range·3438.0 — the CLI dial convention shared with the dope-card/come-up tables (MBA-724), so MOA/MIL is exactly 3.438, not the exact-angle 3437.7467.
  • The lead is PURE target motion, additive to the wind-corrected hold: time of flight comes from the wind-aware solve, but wind drift itself stays in the wind column of your dope, not in the lead.
  • Non-perpendicular motion changes the intercept distance; calculate_lead iterates R = R₀ + v_radial·TOF(R) until the correction is below 0.1 m and reports TOF/angular lead at the corrected (intercept) range.

Structs§

LeadComponents
Pure angular/linear lead from an already-known time of flight (no solve).
LeadSolution
Full lead solution from calculate_lead.

Enums§

LeadError
Typed failure modes for calculate_lead.

Constants§

MIL_PER_UNIT_RATIO
Milliradian hold per unit offset/range ratio.
MOA_PER_UNIT_RATIO
MOA hold per unit offset/range ratio — the engine’s CLI dial convention (MBA-724), deliberately 3438.0 (not 3437.7467) to match every printed table.

Functions§

calculate_lead
Compute the lead solution for a target moving at speed_mps along angle_deg (see module docs for the datum) at initial range range_m.
lead_from_tof
Pure lead math from a known time of flight — shared by calculate_lead and the PDF dope-card path (which already has per-row TOF from its sampled trajectory). Uses the small-angle linear ratio lead/range, matching every other hold table.