pub fn wind_issue_warnings(
turns: &[DirectionTurn],
heights_msl_m: [f64; 2],
max_mach: Option<Peak>,
) -> Vec<IssueWarning>Expand description
The wind’s issue a flight meets (#8, ADR-201): the spans of a tabulated wind
over which its direction is interpolated between two levels (hpr_atmos::Wind::direction_turns)
where the direction still swings although a level is near calm, inside the flight’s heights.
A span counts when neither level’s speed is exactly 0 (a calm level takes its neighbor’s
direction, so nothing turns), at least one is at or below NEAR_CALM_WIND_M_S, their
directions differ, and the span reaches inside heights_msl_m, the flight’s lowest and highest
heights above mean sea level, as a wind is read: the ground and the highest point any body
reached (highest_height_m). A span that only touches either end doesn’t count: the wind
there is the end level’s own. Any NaN counts the way that warns. The spans that count are kept
in the warning, lowest first.
The swing’s sign depends on the levels and on which way the flight drifts through them: it turns a wind of the same speed, so where the other levels share one direction it can only shorten the drift’s sum, and where they turn it can lengthen it. A wind of the flight’s own that turns with no table reports no spans, so it meets none; so does a flight with no top Mach number.