Skip to main content

Class: Autopilot<Config>

An Autopilot.

Type parameters

NameType
Configextends APConfig = APConfig

Constructors

constructor

new Autopilot<Config>(bus, flightPlanner, config, stateManager): Autopilot<Config>

Creates an instance of the Autopilot.

Type parameters

NameType
Configextends APConfig = APConfig

Parameters

NameTypeDescription
busEventBusThe event bus.
flightPlannerFlightPlanner<any>This autopilot's associated flight planner.
configConfigThis autopilot's configuration.
stateManagerAPStateManagerThis autopilot's state manager.

Returns

Autopilot<Config>

Defined in

src/sdk/autopilot/Autopilot.ts:196

Properties

_apValues

Protected Readonly _apValues: Object

Type declaration

NameType
apApproachModeOnSubject<boolean>
approachHasGPSubject<boolean>
approachIsActiveSubject<boolean>
capturedAltitudeSubject<number>
cdiIdstring
cdiSourceSubject<Readonly<NavSourceId>>
isSelectedSpeedInMachSubject<boolean>
lateralActiveSubject<APLateralModes>
lateralArmedSubject<APLateralModes>
maxBankAngleSubject<number>
maxBankIdSubject<number>
nav1HasGsSubject<boolean>
nav2HasGsSubject<boolean>
nav3HasGsSubject<boolean>
nav4HasGsSubject<boolean>
selectedAltitudeSubject<number>
selectedFlightPathAngleSubject<number>
selectedHeadingSubject<number>
selectedIasSubject<number>
selectedMachSubject<number>
selectedPitchSubject<number>
selectedVerticalSpeedSubject<number>
simRateSubject<number>
verticalActiveSubject<APVerticalModes>
verticalArmedSubject<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


Readonly navToNavManager: undefined | NavToNavManager | NavToNavManager2

This autopilot's nav-to-nav transfer manager.

Defined in

src/sdk/autopilot/Autopilot.ts:125


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

NameTypeDescription
set?booleanis 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

NameTypeDescription
modeAPVerticalModesis 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

APLateralModes

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

APLateralModes

default lateral mode

Defined in

src/sdk/autopilot/Autopilot.ts:1328


getDefaultVerticalMode

getDefaultVerticalMode(): APVerticalModes

Get the default vertical mode from APConfig

Returns

APVerticalModes

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

NameTypeDescription
modeAPLateralModesis 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

NameTypeDescription
dataAPModePressEventis 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

NameTypeDescription
modeAPLateralModesis 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

NameTypeDescription
modeAPVerticalModesis 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

NameTypeDescription
modeAPVerticalModesis 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

NameTypeDescription
modeAPVerticalModesis 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

NameTypeDescription
dataAPModePressEventis the AP Vertical Mode Event Data

Returns

void

Defined in

src/sdk/autopilot/Autopilot.ts:385