Skip to main content

Class: VNavUtils

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:15

A utility class for working with VNAV.

Constructors

Constructor

new VNavUtils(): VNavUtils

Returns

VNavUtils

Methods

altitudeConstraintDetailsEquals()

static altitudeConstraintDetailsEquals(a, b): boolean

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1802

Checks whether two altitude constraint details are equal.

Parameters

ParameterTypeDescription
aAltitudeConstraintDetailsThe first altitude constraint details.
bAltitudeConstraintDetailsThe second altitude constraint details.

Returns

boolean

Whether the two altitude constraint details are equal.


altitudeForDistance()

static altitudeForDistance(fpa, distance): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:157

Gets the change in altitude along a flight path angle for a given lateral distance traveled.

Parameters

ParameterTypeDescription
fpanumberThe flight path angle, in degrees. Positive values represent an ascending flight path.
distancenumberThe lateral distance traveled.

Returns

number

The change in altitude along the specified flight path angle for the specified lateral distance traveled, expressed in the same units as distance.


createConstraint()

static createConstraint(index, minAltitude, maxAltitude, name, type): VNavConstraint

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1676

Creates a new empty vertical flight plan constraint.

Parameters

ParameterTypeDefault valueDescription
indexnumberundefinedThe leg index of the constraint.
minAltitudenumberundefinedThe bottom altitude of the constraint.
maxAltitudenumberundefinedTHe top altitude of the constraint.
namestringundefinedThe name of the leg for the constraint.
type"direct" | "climb" | "descent" | "manual" | "missed"'descent'The type of constraint.

Returns

VNavConstraint

A new empty constraint.


createLeg()

static createLeg(segmentIndex, legIndex, name, distance): VNavLeg

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1701

Creates a new vertical flight plan leg.

Parameters

ParameterTypeDefault valueDescription
segmentIndexnumberundefinedThe segment index for the leg.
legIndexnumberundefinedThe index of the leg within the segment.
namestringundefinedThe name of the leg.
distancenumber0The leg distance.

Returns

VNavLeg

A new VNAV plan leg.


distanceForAltitude()

static distanceForAltitude(fpa, altitude): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:168

Gets the lateral distance traveled along a flight path angle for a given change in altitude.

Parameters

ParameterTypeDescription
fpanumberThe flight path angle, in degrees. Positive values represent an ascending flight path.
altitudenumberThe change in the altitude.

Returns

number

The lateral distance traveled along the specified flight path angle for the specified change in altitude, expressed in the same units as altitude.


getConstraintDetails()

static getConstraintDetails(constraint, out): AltitudeConstraintDetails

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:630

Gets VNAV Constraint Details from a constraint.

Parameters

ParameterTypeDescription
constraintVNavConstraintThe constraint to get details from.
outAltitudeConstraintDetailsThe object to which write the results.

Returns

AltitudeConstraintDetails

The VNav Constraint Details.


getConstraintDistanceFromConstraint()

static getConstraintDistanceFromConstraint(constraint): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:311

Gets a constraint segment distance from the constraint legs.

Parameters

ParameterTypeDescription
constraintVNavConstraintThe constraint to calculate a distance for.

Returns

number

The constraint distance, in meters.


getConstraintDistanceFromLegs()

static getConstraintDistanceFromLegs(constraint, previousConstraint, verticalPlan): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:328

Gets a constraint segment distance from the Vertical Plan legs.

Parameters

ParameterTypeDescription
constraintVNavConstraintThe constraint to calculate a distance for.
previousConstraintVNavConstraint | undefinedThe constraint that preceds the constraint we are calculating the distance for.
verticalPlanVerticalFlightPlanThe Vertical Flight Plan.

Returns

number

The constraint distance, in meters.


getConstraintDistanceWithOffsetsFromLegs()

static getConstraintDistanceWithOffsetsFromLegs(verticalPlan, constraintIndex, fromConstraintIndex): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:355

Gets the distance from one constraint to another, in meters, calculated using vertical flight plan leg distances. Positive distances indicate the TO constraint is located past the FROM constraint, and negative distances indicate the TO constraint is located prior to the FROM constraint.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan containing the constraints between which to measure distance.
constraintIndexnumberThe index of the constraint to which to calculate distance (the TO constraint).
fromConstraintIndexnumberThe index of the constraint from which to calculate distance (the FROM constraint). If this index is greater than or equal to the length of the vertical flight plan's constraints array, then the distance will be measured from the beginning of the flight plan. Defaults to the index of the constraint immediately prior to the TO constraint (in flight plan order).

