pub fn resolve_station_pressure_with_mode(
pressure_hpa: f64,
altitude_m: f64,
mode: PressureReferenceMode,
) -> Option<f64>Expand description
Mode-aware counterpart of resolve_station_pressure (MBA-1397). Does NOT change that
function’s signature or behavior — PressureReferenceMode::Absolute is a pure
passthrough to it — so this is a new function alongside the original, not a replacement.
PressureReferenceMode::Qnh reduces pressure_hpa (interpreted as a QNH) to station
pressure via reduce_qnh_to_station_pressure and returns it as Some(..)
UNCONDITIONALLY, bypassing the default-sentinel ambiguity resolve_station_pressure must
use to infer omission from a bare f64. This matters: a QNH the caller explicitly declared
should never be silently re-interpreted as an omitted default merely because the REDUCED
number happens to land within the sentinel’s tolerance of the 1013.25 hPa sea-level
constant (a real, reachable case — e.g. a high-pressure day’s QNH reducing to ~1013 hPa at
a few hundred meters of elevation).