Skip to main content

Class: APStateManager

A class that manages the autopilot modes and autopilot mode states.

Constructors

constructor

new APStateManager(bus, apConfig): APStateManager

Creates an instance of the APStateManager.

Parameters

NameTypeDescription
busEventBusAn instance of the event bus.
apConfigAPConfigThis autopilot's configuration.

Returns

APStateManager

Defined in

src/sdk/autopilot/managers/APStateManager.ts:60

Properties

_isFlightDirectorCoPilotOn

Protected _isFlightDirectorCoPilotOn: Subject<boolean>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:43


_isFlightDirectorOn

Protected _isFlightDirectorOn: Subject<boolean>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:41


apConfig

Protected Readonly apConfig: APConfig

This autopilot's configuration.

Defined in

src/sdk/autopilot/managers/APStateManager.ts:60


apListenerRegistered

Protected apListenerRegistered: boolean = false

Defined in

src/sdk/autopilot/managers/APStateManager.ts:31


apMasterOn

apMasterOn: Subject<boolean>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:40


approachPressed

approachPressed: SubEventInterface<APStateManager, undefined | boolean>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:37


bus

Protected Readonly bus: EventBus

An instance of the event bus.

Defined in

src/sdk/autopilot/managers/APStateManager.ts:60


isAnyFlightDirectorOn

Readonly isAnyFlightDirectorOn: MappedSubject<[boolean, boolean], undefined | boolean>

Whether any of the flight directors are switched on. Only looks at FD1/pilot unless the APConfig.independentFds option is enabled.

Defined in

src/sdk/autopilot/managers/APStateManager.ts:49


isFlightDirectorCoPilotOn

isFlightDirectorCoPilotOn: Subscribable<boolean>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:44


isFlightDirectorOn

isFlightDirectorOn: Subscribable<boolean>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:42


keyEventManager

Protected Optional keyEventManager: KeyEventManager

Defined in

src/sdk/autopilot/managers/APStateManager.ts:27


lateralPressed

lateralPressed: SubEventInterface<APStateManager, APModePressEvent>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:35


stateManagerInitialized

stateManagerInitialized: Subject<boolean>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:33


verticalPressed

verticalPressed: SubEventInterface<APStateManager, APModePressEvent>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:36


vnavPressed

vnavPressed: SubEventInterface<APStateManager, boolean>

Defined in

src/sdk/autopilot/managers/APStateManager.ts:38

Methods

handleKeyIntercepted

handleKeyIntercepted(data): void

Handles an intercepted key event.

Parameters

NameTypeDescription
dataKeyEventDataThe event data.

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:119


initFlightDirector

initFlightDirector(): void

Initializes the flight director to a default value.

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:138


initialize

initialize(force?): void

Checks whether the AP State Manager has completed listerner steps, and if so, finishes initializing and then notifies Autopilot of the same.

Parameters

NameTypeDefault valueDescription
forcebooleanfalseforces the initialize

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:126


onAPListenerRegistered

onAPListenerRegistered(): void

A callback which is called when the autopilot listener has been registered.

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:77


onBeforeInitialize

onBeforeInitialize(): void

Method to override with steps to run before initialze method is run.

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:212


sendApModeEvent

sendApModeEvent(type, mode?, set?): void

Sends AP Mode Events from the Intercept to the Autopilot.

Parameters

NameTypeDescription
typeAPModeTypeis the AP Mode Type for this event
mode?APLateralModes | APVerticalModesis the mode to set/unset.
set?booleanis whether to actively set or unset this mode.

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:191


setFlightDirector

setFlightDirector(on): void

Sets the Flight Director State

Parameters

NameTypeDescription
onbooleanis wheter to set the FD On.

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:146


setupKeyIntercepts

setupKeyIntercepts(manager): void

Sets up key intercepts for the simulation autopilot key events.

Parameters

NameTypeDescription
managerKeyEventManagerThe key intercept manager.

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:113


toggleVnav

toggleVnav(): void

Toggles VNAV L Var value.

Returns

void

Defined in

src/sdk/autopilot/managers/APStateManager.ts:180