card_sample_max_range_m

Function card_sample_max_range_m 

Source
pub fn card_sample_max_range_m(end_m: f64) -> f64
Expand description

How far out a card’s trajectory must be solved and sampled, given the furthest row it asked for (end_m). Meters in, meters out.

The headroom past the last row is load-bearing, not a leftover. The sampling grid is anchored at zero with a fixed CARD_SAMPLE_INTERVAL_M spacing, so the last grid point inside a span is the largest multiple of that interval the span contains: a span ending only 10 % past the last requested row leaves less than one whole cell of headroom as soon as end_m drops below ten intervals (~10 yd), and the last grid point then lands SHORT of the last row. That row is genuinely unsampled, and the card correctly declines to invent it — which is how a request as ordinary as a 5.1 yd card ended up with no rows at all.

Trimming the 10 % — reading it as vestigial because the row-spacing grid it once fed is gone — widens that hole rather than closing it. The floor is what closes it: at least one whole grid cell beyond the last row, so a flight that gets there is always sampled there.