pub fn parse_wind_direction(
token: &str,
) -> Result<ParsedWindDirection, WindDirectionParseError>Expand description
Parses one wind-direction token (MBA-1367): a bare number is DEGREES exactly as it
always was; marked clock forms are <H>oc (e.g. 3oc) and <H>h<MM> (e.g.
10h30), case-insensitive, mapping to (H % 12) * 30 + MM * 0.5 degrees in the
wind-FROM convention (12 o’clock = headwind = 0°, post-0.19.0). H must be 1-12 and
MM 0-59. The colon form <H>:<MM> is deliberately NOT accepted here — it is legal
only where a token cannot be colon-delimited grammar, i.e. standalone flags
(parse_wind_direction_standalone); inside --wind-segment, 10:30 keeps its
historical SPEED:ANGLE meaning.