Skip to main content

Class: JetFadec

Defined in: src/sdk/fadec/JetFadec.ts:104

A FADEC for turbojets. Controls engine throttle based on throttle lever position and other inputs.

Extended by​

Constructors​

Constructor​

new JetFadec(bus, modes, throttleInfos, desiredThrottleMin, desiredThrottleMax): JetFadec

Defined in: src/sdk/fadec/JetFadec.ts:134

Constructor.

Parameters​

ParameterTypeDefault valueDescription
busEventBusundefinedThe event bus.
modesreadonly JetFadecMode[]undefinedThe modes supported by this FADEC, ordered from highest to lowest priority.
throttleInfosreadonly JetFadecThrottleInfo[]undefinedAn array containing information pertaining to the throttles controlled by this FADEC. The order of modes in the array determines their priority during mode selection. On every update cycle, the FADEC iterates through the modes array in order, calling accept() on each mode until a value of true is returned. Therefore, modes positioned earlier in the array have a higher priority for selection.
desiredThrottleMinnumber-100The min value to limit the desiredThrottle by. Defaults to -100.
desiredThrottleMaxnumber100The max value to limit the desiredThrottle by. Defaults to 100.

Returns​

JetFadec

Properties​

bus​

protected readonly bus: EventBus

Defined in: src/sdk/fadec/JetFadec.ts:135

The event bus.


desiredThrottleMax​

protected readonly desiredThrottleMax: number = 100

Defined in: src/sdk/fadec/JetFadec.ts:139

The max value to limit the desiredThrottle by. Defaults to 100.


desiredThrottleMin​

protected readonly desiredThrottleMin: number = -100

Defined in: src/sdk/fadec/JetFadec.ts:138

The min value to limit the desiredThrottle by. Defaults to -100.


engineStates​

protected readonly engineStates: Record<number, JetFadecEngineState>

Defined in: src/sdk/fadec/JetFadec.ts:119


lastModes​

protected readonly lastModes: (JetFadecMode | null)[]

Defined in: src/sdk/fadec/JetFadec.ts:121


modes​

protected readonly modes: readonly JetFadecMode[]

Defined in: src/sdk/fadec/JetFadec.ts:136

The modes supported by this FADEC, ordered from highest to lowest priority.


publisher​

protected readonly publisher: Publisher<FadecEvents>

Defined in: src/sdk/fadec/JetFadec.ts:108


throttleInfos​

protected readonly throttleInfos: readonly JetFadecThrottleInfoInternal[]

Defined in: src/sdk/fadec/JetFadec.ts:110


throttleLeverPositionValues​

protected readonly throttleLeverPositionValues: readonly ConsumerValue<number>[]

Defined in: src/sdk/fadec/JetFadec.ts:112


MSFS_STANDARD_SEA_LEVEL_TEMP_RANKINE​

protected readonly static MSFS_STANDARD_SEA_LEVEL_TEMP_RANKINE: 518.69 = 518.69

Defined in: src/sdk/fadec/JetFadec.ts:106

Methods​

onUpdate()​

protected onUpdate(dt): void

Defined in: src/sdk/fadec/JetFadec.ts:225

A method called when this FADEC is updated.

Parameters​

ParameterTypeDescription
dtnumberThe elapsed real time, in milliseconds, since the last update.

Returns​

void


setMode()​

protected setMode(index, mode): void

Defined in: src/sdk/fadec/JetFadec.ts:297

Sets a FADEC mode for a throttle.

Parameters​

ParameterTypeDescription
indexnumberThe index of the throttle in this FADEC's throttle list.
modeJetFadecMode | nullThe mode to set.

Returns​

void


start()​

start(frequency): void

Defined in: src/sdk/fadec/JetFadec.ts:176

Turns this FADEC on. If this FADEC is already running, then it will be turned off before turning on again with the specified frequency.

Parameters​

ParameterTypeDescription
frequencynumberThe frequency, in hertz, at which this FADEC will update.

Returns​

void


stop()​

stop(): void

Defined in: src/sdk/fadec/JetFadec.ts:187

Turns this FADEC off.

Returns​

void


updateEngineStates()​

protected updateEngineStates(): void

Defined in: src/sdk/fadec/JetFadec.ts:233

Updates the states for this FADEC's engines.

Returns​

void


updateThrottle()​

protected updateThrottle(index, dt): void

Defined in: src/sdk/fadec/JetFadec.ts:261

Updates a throttle.

Parameters​

ParameterTypeDescription
indexnumberThe index of the throttle in this FADEC's throttle list.
dtnumberThe elapsed time, in milliseconds, since the last update.

Returns​

void


updateThrottles()​

protected updateThrottles(dt): void

Defined in: src/sdk/fadec/JetFadec.ts:250

Updates this FADEC's engine throttles.

Parameters​

ParameterTypeDescription
dtnumberThe elapsed real time, in milliseconds, since the last update.

Returns​

void