Returns

number

The distance between the two specified constraints, in meters, calculated using vertical flight plan leg distances.

Throws

RangeError if constraintIndex is out of bounds.


getConstraintForVerticalDirect()

static getConstraintForVerticalDirect(verticalPlan, activeGlobalLegIndex, selectedGlobalLegIndex): VNavConstraint | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1635

Gets the constraint for a vertical direct based on an input global leg index.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
activeGlobalLegIndexnumberThe current active global leg index.
selectedGlobalLegIndexnumberThe input global leg index selected.

Returns

VNavConstraint | undefined

The constraint, or undefined if none exists.


getConstraintFromLegIndex()

static getConstraintFromLegIndex(verticalPlan, globalLegIndex): VNavConstraint | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:250

Gets the VNAV constraint that contains a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global leg index of the flight plan leg.

Returns

VNavConstraint | undefined

The VNAV constraint that contains the specified flight plan leg, or undefined if one could not be found.


getConstraintIndexFromLegIndex()

static getConstraintIndexFromLegIndex(verticalPlan, globalLegIndex): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:234

Gets the index of the VNAV constraint that contains a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global leg index of the flight plan leg.

Returns

number

The index of the VNAV constraint that contains the specified flight plan leg, or -1 if one could not be found.


getConstraintLegIndexFromLegIndex()

static getConstraintLegIndexFromLegIndex(verticalPlan, globalLegIndex): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:302

Gets the global leg index for the constraint containing an indexed leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical plan.
globalLegIndexnumberA global leg index.

Returns

number

The global leg index for the constraint containing the leg at the specified global index, or -1 if one could not be found.


getCruiseTocBocDetails()

static getCruiseTocBocDetails(lateralPlan, verticalPlan, activeLegIndex, distanceAlongLeg, currentGroundSpeed, currentAltitude, currentVS, cruiseAltitude, out): TocBocDetails

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1481

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

Parameters

ParameterTypeDescription
lateralPlanFlightPlanThe lateral flight plan.
verticalPlanVerticalFlightPlanThe vertical flight plan.
activeLegIndexnumberThe current active leg index.
distanceAlongLegnumberThe distance the plane is along the current leg in meters.
currentGroundSpeednumberThe current ground speed, in knots.
currentAltitudenumberThe current indicated altitude in meters.
currentVSnumberThe current vertical speed in meters per minute.
cruiseAltitudenumberThe cruise altitude, in meters.
outTocBocDetailsThe object to which to write the TOC/BOC details.

Returns

TocBocDetails

The VNAV TOC/BOC to cruise altitude details.


getCurrentClimbConstraint()

static getCurrentClimbConstraint(verticalPlan, globalLegIndex): VNavConstraint | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:975

Gets the current climb constraint, if one exists.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

VNavConstraint | undefined

The current climb constraint, or undefined if no such constraint exists.


getDesiredAltitude()

static getDesiredAltitude(verticalPlan, globalLegIndex, distanceAlongLeg): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1055

Gets the VNAV desired altitude.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global leg index to get the target for.
distanceAlongLegnumberThe distance along the leg the aircraft is presently.

Returns

number

The current VNAV desired altitude.


getDistanceToConstraint()

static getDistanceToConstraint(constraint, lateralPlan, activeLegIndex, distanceAlongLeg): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:412

Gets the distance from the active location in a flight plan to a VNAV constraint, in meters. If the active location is past the constraint, then the distance is considered to be zero. If the active location is not past the constraint but there is a discontinuity leg between the two (including if the discontinuity leg contains one or both of the active location and constraint), then the distance is considered to be positive infinity.

The distance calculated by this method is based on the leg distances reported by the lateral flight plan, not the leg distances reported by the vertical flight plan.

Parameters

ParameterTypeDescription
constraintVNavConstraintThe VNAV constraint to calculate the distance to.
lateralPlanFlightPlanThe lateral flight plan that contains the VNAV constraint.
activeLegIndexnumberThe global index of the flight plan leg containing the active location (the active leg).
distanceAlongLegnumberThe along-track distance from the start of the active leg to the active location, in meters.

Returns

number

The distance from the specified active location to the specified VNAV constraint along the flight plan, in meters.


getEventBusTopicSuffix()

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

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1847

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

Type Parameters

Type Parameter
Index extends number

Parameters

ParameterTypeDescription
indexIndexThe index of the VNAV for which to get the suffix.

Returns

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

The suffix for event bus topics published by VNAV with the specified index.


