Abstract Class: APStateManager
Defined in: src/sdk/autopilot/managers/APStateManager.ts:32
A class that manages the autopilot modes and autopilot mode states.
Extended by
Constructors
Constructor
new APStateManager(
bus
,apConfig
):APStateManager
Defined in: src/sdk/autopilot/managers/APStateManager.ts:84
Creates an instance of the APStateManager.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | An instance of the event bus. |
apConfig | APConfig | This autopilot's configuration. |
Returns
APStateManager
Properties
_isFlightDirectorCoPilotOn
protected
_isFlightDirectorCoPilotOn:Subject
<boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:70
_isFlightDirectorOn
protected
_isFlightDirectorOn:Subject
<boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:68
apConfig
protected
readonly
apConfig:APConfig
Defined in: src/sdk/autopilot/managers/APStateManager.ts:84
This autopilot's configuration.
apListenerRegistered
protected
apListenerRegistered:boolean
=false
Defined in: src/sdk/autopilot/managers/APStateManager.ts:37
apMasterOn
apMasterOn:
Subject
<boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:67
approachPressed
approachPressed:
SubEventInterface
<APStateManager
,undefined
|boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:64
bus
protected
readonly
bus:EventBus
Defined in: src/sdk/autopilot/managers/APStateManager.ts:84
An instance of the event bus.
flightDirectorStateSimVars
protected
readonly
flightDirectorStateSimVars:object
Defined in: src/sdk/autopilot/managers/APStateManager.ts:41
1
1:
string
='AUTOPILOT FLIGHT DIRECTOR ACTIVE:1'
2
2:
string
='AUTOPILOT FLIGHT DIRECTOR ACTIVE:2'
isAnyFlightDirectorOn
readonly
isAnyFlightDirectorOn:MappedSubject
<[boolean
,boolean
],boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:73
Whether any flight director is switched on.
isFlightDirectorCoPilotOn
isFlightDirectorCoPilotOn:
Subscribable
<boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:71
isFlightDirectorOn
isFlightDirectorOn:
Subscribable
<boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:69
keyEventManager?
protected
optional
keyEventManager:KeyEventManager
Defined in: src/sdk/autopilot/managers/APStateManager.ts:39
lateralPressed
lateralPressed:
SubEventInterface
<APStateManager
,APModePressEvent
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:62
stateManagerInitialized
readonly
stateManagerInitialized:Subscribable
<boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:60
Whether this manager has been initialized.
verticalPressed
verticalPressed:
SubEventInterface
<APStateManager
,APModePressEvent
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:63
vnavPressed
vnavPressed:
SubEventInterface
<APStateManager
,boolean
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:65
Methods
awaitApListenerRegistered()
protected
awaitApListenerRegistered():Promise
<void
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:126
Waits until the Coherent autopilot listener has been registered and this.onAPListenerRegistered()
has finished
executing.
Returns
Promise
<void
>
A Promise which is fulfilled when the Coherent autopilot listener has been registered and
this.onAPListenerRegistered()
has finished executing.
awaitKeyEventManagerReady()
protected
awaitKeyEventManagerReady():Promise
<KeyEventManager
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:135
Waits until the key event manager has been retrieved and this.onKeyEventManagerReady()
has finished executing.
Returns
Promise
<KeyEventManager
>
A Promise which is fulfilled when the key event manager has been retrieved and
this.onKeyEventManagerReady()
has finished executing.
handleKeyIntercepted()
abstract
protected
handleKeyIntercepted(data
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:187
Handles an intercepted key event.
Parameters
Parameter | Type | Description |
---|---|---|
data | KeyEventData | The event data. |
Returns
void
initFlightDirector()
protected
initFlightDirector():void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:225
Initializes the flight director to a default value.
Returns
void
initialize()
initialize():
Promise
<void
>
Defined in: src/sdk/autopilot/managers/APStateManager.ts:194
Initializes this manager. If this manager has already been initialized, then this method does nothing.
Returns
Promise
<void
>
A Promise which will be fulfilled when the manager has been initialized. If the manager has already been initialized, then the Promise will be fulfilled immediately.
onAfterUpdate()
onAfterUpdate():
void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:310
A method that is called on every autopilot update cycle after the autopilot directors are updated.
Returns
void
onAPListenerRegistered()
protected
onAPListenerRegistered():void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:142
A callback which is called when the Coherent autopilot listener has been registered.
Returns
void
onBeforeInitialize()
protected
onBeforeInitialize():void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:361
Method to override with steps to run before initialze method is run.
Returns
void
onBeforeUpdate()
onBeforeUpdate():
void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:271
A method that is called on every autopilot update cycle before the autopilot directors are updated.
Returns
void
onFlightDirectorSimStateChanged()
protected
onFlightDirectorSimStateChanged(index
,state
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:295
Responds to when the sim state of a flight director changes.
Parameters
Parameter | Type | Description |
---|---|---|
index | 1 | 2 | The index of the flight director whose state changed. |
state | boolean | The flight director's new state. |
Returns
void
onKeyEventManagerReady()
protected
onKeyEventManagerReady(manager
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:164
A callback which is called when the key event manager has been retrieved.
Parameters
Parameter | Type | Description |
---|---|---|
manager | KeyEventManager | The key event manager. |
Returns
void
pendSimFlightDirectorState()
protected
pendSimFlightDirectorState(index
,state
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:264
Pends a flight director state to push to the sim.
Parameters
Parameter | Type | Description |
---|---|---|
index | 1 | 2 | The index of the flight director for which to pend the state. |
state | boolean | The state to pend. |
Returns
void
pushPendingFlightDirectorStateToSim()
protected
pushPendingFlightDirectorStateToSim(index
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:319
Pushes the pending state of a flight director to the sim.
Parameters
Parameter | Type | Description |
---|---|---|
index | 1 | 2 | The index of the flight director for which to push the pending state. |
Returns
void
sendApModeEvent()
protected
sendApModeEvent(type
,mode?
,set?
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:340
Sends AP Mode Events from the Intercept to the Autopilot.
Parameters
Parameter | Type | Description |
---|---|---|
type | APModeType | is the AP Mode Type for this event |
mode? | number | is the mode to set/unset. |
set? | boolean | is whether to actively set or unset this mode. |
Returns
void
setFlightDirector()
setFlightDirector(
state
,index?
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:236
Sets the flight director state.
Parameters
Parameter | Type | Description |
---|---|---|
state | boolean | The state to set: true = on, false = off. |
index? | 2 | 1 | The index of the flight director to set. If not defined, then the state of both flight directors will be set. This parameter is ignored if the autopilot is not configured with independent flight directors, in which case the state of both flight directors will always be set. |
Returns
void
setFlightDirectorState()
protected
setFlightDirectorState(index
,state
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:255
Sets the state of a flight director.
Parameters
Parameter | Type | Description |
---|---|---|
index | 1 | 2 | The index of the flight director to set. |
state | boolean | The state to set. |
Returns
void
setupFlightDirectorKeyIntercepts()
protected
setupFlightDirectorKeyIntercepts(manager
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:173
Sets up key intercepts necessary for managing the sim's flight director state.
Parameters
Parameter | Type | Description |
---|---|---|
manager | KeyEventManager | The key event manager. |
Returns
void
setupKeyIntercepts()
abstract
protected
setupKeyIntercepts(manager
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:181
Sets up key intercepts for the simulation autopilot key events.
Parameters
Parameter | Type | Description |
---|---|---|
manager | KeyEventManager | The key event manager. |
Returns
void
toggleVnav()
protected
toggleVnav():void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:329
Toggles VNAV L Var value.
Returns
void
updateFlightDirectorStateFromSim()
protected
updateFlightDirectorStateFromSim(index
):void
Defined in: src/sdk/autopilot/managers/APStateManager.ts:280
Updates this manager's tracked flight director state from the sim.
Parameters
Parameter | Type | Description |
---|---|---|
index | 1 | 2 | The index of the flight director to update. |
Returns
void