Skip to main content

Class: GarminVNavUtils

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:12

A utility class for working with Garmin VNAV.

Constructors

Constructor

new GarminVNavUtils(): GarminVNavUtils

Returns

GarminVNavUtils

Methods

getDistanceToConstraint()

static getDistanceToConstraint(verticalPlan, constraintIndex, globalLegIndex, distanceAlongLeg): number

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:566

Gets the along-track distance, in meters, from a point along the flight plan to the end of a VNAV constraint.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
constraintIndexnumberThe index of the VNAV constraint to calculate the distance to.
globalLegIndexnumberThe global index of the flight plan leg along which the point to check lies.
distanceAlongLegnumberThe distance, in meters, from the start of the flight plan leg to the point to check.

Returns

number

The along-track distance, in meters, from the specified point to the end of the VNAV constraint.


getPathDesiredAltitude()

Call Signature

static getPathDesiredAltitude(verticalPlan, pathConstraintIndex, distance): number

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:602

Gets the desired altitude, in meters, along a descent path at a specific point.

Parameters
ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
pathConstraintIndexnumberThe index of the VNAV constraint defining the descent path.
distancenumberThe distance, in meters, from the point to check to the end of the VNAV constraint defining the descent path.
Returns

number

Call Signature

static getPathDesiredAltitude(verticalPlan, pathConstraintIndex, globalLegIndex, distanceAlongLeg): number

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:615

Gets the desired altitude, in meters, along a descent path at a specific point.

Parameters
ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
pathConstraintIndexnumberThe index of the VNAV constraint defining the descent path.
globalLegIndexnumberThe global index of the flight plan leg along which the point to check lies.
distanceAlongLegnumberThe distance, in meters, from the start of the flight plan leg to the point to check.
Returns

number

The desired altitude, in meters, along the descent path at the specified point.


getTocBocDetails()

static getTocBocDetails(verticalPlan, activeConstraintIndex, activeLegIndex, distanceAlongLeg, currentGroundSpeed, currentAltitude, currentVS, isMapr, out): TocBocDetails

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:386

Gets the VNAV TOC/BOC details for a vertical flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
activeConstraintIndexnumberThe index of the vertical constraint containing the active flight plan leg.
activeLegIndexnumberThe index of the active flight plan leg.
distanceAlongLegnumberThe distance the plane is along the active flight plan leg in meters.
currentGroundSpeednumberThe current ground speed, in knots.
currentAltitudenumberThe current indicated altitude in meters.
currentVSnumberThe current vertical speed in meters per minute.
isMaprbooleanWhether to get TOC/BOC details for the missed approach.
outTocBocDetailsThe object to which to write the TOC/BOC details.

Returns

TocBocDetails

The VNAV TOC/BOC details.


getTodBodDetails()

static getTodBodDetails(verticalPlan, activeConstraintIndex, activeLegIndex, distanceAlongLeg, currentAltitude, currentVS, out): GarminTodBodDetails

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:185

Gets the VNAV TOD/BOD details for a vertical flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
activeConstraintIndexnumberThe index of the VNAV constraint containing the active flight plan leg.
activeLegIndexnumberThe global index of the active flight plan leg.
distanceAlongLegnumberThe along-track distance from the start of the active flight plan leg to the airplane's position, in meters.
currentAltitudenumberThe current indicated altitude in meters.
currentVSnumberThe current vertical speed in meters per minute.
outGarminTodBodDetailsThe object to which to write the TOD/BOD details.

Returns

GarminTodBodDetails

The VNAV TOD/BOD details.


invalidateClimbConstraint()

static invalidateClimbConstraint(constraint, index, constraints, firstDescentConstraintIndex, priorMinAltitude, priorMaxAltitude): boolean

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:99

A function which checks whether a climb constraint should be invalidated.

Parameters