getFafAltitude()

static getFafAltitude(verticalPlan): number | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1071

Gets and returns the FAF altitude.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.

Returns

number | undefined

the FAF constraint altitude.


getFafIndex()

static getFafIndex(plan): number | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:194

Gets the FAF index in the plan.

Parameters

ParameterTypeDescription
planFlightPlanThe flight plan.

Returns

number | undefined

The FAF index in the plan.


getFafIndexReverse()

static getFafIndexReverse(lateralPlan, iterator): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:213

Finds and returns the FAF index in the plan.

Parameters

ParameterTypeDescription
lateralPlanFlightPlanThe lateral flight plan.
iteratorFlightPlanLegIteratorThe FlightPlanLegIterator instance.

Returns

number

The FAF index in the lateral flight plan.


getFirstClimbConstraintIndex()

static getFirstClimbConstraintIndex(verticalPlan): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1723

Finds the index of the first climb constraint in a vertical plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanA vertical flight plan.

Returns

number

The index of the first climb constraint in the specified vertical plan, or -1 if the plan has no climb constraints.


getFirstDescentConstraintIndex()

static getFirstDescentConstraintIndex(verticalPlan): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1755

Finds the index of the first descent constraint in a vertical plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanA vertical flight plan.

Returns

number

The index of the first descent constraint in the specified vertical plan, or -1 if the plan has no descent constraints.


getFpa()

static getFpa(distance, altitude): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:142

Gets the flight path angle required to travel a given lateral distance and altitude. Positive flight path angles represent an ascending flight path. By convention, the flight path angle required to travel zero altitude equals zero degrees for all distances.

Parameters

ParameterTypeDescription
distancenumberThe lateral distance to travel, in the same units as altitude.
altitudenumberThe altitude to travel, in the same units as distance.

Returns

number

The flight path angle, in degrees, required to travel the specified altitude and distance.


getFpaFromVerticalSpeed()

static getFpaFromVerticalSpeed(vs, groundspeed): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:130

Gets the equivalent flight path angle for a given vertical speed and groundspeed. For this calculation, positive flight path angles represent an ascending flight path.

Parameters

ParameterTypeDescription
vsnumberThe vertical speed, in feet per minute.
groundspeednumberThe groundspeed, in knots.

Returns

number

The flight path angle equivalent to the specified vertical speed and ground speed.


getIsPathEnd()

static getIsPathEnd(verticalPlan, globalLegIndex): boolean

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:287

Gets and returns whether the input leg index is a path end.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberis the global leg index to check.

Returns

boolean

whether the input leg index is a path end.


getLastClimbConstraintIndex()

static getLastClimbConstraintIndex(verticalPlan): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1739

Finds the index of the last climb constraint in a vertical plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanA vertical flight plan.

Returns

number

The index of the last climb constraint in the specified vertical plan, or -1 if the plan has no climb constraints.


getLastDescentConstraintIndex()

static getLastDescentConstraintIndex(verticalPlan): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1776

Finds the index of the last descent constraint in a vertical plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanA vertical flight plan.

Returns

number

The index of the last descent constraint in the specified vertical plan, or -1 if the plan has no descent constraints.


getMissedApproachLegIndex()

static getMissedApproachLegIndex(plan): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:177

Gets the missed approach leg index.

Parameters

ParameterTypeDescription
planFlightPlanThe flight plan.

Returns

number

The Destination leg global leg index.


getNextClimbConstraintIndex()

static getNextClimbConstraintIndex(verticalPlan, globalLegIndex): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:792

Gets the index of the next climb constraint at or after a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

number

The index of the next climb constraint at or after the specified flight plan leg, or -1 if one could not be found.


getNextClimbConstraintIndexFromPoint()

static getNextClimbConstraintIndexFromPoint(verticalPlan, globalLegIndex, distanceToLegEnd): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:812

Gets the index of the next climb constraint at or after a query point along the flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg containing the query point.
distanceToLegEndnumberThe distance from the query point to the end of its containing leg, in meters.

Returns

number

The index of the next climb constraint at or after the specified query point, or -1 if one could not be found.


getNextClimbTargetAltitude()

static getNextClimbTargetAltitude(verticalPlan, globalLegIndex): number | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:990

Gets the next climb constraint maximum altitude at or after a flight plan leg, or undefined if none exists.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

number | undefined

The next climb constraint defined maximum altitude in meters at or after the specified flight plan leg, or undefined if no such constraint exists.


getNextClimbTargetConstraint()

