Skip to main content

Class: LNavUtils

Defined in: src/sdk/autopilot/lnav/LNavUtils.ts:8

A utility class for working with LNAV.

Constructors​

Constructor​

new LNavUtils(): LNavUtils

Returns​

LNavUtils

Methods​

getEventBusTopicSuffix()​

static getEventBusTopicSuffix<Index>(index): Index extends 0 ? "" : `_${Index}`

Defined in: src/sdk/autopilot/lnav/LNavUtils.ts:57

Gets the suffix for event bus topics published by a LNAV computer with a given index.

Type Parameters​

Type Parameter
Index extends number

Parameters​

ParameterTypeDescription
indexIndexThe index of the LNAV computer for which to get the suffix.

Returns​

Index extends 0 ? "" : `_${Index}`

The suffix for event bus topics published by a LNAV computer with the specified index.


getVectorsForTransitionMode()​

static getVectorsForTransitionMode(calc, mode, isSuspended): CircleVector[]

Defined in: src/sdk/autopilot/lnav/LNavUtils.ts:16

Gets the flight path vectors to navigate for a leg and a given transition mode.

Parameters​

ParameterTypeDescription
calcLegCalculationsThe calculations for a flight plan leg.
modeLNavTransitionModeA transition mode.
isSuspendedbooleanWhether sequencing is suspended.

Returns​

CircleVector[]

The flight path vectors to navigate for the given leg and transition mode.


isValidLNavIndex()​

static isValidLNavIndex(index): boolean

Defined in: src/sdk/autopilot/lnav/LNavUtils.ts:48

Checks whether an index is a valid LNAV computer index.

Parameters​

ParameterTypeDescription
indexnumberThe index to check.

Returns​

boolean

Whether the specified index is a valid LNAV computer index.


static lnavTrackingStateEquals(a, b): boolean

Defined in: src/sdk/autopilot/lnav/LNavUtils.ts:35

Checks whether two LNAV tracking states are equal.

Parameters​

ParameterTypeDescription
aLNavTrackingStateThe first state.
bLNavTrackingStateThe second state.

Returns​

boolean

Whether the two LNAV tracking states are equal.