0% found this document useful (0 votes)
15 views20 pages

APGA

The document provides documentation on installing and using an autopilot gauge (APGA) in aircraft. It describes copying files to create the gauge, modifying configuration files, and communicating with the gauge by sending events (H) to control autopilot modes and read variables (L) for status. Standard events are defined to control autopilot functions like heading (HDG), navigation (NAV), altitude (ALT) hold and more from external applications.

Uploaded by

Rcd Gott
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views20 pages

APGA

The document provides documentation on installing and using an autopilot gauge (APGA) in aircraft. It describes copying files to create the gauge, modifying configuration files, and communicating with the gauge by sending events (H) to control autopilot modes and read variables (L) for status. Standard events are defined to control autopilot functions like heading (HDG), navigation (NAV), altitude (ALT) hold and more from external applications.

Uploaded by

Rcd Gott
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Autopilot gauge 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.

The APGA code is open source.


You can use it, modify it and deliver it in your aircraft package without any authorization from
PMS50.

Installing the APGA gauge in


your aircraft
Unique aircraft ident
You must define an IDENT of the form:

"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.

Copying the files


From the root of your aircraft package, create a folder named:

html_ui\Pages\VCockpit\Instruments\NavSystems\YOUR-IDENT

where YOUR-IDENT is your unique aircraft ident as defined above.


Copy the files named PMS_APGA.html, PMS50_APGA.js and PMS50_APGA_custom.js to this
newly created folder.

You will find these files in the Integration/Files/autopilot folder of the PMS50 main package.

Modifying the PMS50_APGA.html file


In your installed copy of the PMS50_APGA.html file, replace "MyCompany-MyAircraft" with your
own IDENT in the last 2 lines.

Modifying the PMS50_APGA_custom.js file


The PMS50_APGA_custom.js file can be modified to suit your needs. Usually, it's only necessary
to change the parameters but you may need to change the behavior too.
Please modify only the PMS50_APGA_custom.js file and keep unchanged the PMS50_APGA.js
file.

Installing the gauge in your panel.cfg


Your panel.cfg file must include the code to call the APGA hidden gauge.
Place the following code in your panel.cfg file:

[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

Where YOUR-IDENT is your unique aircraft ident as defined above.

And xx is to be replaced by the gauge number.

The texture name is a fake one because this gauge is hidden. You don't need to do anything
with your 3D tools.

Working with the APGA


This section gives the necessary events and variables for your autopilot panel to communicate
with the APGA.

Here is an example of such an autopilot panel:

This is the internal GTN750 autopilot panel page.


The code of this panel is open source. It can be found in the official GTN750 package at:

html_ui\Pms50\gtn750\Pages\VCockpit\Instruments\NavSystems\GPS\GTN750\js\autopilot.js

Building your gauge


Your autopilot gauge will call the APGA events when pressing a button.

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:

get instrumentAlias() { return "APGA"; }


Then check for the events in the onInteractionEvent method. Here is an example for the KAP140:

onInteractionEvent(_args) {

if (this.isElectricityAvailable()) {

let apOn = this.isAutopilotEngaged();

switch (_args[0]) {

case "KAP140_Push_HDG":

case "APGA_HDG":

if (apOn)

SimVar.SetSimVarValue("H:PMS50_APGA_AP_HDG", "number", 0);

break;

case "KAP140_Push_NAV":

case "APGA_NAV":

if (apOn)

SimVar.SetSimVarValue("H:PMS50_APGA_AP_NAV", "number", 0);

break;

case "KAP140_Push_APR":

case "APGA_APR":

if (apOn)

SimVar.SetSimVarValue("H:PMS50_APGA_AP_APR", "number", 0);

break;

......

Here is the standard H event list:

The standard events are the ones to be used for your external application or hardware (ex
SPAD.next or Stream Deck).

Event Description

Toggles the autopilot master. To be called when


H:APGA_AP
pressing the AP button.

Toggles the flight director. To be called when pressing


H:APGA_FD
the FD button.

Toggles the yaw damper. To be called when pressing


H:APGA_YD
the YD button.

Toggles the HDG mode. To be called when pressing


H:APGA_HDG
the HDG button.

Toggles the NAV mode. To be called when pressing


H:APGA_NAV
the NAV button.

Toggles the Approach mode. To be called when


H:APGA_APR
pressing the APP button.
Event Description

Toggles the back course mode. To be called when


H:APGA_REV
pressing the REV or BC button.

Toggles the altitude hold mode. To be called when


H:APGA_ALT
pressing the ALT button.

Toggles the vertical speed hold mode. To be called


H:APGA_VS
when pressing the VS button.

Toggles the flight level change mode. To be called


H:APGA_FLC
when pressing the FLC button.

H:APGA_LVL Toggles the wing leveler hold mode.

H:APGA_CGA Toggles the Go Around mode.

H:APGA_CLVL Toggles the combined LVL mode.

Toggles the arm mode for VS or FLC. To be called


H:APGA_ARM
when pressing the ARM button.

Nose up for VS, FLC and PITCH vertical modes. To be


H:APGA_UP
called when pressing the UP button.

Nose down for VS, FLC and PITCH vertical modes. To


H:APGA_DOWN
be called when pressing the DN button.

Increments the selected altitude by a small value. To


H:APGA_SEL_ALT_SMALL_INC be called when rotating the inner altitude selection
knob.

Increments the selected altitude by a large value. To


H:APGA_SEL_ALT_LARGE_INC be called when rotating the outer altitude selection
knob.

H:APGA_SEL_ALT_VERY_LARGE_INC Increments the selected altitude by a very large value.

Decrements the selected altitude by a small value. To


H:APGA_SEL_ALT_SMALL_DEC be called when rotating the inner altitude selection
knob.

Decrements the selected altitude by a large value. To


H:APGA_SEL_ALT_LARGE_DEC be called when rotating the outer altitude selection
knob.

H:APGA_SEL_ALT_VERY_LARGE_DEC Decrements the selected altitude by a very large value.

Increments the vertical speed by 100 feet/mn. To be


H:APGA_SEL_VS_SMALL_INC
called when rotating the inner VS select knob.
Event Description

Decrements the vertical speed by 100 feet/mn. To be


H:APGA_SEL_VS_SMALL_DEC
called when rotating the inner VS select knob.

Increments the vertical speed by 1000 feet/mn. To be


H:APGA_SEL_VS_LARGE_INC
called when rotating the outer VS select knob.

Decrements the vertical speed by 1000 feet/mn. To be


H:APGA_SEL_VS_LARGE_DEC
called when rotating the outer VS select knob.

call example "H:APGA_HDG" to engage the HDG mode.

Implementing the standard events in your gauge is a recommended option.

There are some APGA autopilot examples in the Integration/Files/autopilot/Examples of the


PMS50 main package.

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.

The altitude selection precision. The high


precision is 10 feet. The normal precision true or
highAltPrecision
is 100 feet. false
Default value: false

The altitude preselection mode. See values


altPreselMode
Default value: altPreselMode.auto below
Value /
Parameter Description
Unit

Set it to true if mechanical selector that


true or
noUpdatableAltitudeSelector can't be updated from APGA.
false
Default value: false

The way we set the initial vertical speed


See values
vsEngageMode when engaging the VS mode.
below
Default value: vsEngageMode.current

The VS value in feet when the


vsEngageModeDefaultValue vsEngageMode is vsEngageMode.default. feet
Default value: 500

The VS value to be used in the go around


feet per
gaVsValue combined mode.
minute
Default value: 700

The default lateral mode. Can be


defaultLateralMode lateralMode.roll or lateralMode.lvl. number
Default value: lateralMode.roll

The default vertical mode to engage


when arming in manual arm mode. Can
manualArmDefaultVerticalMode be verticalMode.none, verticalMode.vs or number
verticalMode.flc.
Default value: verticalMode.none

Use the current vertical speed to check


true or
useVsForArmedVerticalCheck the arming to the selected altitude.
false
Default value: true

Vs threshold to use when the


number.
useVsForArmedVerticalCheck parameter
vsThresholdForArmedVerticalCheck Between
is true. Keep it between 10 and 50.
10 and 50
Default value: 50

Target altitude threshold for the alert


targetAltitudeAlertThreshold phase. number
Default value: 1000

Target altitude threshold for the near


targetAltitudeNearThreshold phase. number
Default value: 300
Value /
Parameter Description
Unit

Target altitude threshold for the reached


targetAltitudeReachedThreshold phase. number
Default value: 20

Time out in second for clearing the


targetAltitudeReachedTimeOut reached phase to none. number
Default value: 5

Altitude locked value for unarmed state


when in manual arm mode. This value is
sent to the sim when the vertical mode is
unarmedAltituteLockValue feet
not armed allowing to use vertical mode
without arming.
Default value: 99000

Up/Down increment when in ALT mode


and pressing the UP/DN buttons. This
altModeUpDownIncrementValue allows a precise adjustment of the alt feet
mode altitude.
Default value: 20

altPreselMode
altPreselMode parameter values.

Mode Description Value

altPreselMode.none No altitude preselection 0

Altitude preselection with an automatic arming. This is the


altPreselMode.auto default mode. The autopilot panel doesn't have an arm 1
button.

Altitude preselection with a manual arming. The autopilot


altPreselMode.manual panel must have an arm button to arm the VS or FLC 2
modes

vsEngageMode
vsEngageMode parameter values.

Mode Description Value


Mode Description Value

No specifc VS value. The VS engage value is set by the


vsEngageMode.none 0
autopilot manager (stock or WTT).

vsEngageMode.reset VS is set to 0. 1

VS is set to the value defined in the


vsEngageMode.default vsEngageModeDefaultValue parameter. The sign depends 2
of your current and target altitude.

vsEngageMode.current VS is set to the current vertical speed. 3

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.

Example: "H:PMS50_APGA_AP_ALT" is to be sent when pressing the ALT button.

Event Description

Toggles the autopilot master. To be called when pressing the


AP_AP
AP button.

Toggles the flight director. To be called when pressing the FD


AP_FD
button.

Toggles the yaw damper. To be called when pressing the YD


AP_YD
button.

Toggles the HDG mode. To be called when pressing the HDG


AP_HDG
button.

Toggles the NAV mode. To be called when pressing the NAV


AP_NAV
button.

Toggles the Approach mode. To be called when pressing the


AP_APR
APP button.

Toggles the back course mode. To be called when pressing the


AP_REV
REV or BC button.
Event Description

Toggles the altitude hold mode. To be called when pressing the


AP_ALT
ALT button.

Toggles the vertical speed hold mode. To be called when


AP_VS
pressing the VS button.

Toggles the flight level change mode. To be called when


AP_FLC
pressing the FLC button.

AP_LVL Toggles the wing leveler hold mode.

Toggles the Go Around mode. The Go Around mode is a


combined roll and pitch mode where the lateral mode is
maintained to a zero bank angle and vertical mode is set to a
AP_CGA VS value defined in the parameters. The Go Around mode can
be used for takeoff, for missed approach and for climbing. If
there is an automatic arming to a selected altitude, this one is
activated in Go Around mode.

Toggles the combined LVL mode. The combined LVL mode


maintains a zero bank angle and a zero vertical speed. It can be
AP_CLVL
used as an alternative to the ALT mode in case of turbulences.
You can find this mode in the Garmin 605 autopilot.

Toggles the arm mode for VS or FLC. To be called when


AP_ARM
pressing the ARM button. The Arm management is an option.

Toggles the arm mode for VS or FLC with a given selected


altitude. The selected altitude must be set in the
L:PMS50_APGA_ALTITUDE_PRESEL_VALUE variable (in feet)
AP_ARM_PRESEL before sending the event. To be called when pressing the ARM
button and if you aircraft doesn't provide a knob for altitude
selection (ex mechanical selector). The Arm management is an
option.

Nose up for VS, FLC and PITCH vertical modes. To be called


when pressing the UP button.
AP_UP In VS mode this increases the VS by 100 feet/mn. In FLC mode
this decreases the speed by 1 knot. In PITCH mode, the current
pitch is decreased by 0.2 degrees.
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.

Increments the selected altitude by a small value (10 or 100


SEL_ALT_SMALL_INC depending of the precision parameter). To be called when
rotating the inner altitude selection knob.

Increments the selected altitude by a large value (100 or 1000


SEL_ALT_LARGE_INC depending of the precision parameter). To be called when
rotating the outer altitude selection knob.

Increments the selected altitude by a very large value (1000 or


SEL_ALT_VERY_LARGE_INC
10000 depending of the precision parameter).

Decrements the selected altitude by a small value (10 or 100


SEL_ALT_SMALL_DEC depending of the precision parameter). To be called when
rotating the inner altitude selection knob.

Decrements the selected altitude by a large value (100 or 1000


SEL_ALT_LARGE_DEC depending of the precision parameter). To be called when
rotating the outer altitude selection knob.

Decrements the selected altitude by a very large value (1000 or


SEL_ALT_VERY_LARGE_DEC
10000 depending of the precision parameter).

Increments the vertical speed by 100 feet/mn. To be called


SEL_VS_SMALL_INC when rotating the inner VS select knob. Don't use this event for
the UP button. Use AP_UP instead.

Decrements the vertical speed by 100 feet/mn. To be called


SEL_VS_SMALL_DEC when rotating the inner VS select knob. Don't use this event for
the DN button. Use AP_DOWN instead.

Increments the vertical speed by 1000 feet/mn. To be called


SEL_VS_LARGE_INC when rotating the outer VS select knob. Don't use this event for
the UP button. Use AP_UP instead.

Decrements the vertical speed by 1000 feet/mn. To be called


SEL_VS_LARGE_DEC when rotating the outer VS select knob. Don't use this event for
the DN button. Use AP_DOWN instead.

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.

Example: "L:PMS50_APGA_HDG_BUTTON_STATE" returns the state of the HDG button.

Variable Description Type

RUNNING The APGA module is installed an is running. boolean

AP Autopilot master state. boolean

FD Flight director state. boolean

YD Yaw damper state. boolean

Autopilot button state. May be used to


AP_BUTTON_STATE boolean
display the button active state.

Flight director button state. May be used to


FD_BUTTON_STATE boolean
display the button active state.

Yaw damper button state. May be used to


YD_BUTTON_STATE boolean
display the button active state.

HDG button state. May be used to display


HDG_BUTTON_STATE boolean
the button active state.

NAV button state. May be used to display


the button active state. Can be also used
NAV_BUTTON_STATE boolean
for displaying a global NAV mode
annunciator.

APR button state. May be used to display


the button active state. Can be also used
APR_BUTTON_STATE boolean
for displaying a global APR mode
annunciator.

REV (BC) button state. May be used to


REV_BUTTON_STATE boolean
display the button active state.

ALT button state. May be used to display


ALT_BUTTON_STATE boolean
the button active state.

VS button state. May be used to display


VS_BUTTON_STATE boolean
the button active state.

FLC button state. May be used to display


FLC_BUTTON_STATE boolean
the button active state.
Variable Description Type

GA (Go Around) button state. May be used


GA_BUTTON_STATE boolean
to display the button active state.

LVL (Combined LVL) button state. May be


LVL_BUTTON_STATE boolean
used to display the button active state.

ARM button state. May be used to display


ARM_BUTTON_STATE boolean
the button active state.

Tells if the ARM button can be activated or


CAN_ARM boolean
not.

Tells if the UP and DN buttons can be


UP_DOWN_BUTTON_VALID boolean
activated or not.

The current engaged lateral mode. See the


ACTIVE_LATERAL_MODE number
list below.

The current engaged vertical mode. See


ACTIVE_VERTICAL_MODE number
the list below.

The current armed lateral mode. See the


ARMED_LATERAL_MODE number
list below.

The current armed vertical mode. See the


ARMED_VERTICAL_MODE number
list below.

The current armed vertical mode for


altitude. May be used instead of the
ARMED_VERTICAL_MODE variable if your
ARMED_ALTITUDE_MODE number
GPS has separate status for the altitude
and approach armed modes. Can be
0(none) or 3(ALT).

The current armed vertical mode for


approach. May be used instead of the
ARMED_VERTICAL_MODE variable if your
ARMED_APPROACH_MODE number
GPS has separate status for the altitude
and approach armed modes. Can be
0(none) or 4(GS) or 5(GP).

The selected altitude phase. See the list


SELECTED_ALTITUDE_PHASE number
below.

SELECTED_ALTITUDE The selected altitude. feet

CAPTURED_ALTITUDE The captured altitude in ALT mode. feet


Variable Description Type

Tells if the captured altitude is valid for


CAPTURED_ALTITUDE_VALID boolean
display.

SELECTED_VS The selected vertical speed. feet/minute

SELECTED_AIRSPEED The selected airspeed. knots

NEED_TRIM_INDICATOR The TRIM indicator. boolean

NEED_TRIM_UP_INDICATOR The TRIM UP arrow indicator. boolean

NEED_TRIM_DOWN_INDICATOR The TRIM DOWN arrow indicator. boolean

feet per
NEED_TRIM_VALUE The need trim value.
minute

Lateral and Vertical modes


You can use the lateral and vertical modes (current or armed) for updating the autopilot
indicator panel.

Lateral modes
Active lateral mode

The current lateral mode is returned by the "L:PMS50_APGA_ACTIVE_LATERAL_MODE" variable.

Mode Description Value

None No mode. 0

ROLL Roll mode. 1

HDG HDG mode. 2

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.

BC Back course mode. 6

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).

LVL Wing leveler mode. 10

Combined Go around mode. The Go Around mode is a combined roll


and pitch mode where the lateral mode is maintained to a zero bank
angle and vertical mode is set to a VS value defined in the parameters.
CGA 11
The Go Around mode can be used for takeoff, for missed approach and
for climbing. If there is an automatic arming to a selected altitude, this
one is activated in Go Around mode.

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.

Active vertical mode

The current vertical mode is returned by the "L:PMS50_APGA_ACTIVE_VERTICAL_MODE"


variable.

Mode Description Value

None No mode. 0

PITCH Pitch mode. 1

VS VS mode. 2

ALT ALT mode. 3

GS GS mode. Vertical mode for an ILS approach. 4

GP GP mode. Vertical mode for an RNAV approach. 5

FLC Flight level change mode. 6

VNAV VNAV Mode. Not yet available. 7


Mode Description Value

Combined Go around mode. The Go Around mode is a combined roll and


pitch mode where the lateral mode is maintained to a zero bank angle and
vertical mode is set to a VS value defined in the parameters. The Go
CGA 8
Around mode can be used for takeoff, for missed approach and for
climbing. If there is an automatic arming to a selected altitude, this one is
activated in Go Around mode.

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.

Armed lateral mode

The armed lateral mode is returned by the "L:PMS50_APGA_ARMED_LATERAL_MODE" variable.

Mode Description Value

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.

BC Approach back course mode. 6

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.

Armed vertical mode

The armed vertical mode is returned by the "L:PMS50_APGA_ARMED_VERTICAL_MODE" variable.


Mode Description Value

None No mode. 0

ALT ALT mode. 3

GS GS mode. Vertical mode for an ILS approach. 4

GP GP mode. Vertical mode for an RNAV final approach. 5

Selected altitude phases (ALTS)


The current selected altitude phase is returned by the
"L:PMS50_APGA_SELECTED_ALTITUDE_PHASE" variable.

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.

Phase Description Value

None No phase. The ALTS is not armed 0

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.

Annunciator panel example


Indicator Variable and value for activating the annunciator

FLT DIR L:PMS50_APGA_FD = true

HDG SEL L:PMS50_APGA_ACTIVE_LATERAL_MODE = 2

ALT HOLD L:PMS50_APGA_ACTIVE_VERTICAL_MODE = 3

AP L:PMS50_APGA_AP = true

NAV L:PMS50_APGA_NAV_BUTTON_STATE = true

ARM L:PMS50_APGA_ARMED_LATERAL_MODE != 0

ALT ARM L:PMS50_APGA_SELECTED_ALTITUDE_PHASE = 1, 2 or 3

GO AROUND L:PMS50_APGA_ACTIVE_VERTICAL_MODE = 8

APPR L:PMS50_APGA_APR_BUTTON_STATE = true

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

BACK CRS L:PMS50_APGA_ACTIVE_LATERAL_MODE = 6

TRIM WARN L:PMS50_APGA_NEED_TRIM_INDICATOR = true

Nota: for GS CPLD you can also test "L:PMS50_APGA_ACTIVE_VERTICAL_MODE = 4 or


L:PMS50_APGA_ACTIVE_VERTICAL_MODE = 5" if you want to activate the indicator for both GS
and GP(RNAV) glide slope.

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).

You might also like