static getNextClimbTargetConstraint(verticalPlan, globalLegIndex): VNavConstraint | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:926

Gets the next climb constraint with a defined maximum altitude at or after a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

VNavConstraint | undefined

The next climb constraint with a defined maximum altitude at or after the specified flight plan leg, or undefined if no such constraint exists.


getNextClimbTargetConstraintIndexFromPoint()

static getNextClimbTargetConstraintIndexFromPoint(verticalPlan, globalLegIndex, distanceToLegEnd): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:956

Gets the index of the next climb constraint with a defined maximum altitude at or after a query point along the flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg containing the query point.
distanceToLegEndnumberThe distance from the query point to the end of its containing leg, in meters.

Returns

number

The index of the next climb constraint with a defined maximum altitude at or after the specified query point, or -1 if one could not be found.


getNextConstraintIndexFromPoint()

static getNextConstraintIndexFromPoint(verticalPlan, globalLegIndex, distanceToLegEnd, predicate?): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:704

Gets the index of the next constraint that is located at or after a query point along the flight plan and satisfies an optional condition.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg containing the query point.
distanceToLegEndnumberThe distance from the query point to the end of its containing leg, in meters.
predicate?(constraint, constraintIndex, verticalPlan) => booleanA function that evaluates whether a constraint satisfies the condition that is required for the constraint to be selected by this method. The function is called once for each evaluated constraint and should return true if the constraint satisfies the condition and false otherwise. If not defined, then constraints do not need to satisfy any additional condition to be selected by this method.

Returns

number

The index of the next descent constraint that is located at or after the specified query point and satisifes the specified condition, or -1 if one could not be found.


getNextDescentConstraintIndex()

static getNextDescentConstraintIndex(verticalPlan, globalLegIndex): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:752

Gets the index of the next descent constraint at or after a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

number

The index of the next descent constraint at or after the specified flight plan leg, or -1 if one could not be found.


getNextDescentConstraintIndexFromPoint()

static getNextDescentConstraintIndexFromPoint(verticalPlan, globalLegIndex, distanceToLegEnd): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:772

Gets the index of the next descent constraint at or after a query point along the flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg containing the query point.
distanceToLegEndnumberThe distance from the query point to the end of its containing leg, in meters.

Returns

number

The index of the next descent constraint at or after the specified query point, or -1 if one could not be found.


getNextDescentTargetAltitude()

static getNextDescentTargetAltitude(verticalPlan, globalLegIndex): number | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:914

Gets the next descent constraint minimum altitude at or after a flight plan leg, or undefined if none exists.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

number | undefined

The next descent constraint defined minimum altitude in meters at or after the specified flight plan leg, or undefined if no such constraint exists.


getNextDescentTargetConstraint()

static getNextDescentTargetConstraint(verticalPlan, globalLegIndex): VNavConstraint | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:872

Gets the next descent constraint with a defined minimum altitude at or after a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

VNavConstraint | undefined

The next descent constraint with a defined minimum altitude at or after the specified flight plan leg, or undefined if no such constraint exists.


getNextDescentTargetConstraintIndexFromPoint()

static getNextDescentTargetConstraintIndexFromPoint(verticalPlan, globalLegIndex, distanceToLegEnd): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:893

Gets the index of the next descent constraint with a defined minimum altitude at or after a query point along the flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg containing the query point.
distanceToLegEndnumberThe distance from the query point to the end of its containing leg, in meters.

Returns

number

The index of the next descent constraint with a defined minimum altitude at or after the specified query point, or -1 if one could not be found.


getNextMaprConstraintIndex()

static getNextMaprConstraintIndex(verticalPlan, globalLegIndex): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:832

Gets the index of the next missed approach constraint at or after a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

number

The index of the next missed approach constraint at or after the specified flight plan leg, or -1 if one could not be found.


getNextMaprConstraintIndexFromPoint()

static getNextMaprConstraintIndexFromPoint(verticalPlan, globalLegIndex, distanceToLegEnd): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:852

Gets the index of the next missed approach constraint at or after a query point along the flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg containing the query point.
distanceToLegEndnumberThe distance from the query point to the end of its containing leg, in meters.

Returns

number

The index of the next missed approach constraint at or after the specified query point, or -1 if one could not be found.


getNextMaprTargetAltitude()

static getNextMaprTargetAltitude(verticalPlan, globalLegIndex): number | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1043

Gets the next missed approach constraint maximum altitude at or after a flight plan leg, or undefined if none exists.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

number | undefined

