技术文档

GPWS and the stall alert (build 74)

此页为项目的英文技术文档原文。 docs/GPWS.md

Zibo's GPWS is zibomod's own C++ code: Gpws with clear_gpws_flag, reset_gpws_alt and gpws_blank_sound, and the SYS TEST button and FLAP / GEAR / TERR inhibit switch commands. The PFD's stall band (the red/black barber band at the low end of the speed tape) is zibomod's PFD_stall_system, along with its stall warning test buttons. Both are translated with the Systems loop (tools/re/gen_sys.sh, sys_functions.txt → wasm/src/core/sys/sys_gen.*).

Checked against Zibo#

  • Oracle scenario xphost/test/sci/gpws_trace.json (tools/re/gpws_scenario.py). Every global of Gpws is traced around zibomod's Systems -> Gpws (host groups tail / gpws_out), and every global of PFD_stall_system around MainFlightLoopCallback -> PFD_stall_system (stall / lnav), every frame. The scenario covers:
    • the GPWS test;
    • an approach with gear down and flaps 30: altitude callouts, minimums (MINS set), below the glideslope (MMRs on an ILS);
    • bank angle 38 / 43 / 50°;
    • sink rate at 5000 ft/min;
    • terrain closure (RA falling at a constant altitude);
    • too low;
    • windshear (the wind turning 35° in a second at 45 kt);
    • low airspeed and the stall;
    • a descent after takeoff.
  • wasm/test/test_gpws_replay.cpp: identical on all 13785 samples. Among them: PULL UP 1168, TERRAIN 240, SINK RATE 288, WINDSHEAR 46, GLIDESLOPE 770, bank angle 524, low airspeed 1373, the stall band 11184, minimums 690, the 500 ft callout 540.
  • Not reached by the scenario: TOO LOW GEAR / FLAPS and DON'T SINK. Zibo arms them only in its takeoff / go-around state, which follows the FMS's flight phase; the static oracle aircraft does not get there. The code is the same translation; it is just not exercised by this scenario.
  • wasm/test/test_fms.cpp gpws_alerts_in_the_systems: bank angle, PULL UP, low airspeed and the stall band, and the GEAR inhibit switch, through the whole module.

Inputs#

What zibomod's Gpws reads elsewhere comes from the other translations:

  • The AFDS's: go-around, flight phase, MMR and NAV deviations, air data and wind.
  • The EFIS module's minimums: RADIO / BARO, DH, and its amber / green state.
  • The NAV receivers' glideslope (the realism model's, docs/ILS_REALISM.md).
  • The speeds module's minimum speed.
  • The stall alert's own copies: the AFDS's angle of attack and the minimum speed.
  • Zibo's option defaults (callouts) as the oracle has them.

Not modelled:

  • GLS.
  • The terrain look-ahead (gpws_terr_warn −1 as in the oracle; the terrain display is batch 2).
  • The weather radar's predictive windshear.

Cockpit and displays#

  • GPWS SYS TEST is held (short test on release, long test after 2 s). The FLAP / GEAR / TERR inhibit switches and their guards, and the two stall warning test buttons (held), work as Zibo's, with their L:vars animating the model.
  • The PFD's PULL UP / WINDSHEAR, bank angle, low airspeed and stall band, and the DH minimum flag are L:LU737_DU_* (tools/re/du_exports.py).

Not done#

  • The aural alerts (Zibo's sounds): sounds are not done yet.
  • The GPWS / BELOW G/S lights on the panel.