Class: Epic2APStateManager
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:22
A Epic 2 autopilot state manager.
Extends
Constructors
Constructor
new Epic2APStateManager(
bus,apConfig):Epic2APStateManager
Defined in: 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
Epic2APStateManager
Inherited from
Properties
_isFlightDirectorCoPilotOn
protected_isFlightDirectorCoPilotOn:Subject<boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:70
Inherited from
APStateManager._isFlightDirectorCoPilotOn
_isFlightDirectorOn
protected_isFlightDirectorOn:Subject<boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:68
Inherited from
APStateManager._isFlightDirectorOn
apConfig
protectedreadonlyapConfig:APConfig
Defined in: sdk/autopilot/managers/APStateManager.ts:84
This autopilot's configuration.
Inherited from
apListenerRegistered
protectedapListenerRegistered:boolean=false
Defined in: sdk/autopilot/managers/APStateManager.ts:37
Inherited from
APStateManager.apListenerRegistered
apMasterOn
apMasterOn:
Subject<boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:67
Inherited from
approachPressed
approachPressed:
SubEventInterface<Epic2APStateManager,undefined|boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:64
Inherited from
APStateManager.approachPressed
bus
protectedreadonlybus:EventBus
Defined in: sdk/autopilot/managers/APStateManager.ts:84
An instance of the event bus.
Inherited from
epic2ApIntentionalDisengageEvent
epic2ApIntentionalDisengageEvent:
SubEventInterface<Epic2APStateManager,unknown>
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:28
epic2HeadingSyncEvent
epic2HeadingSyncEvent:
SubEventInterface<Epic2APStateManager,HeadingSyncPushed>
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:30
epic2VerticalEvent
epic2VerticalEvent:
SubEventInterface<Epic2APStateManager,PitchWheelTurned>
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:29
flightDirectorStateSimVars
protectedreadonlyflightDirectorStateSimVars:object
Defined in: sdk/autopilot/managers/APStateManager.ts:41
1
1:
string='AUTOPILOT FLIGHT DIRECTOR ACTIVE:1'
2
2:
string='AUTOPILOT FLIGHT DIRECTOR ACTIVE:2'
Inherited from
APStateManager.flightDirectorStateSimVars
hEventPattern
protectedreadonlyhEventPattern:RegExp
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:26
hEventPrefixes
protectedreadonlyhEventPrefixes:string[]
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:25
isAnyFlightDirectorOn
readonlyisAnyFlightDirectorOn:MappedSubject<[boolean,boolean],boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:73
Whether any flight director is switched on.
Inherited from
APStateManager.isAnyFlightDirectorOn
isFlightDirectorCoPilotOn
isFlightDirectorCoPilotOn:
Subscribable<boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:71
Inherited from
APStateManager.isFlightDirectorCoPilotOn
isFlightDirectorOn
isFlightDirectorOn:
Subscribable<boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:69
Inherited from
APStateManager.isFlightDirectorOn
keyEventManager?
protectedoptionalkeyEventManager:KeyEventManager
Defined in: sdk/autopilot/managers/APStateManager.ts:39
Inherited from
APStateManager.keyEventManager
lateralPressed
lateralPressed:
SubEventInterface<Epic2APStateManager,APModePressEvent>
Defined in: sdk/autopilot/managers/APStateManager.ts:62
Inherited from
stateManagerInitialized
readonlystateManagerInitialized:Subscribable<boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:60
Whether this manager has been initialized.
Inherited from
APStateManager.stateManagerInitialized
verticalPressed
verticalPressed:
SubEventInterface<Epic2APStateManager,APModePressEvent>
Defined in: sdk/autopilot/managers/APStateManager.ts:63
Inherited from
APStateManager.verticalPressed
vnavPressed
vnavPressed:
SubEventInterface<Epic2APStateManager,boolean>
Defined in: sdk/autopilot/managers/APStateManager.ts:65
Inherited from
Methods
awaitApListenerRegistered()
protectedawaitApListenerRegistered():Promise<void>
Defined in: 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.
Inherited from
APStateManager.awaitApListenerRegistered
awaitKeyEventManagerReady()
protectedawaitKeyEventManagerReady():Promise<KeyEventManager>
Defined in: 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.
Inherited from
APStateManager.awaitKeyEventManagerReady
disengageAutopilot()
disengageAutopilot(
abnormal):void
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:88
Disengage the autopilot, either normally or abnormally.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
abnormal | boolean | true | Whether the disconnect is abnormal. |
Returns
void
handleKeyIntercepted()
protectedhandleKeyIntercepted(__namedParameters):void
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:206
Handles an intercepted key event.
Parameters
| Parameter | Type | Description |
|---|---|---|
__namedParameters | KeyEventData | The event data. |
Returns
void
Overrides
APStateManager.handleKeyIntercepted
handleTrkModeChange()
protectedhandleTrkModeChange(trkActive):void
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:65
Handle switch between hdg and trk
Parameters
| Parameter | Type | Description |
|---|---|---|
trkActive | boolean | trk currently active? |
Returns
void
initFlightDirector()
protectedinitFlightDirector():void
Defined in: sdk/autopilot/managers/APStateManager.ts:225
Initializes the flight director to a default value.
Returns
void
Inherited from
APStateManager.initFlightDirector
initialize()
initialize():
Promise<void>
Defined in: 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.
Inherited from
onAfterUpdate()
onAfterUpdate():
void
Defined in: sdk/autopilot/managers/APStateManager.ts:310
A method that is called on every autopilot update cycle after the autopilot directors are updated.
Returns
void
Inherited from
onAPListenerRegistered()
protectedonAPListenerRegistered():void
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:36
A callback which is called when the Coherent autopilot listener has been registered.
Returns
void
Overrides
APStateManager.onAPListenerRegistered
onBeforeInitialize()
protectedonBeforeInitialize():void
Defined in: sdk/autopilot/managers/APStateManager.ts:361
Method to override with steps to run before initialze method is run.
Returns
void
Inherited from
APStateManager.onBeforeInitialize
onBeforeUpdate()
onBeforeUpdate():
void
Defined in: sdk/autopilot/managers/APStateManager.ts:271
A method that is called on every autopilot update cycle before the autopilot directors are updated.
Returns
void
Inherited from
onFlightDirectorSimStateChanged()
protectedonFlightDirectorSimStateChanged(index,state):void
Defined in: 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
Inherited from
APStateManager.onFlightDirectorSimStateChanged
onHEvent()
protectedonHEvent(event):void
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:367
Handles AP H Events (we only use this for events that do not have a corresponding K event we can trigger).
Parameters
| Parameter | Type | Description |
|---|---|---|
event | string | The event string. |
Returns
void
onKeyEventManagerReady()
protectedonKeyEventManagerReady(manager):void
Defined in: 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
Inherited from
APStateManager.onKeyEventManagerReady
pendSimFlightDirectorState()
protectedpendSimFlightDirectorState(index,state):void
Defined in: 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
Inherited from
APStateManager.pendSimFlightDirectorState
pushPendingFlightDirectorStateToSim()
protectedpushPendingFlightDirectorStateToSim(index):void
Defined in: 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
Inherited from
APStateManager.pushPendingFlightDirectorStateToSim
sendApModeEvent()
protectedsendApModeEvent(type,mode?,set?):void
Defined in: 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
Inherited from
APStateManager.sendApModeEvent
setFlightDirector()
setFlightDirector(
state,index?):void
Defined in: 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
Inherited from
APStateManager.setFlightDirector
setFlightDirectorState()
protectedsetFlightDirectorState(index,state):void
Defined in: 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
Inherited from
APStateManager.setFlightDirectorState
setupFlightDirectorKeyIntercepts()
protectedsetupFlightDirectorKeyIntercepts(manager):void
Defined in: 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
Inherited from
APStateManager.setupFlightDirectorKeyIntercepts
setupKeyIntercepts()
protectedsetupKeyIntercepts(manager):void
Defined in: workingtitle-instruments-epic2/shared/Autopilot/Epic2APStateManager.ts:111
Sets up key intercepts for the simulation autopilot key events.
Parameters
| Parameter | Type | Description |
|---|---|---|
manager | KeyEventManager | The key event manager. |
Returns
void
Overrides
APStateManager.setupKeyIntercepts
toggleVnav()
protectedtoggleVnav():void
Defined in: sdk/autopilot/managers/APStateManager.ts:329
Toggles VNAV L Var value.
Returns
void
Inherited from
updateFlightDirectorStateFromSim()
protectedupdateFlightDirectorStateFromSim(index):void
Defined in: 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