Skip to main content

a32nx.lua

Location

samples/practical/a32nx.lua

Description

a32nx.lua

This script was written for FlyByWire A32NX.
This is more complex than the above two scripts. This script provides the integrated virtual cockpit which contains physical operable units such as buttons and knobs, touch controllable units on the monitor, and popped out window contents such as PFD.
This script includes several sub-module scripts, and it also uses several bitmap images to render each operable units.

In this script, you can see the following example usage of fsmapper in addition to g1000_x56.lua case.

  • Observing the aircraft status represented by RPN script
  • Drawing graphics on the screen
  • Handling the touch events and mouse events occurred on the screen

This script defines following 6 views. Every view consist a MSFS popped out instrument window and self rendered operable gauges.

Popped out instrumentsSelf rendered operable units
1PFDFCU display
buttons on the FCU
BARO indicator
2NDbuttons and toggle switches on the EFIS control unit
auto brake buttons
etc
3Upper ECAMengine mode selectors, master engine switch and engine status indicators
APU control switches
battery control switches and voltage indicators
4Lower ECAMECAM page selector buttons
5MCDUMCDU buttons
6EFB-

The width of every view except EFB is a half width of the SimHID monitor width. So two views can be displayed simultaneously side by side.
By pressing soft-keys placed at bottom of SimHID G1000, two views to show can be specified.
And the switches placed on the left end and the right end of SimHID G1000 housing (AUX switches) can also control views to show. When you operate the AUX switch up or down, it will sequentially switch between three preset left-right view combinations. Pressing the AUX switch toggles between EFB display mode and other instrument display modes.

a32nx scripting

The pushbuttons rendered on each view can be operated by tapping them. The toggle switches include engine master switches and the selector knobs can be operated by flicking them. The correspondence between SimHID G1000 operations and A32NX operations are shown below.

SimHID G1000 operationsA32NX operations
NAV volume knobSPD/Mac knob on FCU
The pull operation is emulated by a long press
NAV swap buttonPulling Speed Knob on FUC
HDG knobHDG/TRK knob on FCU
The pull operation is emulated by a long press
HDG buttonPulling HDG/TRK knob on FCU
AP buttonAP1 button on FCU
FD buttonFD button on EFIS
APR buttonAPPR button on FCU
ALT outer knobIncrease / Decrease altitude indicator on FCU by 1000 feet
ALT inner knobIncrease / Decrease altitude indicator on FCU by 100 feet
ALT knob push buttonPushing ALT knob on FCU
The pull operation is emulated by a long press
FLC buttonPulling ALT knob on FCU
COM volume knobV/S or FPA knob on FCU
The pull operation is emulated by a long press
COM swap buttonPulling V/S or FPA knob on FCU
COM knobFrequency selector knob on RMP panel
BARO knob rotationManipulation of the value displayed in the barometer reference window
BARO knob push buttonSwitching barometer reference mode between QNH and standard barometer reference
Range knob rotationRange selector switch on EFIS
Range knob joystickChanging the mode displayed on the respective ND
NAV inner knobAdjusting the brightness of PFD, ND, upper ECAM, and lower ECAM in sync
NAV outer knobAdjusting the brightness of both the weather rader image and the EGPWS terrain image on ND
FMS inner knobAdjusting the brightness of FCU display
FMS outer knobAdjusting the brightness of all glareshields in sync