ParameterTypeDescription
constraintVNavConstraintA descent constraint.
indexnumberThe index of the constraint to check if it is already in the vertical flight plan. If the constraint is not already in the vertical flight plan (i.e. the constraint has been previously invalidated), then this value equals -(index + 1) where index is the index at which the constraint would appear in the vertical flight plan if it were included.
constraintsreadonly VNavConstraint[]The array of VNAV constraints currently in the vertical flight plan.
firstDescentConstraintIndexnumberThe index of the first descent constraint in the vertical flight plan, if one exists.
priorMinAltitudenumberThe most recent minimum altitude, in meters, defined by a VNAV constraint prior to the constraint to check. Only prior constraints connected to the constraint to check by a contiguous sequence of constraints of the same category (climb or missed approach) are included.
priorMaxAltitudenumberThe most recent maximum altitude, in meters, defined by a VNAV constraint prior to the constraint to check. Only prior constraints connected to the constraint to check by a contiguous sequence of constraints of the same category (climb or missed approach) are included.

Returns

boolean

Whether the specified climb constraint should be invalidated.


invalidateDescentConstraint()

static invalidateDescentConstraint(constraint, index, constraints, priorMinAltitude, priorMaxAltitude, requiredFpa, maxFpa): boolean

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:148

A function which checks whether a descent constraint should be invalidated.

Parameters

ParameterTypeDescription
constraintVNavConstraintA descent constraint.
indexnumberThe index of the constraint to check if it is already in the vertical flight plan. If the constraint is not already in the vertical flight plan, then this value equals -(index + 1) if it is not, where index.
constraintsreadonly VNavConstraint[]The array of VNAV constraints currently in the vertical flight plan.
priorMinAltitudenumberThe most recent minimum altitude, in meters, defined by a VNAV constraint prior to the constraint to check. Only prior constraints connected to the constraint to check by a contiguous sequence of descent constraints are included.
priorMaxAltitudenumberThe most recent maximum altitude, in meters, defined by a VNAV constraint prior to the constraint to check. Only prior constraints connected to the constraint to check by a contiguous sequence of descent constraints are included.
requiredFpanumberThe minimum flight path angle, in degrees, required to meet the maximum altitude of the constraint to check, assuming a descent starting from the constraint defining the most recent prior minimum altitude. Positive values indicate a descending path. If there is no required FPA because there is no defined prior minimum altitude or maximum altitude for the constraint to check, or if the constraint to check is higher than the prior minimum altitude, then this value will equal zero.
maxFpanumberThe maximum allowed flight path angle, in degrees. Positive values indicate a descending path.

Returns

boolean

Whether the specified descent constraint should be invalidated.


isLegVNavEligible()

static isLegVNavEligible(lateralLeg): boolean

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:18

Checks if a lateral flight plan leg is eligible for VNAV.

Parameters

ParameterTypeDescription
lateralLegLegDefinitionA lateral flight plan leg.

Returns

boolean

Whether the specified leg is eligible for VNAV.


shouldUseConstraint()

static shouldUseConstraint(lateralPlan, lateralLeg, globalLegIndex, segment, segmentLegIndex): boolean

Defined in: src/garminsdk/autopilot/vnav/GarminVNavUtils.ts:45

Checks whether an altitude constraint defined for a lateral flight plan leg should be used for VNAV.

Parameters

ParameterTypeDescription
lateralPlanFlightPlanThe lateral flight plan that hosts the altitude constraint.
lateralLegLegDefinitionThe lateral flight plan leg that hosts the altitude constraint.
globalLegIndexnumberThe global index of the lateral flight plan leg that hosts the altitude constraint.
segmentFlightPlanSegmentThe lateral flight plan segment containing the flight plan leg that hosts the altitude constraint.
segmentLegIndexnumberThe index of the lateral flight plan leg that hosts the altitude constraint in its containing segment.

Returns

boolean

Whether the altitude constraint defined for the specified lateral flight plan leg should be used for VNAV.