From cada00d54e9a3cc61d9540685d1ff0192bc8623f Mon Sep 17 00:00:00 2001 From: leubeem Date: Wed, 17 Jun 2026 21:56:07 +0200 Subject: [PATCH] fix(pm): forward arrival/shared variables to the backend session MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit backendVariables was a departure-shaped subset, so arrival flows (IFR and VFR) ignored the selected flight and ran on YAML defaults for runway, QNH, surface wind, aircraft type, cruise level and assigned squawk — even though the engine generates them. Forward those (with name mapping qnh_hpa→qnh, acf_type→ aircraft_type, cruise_flight_level→cruise_level). Also fixes taxi/tower on departure, which use runway/qnh/surface_wind. Co-Authored-By: Claude Opus 4.8 --- app/pages/pm.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/pages/pm.vue b/app/pages/pm.vue index 3c313d7..8bc813c 100644 --- a/app/pages/pm.vue +++ b/app/pages/pm.vue @@ -3012,6 +3012,17 @@ const startMonitoring = async (flightPlan: any, scenario: Scenario) => { sid: v.sid || 'UNKNOWN1A', initial_altitude: String(v.initial_altitude_ft ?? 5000), squawk: String(v.squawk ?? '2000'), + // Shared / arrival variables. The engine generates these, but they were not + // being forwarded — so arrival flows (and taxi/tower on departure) fell back + // to YAML defaults and ignored the selected flight. Names are mapped to the + // backend flow conventions (qnh_hpa→qnh, acf_type→aircraft_type, …). + runway: v.runway || '25R', + qnh: String(v.qnh_hpa ?? '1013'), + surface_wind: v.surface_wind || '250/08', + taxi_route: v.taxi_route || 'A, B', + aircraft_type: v.acf_type || 'A320', + cruise_level: v.cruise_flight_level || 'FL360', + assigned_squawk: String(v.squawk ?? '2000'), // All airport frequencies — available to every flow in the chain. delivery_freq: v.delivery_freq || '121.950', ground_freq: v.ground_freq || '121.800',