APGA
APGA
documentation v1.11
Autopilot gauge APGA documentation v1.11
Introduction
Installing the APGA gauge in your aircraft
Unique aircraft ident
Copying the files
Modifying the PMS50_APGA.html file
Modifying the PMS50_APGA_custom.js file
Installing the gauge in your panel.cfg
Working with the APGA
Building your gauge
Parameters
Events
Status
Lateral and Vertical modes
Selected altitude phases (ALTS)
Annunciator panel example
APGA example
Copyright
Introduction
The PMS50 autopilot gauge (APGA) is a hidden gauge to be installed in the cockpit by aircraft
builders.
It's purpose is to simplify the work of building an autopilot panel by externalizing the autopilot
logic.
The idea is to define the panel on a buttons perspective: an autopilot panel is just a set of
buttons and/or knobs and eventually a screen to display the autopilot state.
The APGA directly manages the logic behind that. The work of the autopilot panel builder is
then limited to send the H event to the APGA corresponding to the buttons or knobs and to get
back some L variables to display the autopilot state.
The APGA has been tested with the Asobo stock and Working Title autopilot and flight plan
managers. Using the APGA will bring the WTT mode compatibility for the autopilot gauge.
The APGA is a standalone component completely independent of the GTN750 or any other
gauge.
"MyCompany-MyAircraft"
where MyCompany and MyAircraft must be replaced by your real names. Be sure to not use any
space nor special characters, only letters a to z, digits 0 to 9 and the '-' character.
This is to be sure to identify uniquely your files inside the virtual file system.
html_ui\Pages\VCockpit\Instruments\NavSystems\YOUR-IDENT
You will find these files in the Integration/Files/autopilot folder of the PMS50 main package.
[VCockpitxx]
size_mm=0,0
pixel_size=0,0
texture=$NONE
background_color=42,42,40
htmlgauge00=NavSystems/YOUR-IDENT/PMS50_APGA.html,0,0,0,0
The texture name is a fake one because this gauge is hidden. You don't need to do anything
with your 3D tools.
html_ui\Pms50\gtn750\Pages\VCockpit\Instruments\NavSystems\GPS\GTN750\js\autopilot.js
You can build your gauge in any language that allows sending H events and reading L variables.
It is strongly recommended to build your autopilot panel as an html gauge even if there is
no screen and to implement the standard H events as described below.
If your autopilot is an XML gauge, you can implement a hidden HTML gauge just to
manage the standard H events. Such an example can be found with the KMC321 in the
Integration/Files/autopilot/Examples folder of the PMS50 main package.
Using Html/Javascript for building your gauge is probably the simplest way. That requires just a
few lines of code.
In Javascript, your gauge will extend the BaseInstrument class.
It is recommended to set an instrument alias to "APGA". This will allow to use some "standard"
events to control the gauge from external application or hardware (ex SPAD.next or Stream
Deck).
To set the instrument alias, add the following function to your autopilot class:
onInteractionEvent(_args) {
if (this.isElectricityAvailable()) {
switch (_args[0]) {
case "KAP140_Push_HDG":
case "APGA_HDG":
if (apOn)
break;
case "KAP140_Push_NAV":
case "APGA_NAV":
if (apOn)
break;
case "KAP140_Push_APR":
case "APGA_APR":
if (apOn)
break;
......
The standard events are the ones to be used for your external application or hardware (ex
SPAD.next or Stream Deck).
Event Description
Parameters
The APGA provides some few parameters that can be changed by modifying them directly in
your delivered copy of the PMS50_APGA_custom.js file.
This is done in the constructor of the MY_APGA class.
Please do not change anything inside the PMS50_APGA.js file.
Parameter description
Value /
Parameter Description
Unit
1 to 10.
The frequency at which the APGA will
10 is the
updateFrequency update its state.
highest
Default value: 10
frequency.
altPreselMode
altPreselMode parameter values.
vsEngageMode
vsEngageMode parameter values.
vsEngageMode.reset VS is set to 0. 1
Events
The events are H events of the form "H:PMS50_APGA_EventName" where EventName is the
event name described below.
These events are used to communicate from your cockpit autopilot gauge to the hidden
APGA gauge. If you need control events from an external application or hardware (ex
SPAD.next or Stream Deck), it's better to use the standard events described in the chapter
"Building your gauge" above. Otherwise you may skip some part of the autopilot logic.
Event Description
Nose down for VS, FLC and PITCH vertical modes. To be called
when pressing the DN button.
AP_DOWN In VS mode this decreases the VS by 100 feet/mn. In FLC mode
this increases the speed by 1 knot. In PITCH mode, the current
pitch is increased by 0.2 degrees.
Status
The autopilot status is returned by the APGA in L variables for display purpose.
The L variables has the form "L:PMS50_APGA_VariableName" where VariableName is the name
given below.
feet per
NEED_TRIM_VALUE The need trim value.
minute
Lateral modes
Active lateral mode
None No mode. 0
GPS GPS mode. This is the NAV mode driven by the GPS. 3
VOR VOR mode. This is the NAV mode driven by VLOC with a VOR frequency. 4
LOC mode. This is the NAV mode driven by VLOC with a LOCALIZER
LOC 5
frequency.
Approach GPS mode. This is the Approach mode driven by the GPS
APRGPS 7
(RNAV approach).
Mode Description Value
Approach VOR mode. This is the Approach mode driven by VLOC (VOR
APRVOR 8
approach).
Approach LOC mode. This is the Approach mode driven by VLOC (ILS
APRLOC 9
approach).
Combined Level mode. The combined LVL mode maintains a zero bank
angle and a zero vertical speed. It can be used as an alternative to the
CLVL 12
ALT mode in case of turbulences. You can find this mode in the Garmin
605 autopilot.
Note: We have separate values for GPS, VOR and LOC. If you have a single NAV indicator,
this will be a logical or between GPS, VOR and LOC.
The same for approach modes and the APR indicator.
None No mode. 0
VS VS mode. 2
Combined Level mode. The combined LVL mode maintains a zero bank
angle and a zero vertical speed. It can be used as an alternative to the ALT
CLVL 9
mode in case of turbulences. You can find this mode in the Garmin 605
autopilot.
None No mode. 0
GPS GPS mode. This is the NAV mode driven by the GPS. 3
VOR VOR mode. This is the NAV mode driven by VLOC with a VOR frequency. 4
LOC mode. This is the NAV mode driven by VLOC with a LOCALIZER
LOC 5
frequency.
Approach GPS mode. This is the Approach mode driven by the GPS
APRGPS 7
(RNAV approach).
Approach VOR mode. This is the Approach mode driven by VLOC (VOR
APRVOR 8
approach).
Approach LOC mode. This is the Approach mode driven by VLOC (ILS
APRLOC 9
approach).
Note: We have separate values for GPS, VOR and LOC. If you have a single NAV indicator,
this will be a logical or between GPS, VOR and LOC.
The same for approach modes and the APR indicator.
None No mode. 0
These phases switch from one to the other in a consecutive order when a target altitude is
armed. The thresholds are defined as parameters. See above.
The ALTS is armed and the altitude to the target is greater than the alert
Engaged 1
threshold.
The ALTS is armed and the altitude to the target is between the alert and
Alert 2
near thresholds.
The ALTS is armed and the altitude to the target is less than the near
Near 3
threshold.
The vertical mode is ALT and the altitude to the target is greater than the
Ready 4
reached threshold.
The vertical mode is ALT and the altitude to the target is less than the
Reached 5
reached threshold. The Phase returns to None after a time out.
AP L:PMS50_APGA_AP = true
ARM L:PMS50_APGA_ARMED_LATERAL_MODE != 0
GO AROUND L:PMS50_APGA_ACTIVE_VERTICAL_MODE = 8
L:PMS50_APGA_ARMED_LATERAL_MODE = 0 and
CPLD (L:PMS50_APGA_NAV_BUTTON_STATE = true or
(L:PMS50_APGA_APR_BUTTON_STATE = true)
GS CPLD L:PMS50_APGA_ACTIVE_VERTICAL_MODE = 4
APGA example
You will find some autopilot APGA gauge examples in the Integration/Files/autopilot folder of
the PMS50 main package.
Copyright
The APGA code is open source.
You can use it, modify it and deliver it in your aircraft package without any authorization from
PMS50.
However, PMS50 will not provide any support if you modify the source code (except
parameters).