The next missed approach constraint defined maximum altitude in meters at or after the specified flight plan leg, or undefined if no such constraint exists.


getNextMaprTargetConstraint()

static getNextMaprTargetConstraint(verticalPlan, globalLegIndex): VNavConstraint | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1002

Gets the next missed approach constraint with a defined maximum altitude at or after a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg to find the constraint for.

Returns

VNavConstraint | undefined

The next missed approach constraint with a defined maximum altitude at or after the specified flight plan leg, or undefined if no such constraint exists.


getNextMaprTargetConstraintIndexFromPoint()

static getNextMaprTargetConstraintIndexFromPoint(verticalPlan, globalLegIndex, distanceToLegEnd): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1023

Gets the index of the next missed approach constraint with a defined maximum altitude at or after a query point along the flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global index of the flight plan leg containing the query point.
distanceToLegEndnumberThe distance from the query point to the end of its containing leg, in meters.

Returns

number

The index of the next missed approach constraint with a defined maximum altitude at or after the specified query point, or -1 if one could not be found.


getPathErrorDistance()

static getPathErrorDistance(groundSpeed): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1823

Computes the path error distance that should be used given the groundspeed.

Parameters

ParameterTypeDescription
groundSpeednumberThe current groundspeed, in knots.

Returns

number

The path error distance to use.


getPriorConstraintFromLegIndex()

static getPriorConstraintFromLegIndex(verticalPlan, globalLegIndex): VNavConstraint | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:277

Gets the VNAV constraint immediately prior to the constraint that contains a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global leg index of the flight plan leg.

Returns

VNavConstraint | undefined

The VNAV constraint immediately prior to the constraint that contains the specified flight plan leg, or undefined if one could nto be found.


getPriorConstraintIndexFromLegIndex()

static getPriorConstraintIndexFromLegIndex(verticalPlan, globalLegIndex): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:261

Gets the index of the VNAV constraint immediately prior to the constraint that contains a flight plan leg.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global leg index of the flight plan leg.

Returns

number

The index of the VNAV constraint immediately prior to the constraint that contains the specified flight plan leg, or -1 if one could nto be found.


getRequiredVs()

static getRequiredVs(distance, targetAltitude, currentAltitude, groundSpeed): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:107

Gets the required vertical speed to meet an altitude constraint.

Parameters

ParameterTypeDescription
distancenumberThe distance to the constraint, in nautical miles.
targetAltitudenumberThe target altitude for the constraint, in feet.
currentAltitudenumberThe current altitude, in feet.
groundSpeednumberThe current groundspeed, in knots.

Returns

number

The required vertical speed, in feet per minute, to meet the altitude constraint.


getTocBocDetails()

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

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1287

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

Parameters

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

Returns

TocBocDetails

The VNAV TOC/BOC details.


getTodBodDetails()

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

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1090

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

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
activeLegIndexnumberThe current active leg index.
distanceAlongLegnumberThe distance the plane is along the current leg in meters.
currentAltitudenumberThe current indicated altitude in meters.
currentVSnumberThe current vertical speed in meters per minute.
outTodBodDetailsThe object to which to write the TOD/BOD details.

Returns

TodBodDetails

The VNAV TOD/BOD details.


getVerticalDirectConstraintFromIndex()

static getVerticalDirectConstraintFromIndex(verticalPlan, selectedGlobalLegIndex, activeLegIndex): VNavConstraint | undefined

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:673

Gets and returns the vertical direct constraint based on an input index.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
selectedGlobalLegIndexnumberThe global leg index selected for vertical direct.
activeLegIndexnumberThe active leg index.

Returns

VNavConstraint | undefined

The Vnav Constraint for the vertical direct or undefined.


getVerticalLegFromPlan()

static getVerticalLegFromPlan(verticalPlan, globalLegIndex): VNavLeg

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1599

Gets a VNAV leg from a vertical flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
globalLegIndexnumberThe global leg index of the leg to get.

Returns

VNavLeg

The requested VNAV leg.

Throws

Not found if the index is not valid.


getVerticalLegFromSegmentInPlan()

static getVerticalLegFromSegmentInPlan(verticalPlan, segmentIndex, legIndex): VNavLeg

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1618

Gets a VNAV leg from the plan from a specified segment.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.
segmentIndexnumberThe segment index of the leg to get.
legIndexnumberThe index of the leg to get within the specified segment.

Returns

VNavLeg

The requested VNAV leg.

Throws

Not found if the index is not valid.


getVerticalPlanDistanceToConstraint()

