Ticket 062 — Wind-Corrected Divert and Landing-Zone Energy¶
Status: Implemented (divert estimate; landing-zone energy remains TAS-only)¶
Problem¶
Both the landing-zone reachability check (estimator/execution/landing_zone.py)
and the divert route estimate (estimator/execution/divert.py) compute
energy cost as cruise_power_w × (distance_m / tas_mps) without wind
correction. In a 10 m/s headwind the actual ground speed can be half the
TAS, doubling the flight time and energy. This silently under-estimates
the divert energy, which can produce an is_feasible=true result for a
divert that would actually fail in a real headwind scenario.
Both functions carry docstring notes ("without wind correction") but there is no warning emitted and no machine-readable flag in the output.
Acceptance Criteria¶
compute_divert_estimateaccepts the current wind vector at the action point and applies a wind-triangle correction to compute ground speed and energy._divert_energy_whinlanding_zone.pyapplies the same correction.- When no wind provider is available the behaviour is unchanged (TAS-only, no regression).
- The divert energy field in
DivertRouteEstimateis correctly higher in a headwind scenario and correctly lower in a tailwind scenario. - At least 4 new tests verify headwind, tailwind, crosswind, and no-wind cases.
- The assumption text in the envelope ("TAS-based transit time without wind correction") is updated or removed for the affected code paths.
Scope¶
estimator/execution/divert.py— wind-corrected energy calculationestimator/execution/landing_zone.py— wind-corrected energyestimator/core/scenario.py—DivertRouteEstimatemay needwind_speed_mpsfield for provenancetests/test_divert_routing.py— new wind-aware tests
Notes¶
- The wind at the divert action point is available from the
EstimationContext.wind_provider. The scenario runner needs to pass this through. - Backwards compatibility: headwind cases will now show lower feasibility rates than before. Golden fixtures that involve divert scenario assertions may need regeneration.