Class: Autopilot<Config>
An Autopilot.
Type parameters
Name | Type |
---|---|
Config | extends APConfig = APConfig |
Constructors
constructor
• new Autopilot<Config
>(bus
, flightPlanner
, config
, stateManager
): Autopilot
<Config
>
Creates an instance of the Autopilot.
Type parameters
Name | Type |
---|---|
Config | extends APConfig = APConfig |
Parameters
Name | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
flightPlanner | FlightPlanner <any > | This autopilot's associated flight planner. |
config | Config | This autopilot's configuration. |
stateManager | APStateManager | This autopilot's state manager. |
Returns
Autopilot
<Config
>
Defined in
src/sdk/autopilot/Autopilot.ts:196
Properties
_apValues
• Protected
Readonly
_apValues: Object
Type declaration
Name | Type |
---|---|
apApproachModeOn | Subject <boolean > |
approachHasGP | Subject <boolean > |
approachIsActive | Subject <boolean > |
capturedAltitude | Subject <number > |
cdiId | string |
cdiSource | Subject <Readonly <NavSourceId >> |
isSelectedSpeedInMach | Subject <boolean > |
lateralActive | Subject <APLateralModes > |
lateralArmed | Subject <APLateralModes > |
maxBankAngle | Subject <number > |
maxBankId | Subject <number > |
nav1HasGs | Subject <boolean > |
nav2HasGs | Subject <boolean > |
nav3HasGs | Subject <boolean > |
nav4HasGs | Subject <boolean > |
selectedAltitude | Subject <number > |
selectedFlightPathAngle | Subject <number > |
selectedHeading | Subject <number > |
selectedIas | Subject <number > |
selectedMach | Subject <number > |
selectedPitch | Subject <number > |
selectedVerticalSpeed | Subject <number > |
simRate | Subject <number > |
verticalActive | Subject <APVerticalModes > |
verticalArmed | Subject <APVerticalModes > |
Defined in
src/sdk/autopilot/Autopilot.ts:157
altCapArmed
• Protected
altCapArmed: boolean
= false
Defined in
src/sdk/autopilot/Autopilot.ts:145
apValues
• Readonly
apValues: APValues
Defined in
src/sdk/autopilot/Autopilot.ts:185
autopilotInitialized
• Protected
autopilotInitialized: boolean
= false
Defined in
src/sdk/autopilot/Autopilot.ts:187
bus
• Protected
Readonly
bus: EventBus
The event bus.
Defined in
src/sdk/autopilot/Autopilot.ts:197
cdiSource
• Protected
cdiSource: Readonly
<NavSourceId
>
Defined in
src/sdk/autopilot/Autopilot.ts:138
config
• Protected
Readonly
config: Config
This autopilot's configuration.
Defined in
src/sdk/autopilot/Autopilot.ts:199
currentAltitude
• Protected
currentAltitude: number
= 0
Defined in
src/sdk/autopilot/Autopilot.ts:149
directors
• Readonly
directors: APDirectors
This autopilot's plane directors.
Defined in
src/sdk/autopilot/Autopilot.ts:122
flightPlanSynced
• Protected
flightPlanSynced: boolean
= false
Defined in
src/sdk/autopilot/Autopilot.ts:152
flightPlanner
• Protected
Readonly
flightPlanner: FlightPlanner
<any
>
This autopilot's associated flight planner.
Defined in
src/sdk/autopilot/Autopilot.ts:198
inClimb
• Protected
inClimb: boolean
= false
Defined in
src/sdk/autopilot/Autopilot.ts:148
lateralModeFailed
• Protected
lateralModeFailed: boolean
= false
Defined in
src/sdk/autopilot/Autopilot.ts:146
lateralModes
• Protected
lateralModes: Map
<APLateralModes
, PlaneDirector
>
Defined in
src/sdk/autopilot/Autopilot.ts:140
navToNavManager
• Readonly
navToNavManager: undefined
| NavToNavManager
| NavToNavManager2
This autopilot's nav-to-nav transfer manager.
Defined in
src/sdk/autopilot/Autopilot.ts:125
navToNavManagerToUse
• Protected
Readonly
navToNavManagerToUse: undefined
| NavToNavManager2
Defined in
src/sdk/autopilot/Autopilot.ts:127
requireApproachIsActiveForNavToNav
• Protected
requireApproachIsActiveForNavToNav: boolean
= true
Can be set to false in child classes to override behavior for certain aircraft.
Defined in
src/sdk/autopilot/Autopilot.ts:155
stateManager
• Readonly
stateManager: APStateManager
This autopilot's state manager.
Defined in
src/sdk/autopilot/Autopilot.ts:200
variableBankManager
• Readonly
variableBankManager: undefined
| Record
<any
, any
>
This autopilot's variable bank angle Manager.
Defined in
src/sdk/autopilot/Autopilot.ts:133
verticalAltitudeArmed
• Protected
verticalAltitudeArmed: APAltitudeModes
= APAltitudeModes.NONE
Defined in
src/sdk/autopilot/Autopilot.ts:143
verticalApproachArmed
• Protected
verticalApproachArmed: APVerticalModes
= APVerticalModes.NONE
Defined in
src/sdk/autopilot/Autopilot.ts:144
verticalModes
• Protected
verticalModes: Map
<APVerticalModes
, PlaneDirector
>
Defined in
src/sdk/autopilot/Autopilot.ts:142
vnavCaptureType
• Protected
vnavCaptureType: VNavAltCaptureType
= VNavAltCaptureType.None
Defined in
src/sdk/autopilot/Autopilot.ts:150
vnavManager
• Readonly
vnavManager: undefined
| VNavManager
This autopilot's VNav Manager.
Defined in
src/sdk/autopilot/Autopilot.ts:130
Methods
approachPressed
▸ approachPressed(set?
): void
Handles input from the State Manager when the APPR button is pressed.
Parameters
Name | Type | Description |
---|---|---|
set? | boolean | is whether this event commands a specific set |
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:513
checkModes
▸ checkModes(): void
Checks if all the active and armed modes are still in their proper state and takes corrective action if not.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1007
checkRollModeActive
▸ checkRollModeActive(): void
Checks if the sim AP is in roll mode and sets it if not.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1307
deactivateArmedOrActiveVerticalMode
▸ deactivateArmedOrActiveVerticalMode(mode
): boolean
Checks if a mode is active or armed and deactivates it.
Parameters
Name | Type | Description |
---|---|---|
mode | APVerticalModes | is the AP Mode to check. |
Returns
boolean
whether this mode was active or armed and subsequently disabled.
Defined in
src/sdk/autopilot/Autopilot.ts:486
getArmableApproachType
▸ getArmableApproachType(): APLateralModes
Returns the AP Lateral Mode that can be armed.
Returns
The AP Lateral Mode that can be armed.
Defined in
src/sdk/autopilot/Autopilot.ts:590
getDefaultLateralMode
▸ getDefaultLateralMode(): APLateralModes
Get the default lateral mode from APConfig
Returns
default lateral mode
Defined in
src/sdk/autopilot/Autopilot.ts:1328
getDefaultVerticalMode
▸ getDefaultVerticalMode(): APVerticalModes
Get the default vertical mode from APConfig
Returns
default vertical mode
Defined in
src/sdk/autopilot/Autopilot.ts:1340
handleApFdStateChange
▸ handleApFdStateChange(): void
Manages the FD state and the modes when AP/FD are off.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1269
initLateralModes
▸ initLateralModes(): void
Initializes the Autopilot with the available lateral modes from the config.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:704
initNavToNavManager
▸ initNavToNavManager(): void
Initializes the Autopilot with the available Nav To Nav Manager.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:831
initVNavManager
▸ initVNavManager(): void
Initializes the Autopilot with the available VNav Manager.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:847
initVerticalModes
▸ initVerticalModes(): void
Initializes the Autopilot with the available vertical modes from the config.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:870
isLateralModeActivatedOrArmed
▸ isLateralModeActivatedOrArmed(mode
): boolean
Checks if a mode is active or armed and optionally deactivates it.
Parameters
Name | Type | Description |
---|---|---|
mode | APLateralModes | is the AP Mode to check. |
Returns
boolean
whether this mode was active or armed and subsequently disabled.
Defined in
src/sdk/autopilot/Autopilot.ts:440
lateralPressed
▸ lateralPressed(data
): void
Handles input from the State Manager when a lateral mode button is pressed.
Parameters
Name | Type | Description |
---|---|---|
data | APModePressEvent | is the AP Lateral Mode Event Data |
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:338
manageAltitudeCapture
▸ manageAltitudeCapture(): void
Checks and sets the proper armed altitude mode.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1076
monitorAdditionalEvents
▸ monitorAdditionalEvents(): void
Additional events to be monitored (to be overridden).
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1262
monitorApSpeedValues
▸ monitorApSpeedValues(): void
Overridable method for setting the selected speed values for the A/P to follow.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1246
onAfterUpdate
▸ onAfterUpdate(): void
This method runs each update cycle after the update occurs.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:323
onBeforeUpdate
▸ onBeforeUpdate(): void
This method runs each update cycle before the update occurs.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:316
onInitialized
▸ onInitialized(): void
This method runs whenever the initialized state of the Autopilot changes.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:330
setAltHold
▸ setAltHold(): void
Method called when the ALT button is pressed.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:693
setLateralActive
▸ setLateralActive(mode
): void
Callback to set the lateral active mode.
Parameters
Name | Type | Description |
---|---|---|
mode | APLateralModes | is the mode being set. |
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:620
setVerticalActive
▸ setVerticalActive(mode
): void
Callback to set the vertical active mode.
Parameters
Name | Type | Description |
---|---|---|
mode | APVerticalModes | is the mode being set. |
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:648
setVerticalApproachArmed
▸ setVerticalApproachArmed(mode
): void
Callback to set the vertical approach armed mode.
Parameters
Name | Type | Description |
---|---|---|
mode | APVerticalModes | is the mode being set. |
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:684
setVerticalArmed
▸ setVerticalArmed(mode
): void
Callback to set the vertical armed mode.
Parameters
Name | Type | Description |
---|---|---|
mode | APVerticalModes | is the mode being set. |
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:669
togaPressed
▸ togaPressed(): void
Handles input from the State Manager when the TOGA button is pressed (K event AUTO_THROTTLE_TO_GA)
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:544
update
▸ update(): void
Update method for the Autopilot.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:300
updateModes
▸ updateModes(): void
Runs update on each of the active and armed modes.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1044
updateNavToNavManagerAfter
▸ updateNavToNavManagerAfter(): void
Updates this autopilot's nav-to-nav manager after directors have been updated.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1125
updateNavToNavManagerBefore
▸ updateNavToNavManagerBefore(): void
Updates this autopilot's nav-to-nav manager before directors have been updated.
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:1118
verticalPressed
▸ verticalPressed(data
): void
Handles input from the State Manager when a vertical mode button is pressed.
Parameters
Name | Type | Description |
---|---|---|
data | APModePressEvent | is the AP Vertical Mode Event Data |
Returns
void
Defined in
src/sdk/autopilot/Autopilot.ts:385