Skip to main content

Class: JetFadec

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

Constructors

constructor

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

Constructor.

Parameters

NameTypeDefault 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

Defined in

src/sdk/fadec/JetFadec.ts:134

Properties

bus

Protected Readonly bus: EventBus

The event bus.

Defined in

src/sdk/fadec/JetFadec.ts:135


desiredThrottleMax

Protected Readonly desiredThrottleMax: number = 100

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

Defined in

src/sdk/fadec/JetFadec.ts:139


desiredThrottleMin

Protected Readonly desiredThrottleMin: number = -100

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

Defined in

src/sdk/fadec/JetFadec.ts:138


engineStates

Protected Readonly engineStates: Record<number, JetFadecEngineState>

Defined in

src/sdk/fadec/JetFadec.ts:119


lastModes

Protected Readonly lastModes: (null | JetFadecMode)[]

Defined in

src/sdk/fadec/JetFadec.ts:121


modes

Protected Readonly modes: readonly JetFadecMode[]

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

Defined in

src/sdk/fadec/JetFadec.ts:136


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

Static Protected Readonly MSFS_STANDARD_SEA_LEVEL_TEMP_RANKINE: 518.69

Defined in

src/sdk/fadec/JetFadec.ts:106

Methods

onUpdate

onUpdate(dt): void

A method called when this FADEC is updated.

Parameters

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

Returns

void

Defined in

src/sdk/fadec/JetFadec.ts:225


setMode

setMode(index, mode): void

Sets a FADEC mode for a throttle.

Parameters

NameTypeDescription
indexnumberThe index of the throttle in this FADEC's throttle list.
modenull | JetFadecModeThe mode to set.

Returns

void

Defined in

src/sdk/fadec/JetFadec.ts:291


start

start(frequency): void

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

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

Returns

void

Defined in

src/sdk/fadec/JetFadec.ts:176


stop

stop(): void

Turns this FADEC off.

Returns

void

Defined in

src/sdk/fadec/JetFadec.ts:187


updateEngineStates

updateEngineStates(): void

Updates the states for this FADEC's engines.

Returns

void

Defined in

src/sdk/fadec/JetFadec.ts:233


updateThrottle

updateThrottle(index, dt): void

Updates a throttle.

Parameters

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

Returns

void

Defined in

src/sdk/fadec/JetFadec.ts:261


updateThrottles

updateThrottles(dt): void

Updates this FADEC's engine throttles.

Parameters

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

Returns

void

Defined in

src/sdk/fadec/JetFadec.ts:250