Skip to main content

Class: Esp

Defined in: src/garminsdk/esp/Esp.ts:90

A Garmin electronic stability and protection system.

Constructors​

Constructor​

new Esp(dataProvider, options): Esp

Defined in: src/garminsdk/esp/Esp.ts:174

Creates a new instance of Esp. The system is created in a paused state. Initializing the system and calling update() will resume it.

Parameters​

ParameterTypeDescription
dataProviderEspDataProviderA provider of ESP data.
optionsReadonly<EspOptions>Options with which to configure the system.

Returns​

Esp

Properties​

engagementTimeFraction​

readonly engagementTimeFraction: Subscribable<number>

Defined in: src/garminsdk/esp/Esp.ts:166

The amount of time this system spent engaged during the engagement time window, as a fraction of the window length. If engagement time is not tracked, then this value is always equal to zero.


engagementTimeWindow​

readonly engagementTimeWindow: number

Defined in: src/garminsdk/esp/Esp.ts:159

The length of the window, in seconds, in which engagement time is tracked, or 0 if engagement time is not tracked.


operatingMode​

readonly operatingMode: Subscribable<EspOperatingMode>

Defined in: src/garminsdk/esp/Esp.ts:136

This system's current operating mode.


pitchAxisForce​

readonly pitchAxisForce: Subscribable<number>

Defined in: src/garminsdk/esp/Esp.ts:145

The force applied to the pitch control axis by this system, scaled such that a force of magnitude one is the amount of force required to deflect the control axis from the neutral position to maximum deflection (on either side). Positive force deflects the control axis to command an increase in pitch angle (i.e. increase downward pitch).


rollAxisForce​

readonly rollAxisForce: Subscribable<number>

Defined in: src/garminsdk/esp/Esp.ts:153

The force applied to the roll control axis by this system, scaled such that a force of magnitude one is the amount of force required to deflect the control axis from the neutral position to maximum deflection (on either side). Positive force deflects the control axis to command an increase in roll angle (i.e. increase leftward roll).

Methods​

addModule()​

addModule(module): void

Defined in: src/garminsdk/esp/Esp.ts:227

Adds a module to this system. If the module has already been added, then this method does nothing. If the module shares an ID with any module already added to this system, then the previously added module will be removed before the new module is added.

Parameters​

ParameterTypeDescription
moduleEspModuleThe module to add.

Returns​

void

Throws​

Error if this system has been destroyed or has been initialized.


destroy()​

destroy(): void

Defined in: src/garminsdk/esp/Esp.ts:561

Destroys this system. Once destroyed, this system can no longer be initialized, updated, or manipulated.

Returns​

void


getAllModules()​

getAllModules(): readonly EspModule[]

Defined in: src/garminsdk/esp/Esp.ts:201

Gets an array containing all modules that have been added to this system.

Returns​

readonly EspModule[]

An array containing all modules that have been added to this system.


getModule()​

getModule(id): undefined | EspModule

Defined in: src/garminsdk/esp/Esp.ts:210

Gets a module with a given ID that has been added to this system.

Parameters​

ParameterTypeDescription
idstringThe ID of the module to get.

Returns​

undefined | EspModule

The module added to this system that has the specified ID, or undefined if there is no such module.


init()​

init(): void

Defined in: src/garminsdk/esp/Esp.ts:254

Initializes this system. Once the system is initialized, it can be updated by calling update().

Returns​

void

Throws​

Error if this system has been destroyed.


pause()​

pause(): void

Defined in: src/garminsdk/esp/Esp.ts:539

Pauses this system. The system will be resumed the next time update() is called.

Returns​

void

Throws​

Error if this system has been destroyed.


setFailed()​

setFailed(failed): void

Defined in: src/garminsdk/esp/Esp.ts:311

Sets whether this system has failed.

Parameters​

ParameterTypeDescription
failedbooleanWhether this system has failed.

Returns​

void

Throws​

Error if this system has been destroyed.


setInterrupt()​

setInterrupt(interrupt): void

Defined in: src/garminsdk/esp/Esp.ts:298

Sets whether pilot action is preventing this system from being engaged.

Parameters​

ParameterTypeDescription
interruptbooleanWhether pilot action is preventing this system from being engaged.

Returns​

void

Throws​

Error if this system has been destroyed.


setMaster()​

setMaster(on): void

Defined in: src/garminsdk/esp/Esp.ts:282

Sets the master state of this system.

Parameters​

ParameterTypeDescription
onbooleanThe state to set: true to turn the system on, and false to turn the system off.

Returns​

void

Throws​

Error if this system has been destroyed.


update()​

update(): void

Defined in: src/garminsdk/esp/Esp.ts:346

Updates this system.

Returns​

void

Throws​

Error if this system has been destroyed.