Technical reference

Captain PFD (M4d)

docs/PFD.md

Zibo's captain PFD drawn from the 737-800's own PANEL_3D (display LU_DU_CPT_OUTBD: groups PFD Captain, RA Circ, Baro Radio DH, HUD Captain) with Zibo's bitmaps; Zibo draws nothing on the PFD with OpenGL.

  • Program: python3 tools/msfs/build_du.py PFD → avionics/src/instruments/PFD/panel.json (230 datarefs, 251 bitmaps). Renderer: avionics/src/panel3d (checked pixel-identical to the reference interpreter).
  • Instrument: lu737-pfd on VCockpit LU_DU_CPT_OUTBD, dark unless L:LU737_DU_CPT_OUTBD_PWR = 1.
  • Sources: avionics/src/du/PfdSources.ts (kinds as DuSource.ts). Oracle reference: xphost/test/sci/pfd_trace.json → avionics/test/data/pfd_oracle.json; test avionics/test/pfd_data.test.ts.
  • Expected look: docs/pfd_ground.png, pfd_cruise.png, pfd_approach.png (node scripts/render-du.mjs PFD).

Sources today (phase 1)#

Group Kind Source
IAS, altitude, VS, magnetic heading, RA, ground speed, baro setting, marker beacons exact MSFS A:vars (Zibo reads X-Plane's)
Pitch, bank, slip, ILS deviations / flags, Mach, IAS trend msfs MSFS A:vars; signs / scales to confirm in the sim
Speed / altitude drum digits, heading bug, track line, MCP speed / altitude bugs on the tapes exact Zibo's formulas (B738.glaresheild.lua: B738_pfd_tapes, PFD HDG BUG / TRACK LINE, B738_mcp_dial)
RA readout (2 / 10 / 20 ft steps, −4 … 3000), RA white box (10 s after first ≤ 2500 ft) exact zibomod B738_radio_height, Systems (oracle sweeps)
IRS alignment flags (ATT / HDG / GS), IRS source switch exact systems module (build 15)
Speed bands: minimum speed (red/black), maximum speed (barber pole), min / max manoeuvre (amber) and their show flags exact systems module speeds/ (build 16), port of B738_calc_min_max_spd (737-800); inputs from MSFS (see below)
EFIS control panel: MINS RADIO / BARO, MINS knob and RST, DH / MDA alert (3 s flashing, then amber), BARO knob, IN / HPA, STD with preselect, baro / STD boxes, MTRS, FPV switch exact systems module efis/ (build 17); the captain's setting is sent to MSFS altimeter 1
NAV radios (standby coarse / fine, transfer), MMR mode, VHF NAV source switch, station identification (6.5 s decoding), ILS / VOR line and DME line exact / msfs systems module nav/ (build 18); identification from MSFS reception (msfs)
MCP values (speed 100, heading 0, altitude 0, course 0) pending MCP / AFDS with M5
VNAV's speed window (pfd/spd_wup, spd_wdn) and the A/T wake-up flag exact the AFDS's own writes (systems_afds.cpp, build 68)
The SPD REF selector's V-speed display (pfd/vspeed*, v1_off_show, the knobs' animations) exact zibomod's Systems and CMD_spd_ref_* (sys/, build 68)
FPV symbol position, runway symbol, expanded localizer scale (loc_exp; GLS / FAC 0) exact Zibo's B738.glaresheild.lua (B738_nd, B738_pfd_runway, ils_radio_pfd) written out: avionics/src/du/GlareDisplay.ts (build 72)
Radio altitude dial, TCAS RA pitch limits (tcas_pfd_ra_*, both sides) exact zibomod's own values from the translated code, L:LU737_DU_* (build 72, tools/re/du_exports.py); TCAS translated in build 73 (docs/TCAS.md)
GPWS PULL UP / WINDSHEAR, bank angle, low airspeed, stall band, DH minimum exact zibomod's Gpws / PFD_stall_system translated, oracle-checked (build 74, docs/GPWS.md)
Display control panel, GLS / LOC failure flags, HUD pending later

Speed bands (build 16)#

wasm/src/core/speeds/speeds.*, published L:LU737_PFD_MIN_SPEED, _MIN_SPEED_SHOW, _MAX_SPEED, _MIN_MANEUVER_SPEED, _MIN_MANEUVER_SPEED_SHOW, _MAX_MANEUVER_SPEED, _MAX_MANEUVER_SPEED_SHOW, _MAX_SPD_KTS. Oracle differential trace xphost/test/sci/speeds_trace.json (ground, take-off roll, climb to FL400 at 74 t, bank ±45°, flaps 1 … 40, gear, touchdown): 0 mismatches over 2550 frames (sci_trace_speeds_matches_oracle).