static getVerticalPlanDistanceToConstraint(verticalPlan, constraintIndex, activeLegIndex, activeDistanceToLegEnd): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:547

Gets the distance from the active location in a flight plan to a VNAV constraint, in meters. Positive distances indicate the constraint is located after the active location along the flight plan, and negative distances indicate the constraint is located before the active location.

The distance calculated by this method is based on the leg distances reported by the vertical flight plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan that contains the VNAV constraint to which to calculate the distance.
constraintIndexnumberThe index of the VNAV constraint to which to calculate the distance.
activeLegIndexnumberThe global index of the flight plan leg containing the active location (the active leg).
activeDistanceToLegEndnumberThe along-track distance from the active location to the end of the active leg, in meters.

Returns

number

The distance from the specified active location to the specified VNAV constraint along the flight plan, in meters.

Throws

RangeError if constraintIndex is out of bounds.


getVerticalSegmentsFromPlan()

static getVerticalSegmentsFromPlan(verticalPlan): VNavPlanSegment[]

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1645

Gets the VNAV segments from the calculated VNAV plan.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe vertical flight plan.

Returns

VNavPlanSegment[]

The vnav segments.

Throws

Not found if the index is not valid.


getVerticalSpeedFromFpa()

static getVerticalSpeedFromFpa(fpa, groundspeed): number

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:119

Gets the vertical speed required to maintain a given flight path angle and groundspeed.

Parameters

ParameterTypeDescription
fpanumberThe flight path angle, in degrees. Positive angles represent an ascending flight path.
groundspeednumberThe groundspeed, in knots.

Returns

number

The vertical speed required to maintain the specified flight path angle and groundspeed.


isLegTypeHoldOrProcedureTurn()

static isLegTypeHoldOrProcedureTurn(lateralLeg): boolean

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1654

Gets whether a lateral plan leg is a hold or procedure turn.

Parameters

ParameterTypeDescription
lateralLegLegDefinitionThe Lateral Leg in the flight plan (LegDefinition).

Returns

boolean

Whether the leg is a hold or procedure turn.


isUserConstraint()

static isUserConstraint(lateralLeg): boolean

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:90

Checks if a constraint is a user-created constraint.

Parameters

ParameterTypeDescription
lateralLegLegDefinitionThe Lateral Flight Plan Leg.

Returns

boolean

If this constraint is a user-created constraint.


isValidVNavIndex()

static isValidVNavIndex(index): boolean

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1838

Checks whether an index is a valid VNAV index.

Parameters

ParameterTypeDescription
indexnumberThe index to check.

Returns

boolean

Whether the specified index is a valid VNAV index.


planLegs()

static planLegs(verticalPlan, reverse, startIndex?, endIndex?): Generator<VNavLeg, void>

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:26

Gets a vertical flight plan's legs.

Parameters

ParameterTypeDefault valueDescription
verticalPlanVerticalFlightPlanundefinedThe vertical flight plan for which to get legs.
reversebooleanfalseWhether to get the legs in reverse order. Defaults to false.
startIndex?numberundefinedThe global leg index of the leg at which to start, inclusive. Defaults to 0 if reverse is false or verticalPlan.length - 1 if reverse is true.
endIndex?numberundefinedThe global leg index of the leg at which to end, exclusive. Defaults to verticalPlan.length if reverse is false or -1 if reverse is true.

Returns

Generator<VNavLeg, void>

A generator which yields the specified vertical flight plan's legs.


speedConstraintDetailsEquals()

static speedConstraintDetailsEquals(a, b): boolean

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1812

Checks whether two speed constraint details are equal.

Parameters

ParameterTypeDescription
aSpeedConstraintDetailsThe first speed constraint details.
bSpeedConstraintDetailsThe second speed constraint details.

Returns

boolean

Whether the two speed constraint details are equal.


speedConstraintEquals()

static speedConstraintEquals(a, b): boolean

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1792

Checks whether two speed constraints are equal.

Parameters

ParameterTypeDescription
aSpeedConstraintThe first speed constraint.
bSpeedConstraintThe second speed constraint.

Returns

boolean

Whether the two speed constraints are equal.


verticalPlanHasLeg()

static verticalPlanHasLeg(verticalPlan, globalLegIndex): boolean

Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1582

Checks whether or not the vertical plan has a leg at a given globalLegIndex.

Parameters

ParameterTypeDescription
verticalPlanVerticalFlightPlanThe Vertical Flight Plan.
globalLegIndexnumberThe global leg index to check.

Returns

boolean

True if the leg exists.