Inputs in MSFS: flap handle (FLAPS HANDLE PERCENT = Zibo's lever 0 / 0.125 … 1), flap angle (MSFS trailing-edge angle mapped detent by detent onto Zibo's flight-model angles 4 / 7 / 11 / 14 / 17 / 27 / 32 / 48), gear position and handle, IAS, TAS and speed of sound (filtered at 0.5 /s as zibomod), weight, MSL altitude, bank, radio height, on ground. Stand-ins: Zibo's filtered angle of attack ← MSFS INCIDENCE ALPHA (only matters above 5.8°); FMS flight phase ← 0 and approach flaps ← 0 until the FMS (M5): with the FMS in the approach phase Zibo keeps the amber max-manoeuvre band at the next flap speed above 160 kt, the rewrite shows the high-speed margin there.

EFIS control panel (build 17)#

wasm/src/core/efis/efis.*: port of the PFD part of B738.glaresheild.lua (minimums / DH commands, up_dn_dh_pilot, RST, up_dn_baro_pilot, IN / HPA, STD, MTRS, FPV, B738_efis_baro, B738_baro_radio2, and B738_ap_system's minimums reset while DC standby and DC bus 2 are dead). Events (cockpit model): CAPT_BAROMETER, CAPT_BARO_IN_OR_HPA, CAPT_STD_PRESSURE, CAPT_DECISION_HEIGHT, MINIMUMS_SWITCH_CAPT, MINIMUMS_RESET, FLIGHT_PATH_VECTOR, CAPT_ALT_IN_METERS and the FO_ ones. Published L:LU737_EFIS_<value>_CAPT|_FO and the knob / switch / button animation states. The captain's altimeter setting goes to MSFS altimeter 1 (KOHLSMAN_SET) whenever it changes, as Zibo writes it into X-Plane, so MSFS's own baro changes (B key) are overwritten. Oracle trace xphost/test/sci/efis_trace.json: 0 mismatches, 0 frame shifts over 757 frames (sci_trace_efis_matches_oracle).

Not rewritten: the display control panel BOTH-ON positions and the baro sync option (each side acts on its own PFD), knob acceleration when held (MSFS sends one event per click), FMS transition altitude / level (18000 ft) and flight phase (0).

wasm/src/core/nav/nav_radio.*. Zibo's default panel is the classic NAV radio (MMR panels hidden: L:LU737_FMS_HIDE_MMR = 1). Standby tuning as X-Plane's (coarse 1 MHz 108 … 117 with wrap, fine 50 kHz within the MHz; the oracle host gives the same), transfer as zibomod CMD_nav1_freq_flip; MSFS's NAV 1 / 2 receivers are tuned to the panel (NAV1_RADIO_SET_HZ, NAV1_STBY_SET_HZ), so the default frequencies are Zibo's 108.00. MMR mode = vor_or_ils of the active frequency (ILS at 108.10 … 111.95 with odd tenths). Identification (B738_vor_sel): MSFS NAV HAS NAV stands in for X-Plane's nav type / signal / identifier; a new station is decoded for 6.5 s (frequency shown), then its identifier; LOC only vs ILS from NAV HAS GLIDE SLOPE (Zibo: its ILS database). The PFD line (pfd_ils): IHKA/000° / DME 6.2 (course 0 until the MCP). Not rewritten: MMR panels (Zibo option), FMS ILS tuning and its ID / course disagree, the expanded localizer (needs the AFDS VOR/LOC mode), ghost pointers (LNAV).

First officer PFD#

python3 tools/msfs/build_du.py PFD_FO → avionics/src/instruments/PFD_FO/panel.json (display LU_DU_FO_OUTBD: PFD FO, RA Circ FO, RA/BA, HUD groups; 232 datarefs). Instrument lu737-pfd-fo, dark unless L:LU737_DU_FO_OUTBD_PWR = 1. Sources: the captain's table plus PFD_FO_SOURCES (FO EFIS panel, IRS 2 flags, NAV 2 unless VHF NAV BOTH ON 1). The FO altitude is computed with the altimeter equation from MSFS's static pressure and the FO's setting (MSFS altimeter 2 is not driven). Oracle xphost/test/sci/pfd_fo_trace.json → avionics/test/data/pfd_fo_oracle.json; expected look docs/pfd_fo_approach.png.

Next#

  1. M5: MCP / AFDS / FMA / flight director / V-speeds.