Class: VNavUtils
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:12
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:1297
Checks whether two altitude constraint details are equal.
Parameters
Parameter | Type | Description |
---|---|---|
a | AltitudeConstraintDetails | The first altitude constraint details. |
b | AltitudeConstraintDetails | The 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:86
Gets the change in altitude along a flight path angle for a given lateral distance traveled.
Parameters
Parameter | Type | Description |
---|---|---|
fpa | number | The flight path angle, in degrees. Positive values represent an ascending flight path. |
distance | number | The 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:1171
Creates a new empty vertical flight plan constraint.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
index | number | undefined | The leg index of the constraint. |
minAltitude | number | undefined | The bottom altitude of the constraint. |
maxAltitude | number | undefined | THe top altitude of the constraint. |
name | string | undefined | The name of the leg for the constraint. |
type | "direct" | "climb" | "descent" | "manual" | "missed" | 'descent' | The type of constraint. |
Returns
A new empty constraint.
createLeg()
static
createLeg(segmentIndex
,legIndex
,name
,distance
):VNavLeg
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1196
Creates a new vertical flight plan leg.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
segmentIndex | number | undefined | The segment index for the leg. |
legIndex | number | undefined | The index of the leg within the segment. |
name | string | undefined | The name of the leg. |
distance | number | 0 | The leg distance. |
Returns
A new VNAV plan leg.
distanceForAltitude()
static
distanceForAltitude(fpa
,altitude
):number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:97
Gets the lateral distance traveled along a flight path angle for a given change in altitude.
Parameters
Parameter | Type | Description |
---|---|---|
fpa | number | The flight path angle, in degrees. Positive values represent an ascending flight path. |
altitude | number | The 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:309
Gets VNAV Constraint Details from a constraint.
Parameters
Parameter | Type | Description |
---|---|---|
constraint | VNavConstraint | The constraint to get details from. |
out | AltitudeConstraintDetails | The object to which write the results. |
Returns
The VNav Constraint Details.
getConstraintDistanceFromConstraint()
static
getConstraintDistanceFromConstraint(constraint
):number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:240
Gets a constraint segment distance from the constraint legs.
Parameters
Parameter | Type | Description |
---|---|---|
constraint | VNavConstraint | The 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:257
Gets a constraint segment distance from the Vertical Plan legs.
Parameters
Parameter | Type | Description |
---|---|---|
constraint | VNavConstraint | The constraint to calculate a distance for. |
previousConstraint | undefined | VNavConstraint | The constraint that preceds the constraint we are calculating the distance for. |
verticalPlan | VerticalFlightPlan | The Vertical Flight Plan. |
Returns
number
The constraint distance, in meters.
getConstraintForVerticalDirect()
static
getConstraintForVerticalDirect(verticalPlan
,activeGlobalLegIndex
,selectedGlobalLegIndex
):undefined
|VNavConstraint
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1130
Gets the constraint for a vertical direct based on an input global leg index.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
activeGlobalLegIndex | number | The current active global leg index. |
selectedGlobalLegIndex | number | The input global leg index selected. |
Returns
undefined
| VNavConstraint
The constraint, or undefined if none exists.
getConstraintFromLegIndex()
static
getConstraintFromLegIndex(verticalPlan
,globalLegIndex
):undefined
|VNavConstraint
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:179
Gets the VNAV constraint that contains a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global leg index of the flight plan leg. |
Returns
undefined
| VNavConstraint
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:163
Gets the index of the VNAV constraint that contains a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The 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:231
Gets the global leg index for the constraint containing an indexed leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical plan. |
globalLegIndex | number | A 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:976
Gets the VNAV TOC/BOC to cruise altitude details for a vertical flight plan.
Parameters
Parameter | Type | Description |
---|---|---|
lateralPlan | FlightPlan | The lateral flight plan. |
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
activeLegIndex | number | The current active leg index. |
distanceAlongLeg | number | The distance the plane is along the current leg in meters. |
currentGroundSpeed | number | The current ground speed, in knots. |
currentAltitude | number | The current indicated altitude in meters. |
currentVS | number | The current vertical speed in meters per minute. |
cruiseAltitude | number | The cruise altitude, in meters. |
out | TocBocDetails | The object to which to write the TOC/BOC details. |
Returns
The VNAV TOC/BOC to cruise altitude details.
getCurrentClimbConstraint()
static
getCurrentClimbConstraint(verticalPlan
,globalLegIndex
):undefined
|VNavConstraint
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:492
Gets the current climb constraint, if one exists.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global index of the flight plan leg to find the constraint for. |
Returns
undefined
| VNavConstraint
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:550
Gets the VNAV desired altitude.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global leg index to get the target for. |
distanceAlongLeg | number | The 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:278
Gets the distance from the current location in the plan to the constraint.
Parameters
Parameter | Type | Description |
---|---|---|
constraint | VNavConstraint | The vnav constraint to calculate the distance to. |
lateralPlan | FlightPlan | The lateral flight plan. |
activeLegIndex | number | The current active leg index. |
distanceAlongLeg | number | The current distance along leg. |
Returns
number
the distance to the constraint, or positive infinity if a discontinuity exists between the ppos and the constraint.
getEventBusTopicSuffix()
static
getEventBusTopicSuffix<Index
>(index
):Index
extends0
?""
:`_${Index}`
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1342
Gets the suffix for event bus topics published by VNAV with a given index.
Type Parameters
Type Parameter |
---|
Index extends number |
Parameters
Parameter | Type | Description |
---|---|---|
index | Index | The 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
):undefined
|number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:566
Gets and returns the FAF altitude.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
Returns
undefined
| number
the FAF constraint altitude.
getFafIndex()
static
getFafIndex(plan
):undefined
|number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:123
Gets the FAF index in the plan.
Parameters
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | The flight plan. |
Returns
undefined
| number
The FAF index in the plan.
getFafIndexReverse()
static
getFafIndexReverse(lateralPlan
,iterator
):number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:142
Finds and returns the FAF index in the plan.
Parameters
Parameter | Type | Description |
---|---|---|
lateralPlan | FlightPlan | The lateral flight plan. |
iterator | FlightPlanLegIterator | The 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:1218
Finds the index of the first climb constraint in a vertical plan.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | A 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:1250
Finds the index of the first descent constraint in a vertical plan.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | A 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:71
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
Parameter | Type | Description |
---|---|---|
distance | number | The lateral distance to travel, in the same units as altitude . |
altitude | number | The 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:59
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
Parameter | Type | Description |
---|---|---|
vs | number | The vertical speed, in feet per minute. |
groundspeed | number | The 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:216
Gets and returns whether the input leg index is a path end.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | is 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:1234
Finds the index of the last climb constraint in a vertical plan.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | A 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:1271
Finds the index of the last descent constraint in a vertical plan.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | A 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:106
Gets the missed approach leg index.
Parameters
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | The flight plan. |
Returns
number
The Destination leg global leg index.
getNextClimbConstraintIndex()
static
getNextClimbConstraintIndex(verticalPlan
,globalLegIndex
):number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:396
Gets the index of the next climb constraint at or after a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The 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.
getNextClimbTargetAltitude()
static
getNextClimbTargetAltitude(verticalPlan
,globalLegIndex
):undefined
|number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:507
Gets the next climb constraint maximum altitude at or after a flight plan leg, or undefined if none exists.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global index of the flight plan leg to find the constraint for. |
Returns
undefined
| number
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
):undefined
|VNavConstraint
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:465
Gets the next climb constraint with a defined maximum altitude at or after a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global index of the flight plan leg to find the constraint for. |
Returns
undefined
| VNavConstraint
The next climb constraint with a defined maximum altitude at or after the specified flight plan leg, or
undefined
if no such constraint exists.
getNextDescentConstraintIndex()
static
getNextDescentConstraintIndex(verticalPlan
,globalLegIndex
):number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:377
Gets the index of the next descent constraint at or after a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The 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.
getNextDescentTargetAltitude()
static
getNextDescentTargetAltitude(verticalPlan
,globalLegIndex
):undefined
|number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:453
Gets the next descent constraint minimum altitude at or after a flight plan leg, or undefined if none exists.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global index of the flight plan leg to find the constraint for. |
Returns
undefined
| number
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
):undefined
|VNavConstraint
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:434
Gets the next descent constraint with a defined minimum altitude at or after a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global index of the flight plan leg to find the constraint for. |
Returns
undefined
| VNavConstraint
The next descent constraint with a defined minimum altitude at or after the specified flight
plan leg, or undefined
if no such constraint exists.
getNextMaprConstraintIndex()
static
getNextMaprConstraintIndex(verticalPlan
,globalLegIndex
):number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:415
Gets the index of the next missed approach constraint at or after a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The 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.
getNextMaprTargetAltitude()
static
getNextMaprTargetAltitude(verticalPlan
,globalLegIndex
):undefined
|number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:538
Gets the next missed approach constraint maximum altitude at or after a flight plan leg, or undefined if none exists.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global index of the flight plan leg to find the constraint for. |
Returns
undefined
| number
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
):undefined
|VNavConstraint
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:519
Gets the next missed approach constraint with a defined maximum altitude at or after a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global index of the flight plan leg to find the constraint for. |
Returns
undefined
| VNavConstraint
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.
getPathErrorDistance()
static
getPathErrorDistance(groundSpeed
):number
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1318
Computes the path error distance that should be used given the groundspeed.
Parameters
Parameter | Type | Description |
---|---|---|
groundSpeed | number | The current groundspeed, in knots. |
Returns
number
The path error distance to use.
getPriorConstraintFromLegIndex()
static
getPriorConstraintFromLegIndex(verticalPlan
,globalLegIndex
):undefined
|VNavConstraint
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:206
Gets the VNAV constraint immediately prior to the constraint that contains a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global leg index of the flight plan leg. |
Returns
undefined
| VNavConstraint
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:190
Gets the index of the VNAV constraint immediately prior to the constraint that contains a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The 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:36
Gets the required vertical speed to meet an altitude constraint.
Parameters
Parameter | Type | Description |
---|---|---|
distance | number | The distance to the constraint, in nautical miles. |
targetAltitude | number | The target altitude for the constraint, in feet. |
currentAltitude | number | The current altitude, in feet. |
groundSpeed | number | The 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:782
Gets the VNAV TOC/BOC details for a vertical flight plan.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
activeLegIndex | number | The current active leg index. |
distanceAlongLeg | number | The distance the plane is along the current leg in meters. |
currentGroundSpeed | number | The current ground speed, in knots. |
currentAltitude | number | The current indicated altitude in meters. |
currentVS | number | The current vertical speed in meters per minute. |
out | TocBocDetails | The object to which to write the TOC/BOC details. |
Returns
The VNAV TOC/BOC details.
getTodBodDetails()
static
getTodBodDetails(verticalPlan
,activeLegIndex
,distanceAlongLeg
,currentAltitude
,currentVS
,out
):TodBodDetails
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:585
Gets the VNAV TOD/BOD details for a vertical flight plan.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
activeLegIndex | number | The current active leg index. |
distanceAlongLeg | number | The distance the plane is along the current leg in meters. |
currentAltitude | number | The current indicated altitude in meters. |
currentVS | number | The current vertical speed in meters per minute. |
out | TodBodDetails | The object to which to write the TOD/BOD details. |
Returns
The VNAV TOD/BOD details.
getVerticalDirectConstraintFromIndex()
static
getVerticalDirectConstraintFromIndex(verticalPlan
,selectedGlobalLegIndex
,activeLegIndex
):undefined
|VNavConstraint
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:352
Gets and returns the vertical direct constraint based on an input index.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
selectedGlobalLegIndex | number | The global leg index selected for vertical direct. |
activeLegIndex | number | The active leg index. |
Returns
undefined
| VNavConstraint
The Vnav Constraint for the vertical direct or undefined.
getVerticalLegFromPlan()
static
getVerticalLegFromPlan(verticalPlan
,globalLegIndex
):VNavLeg
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1094
Gets a VNAV leg from a vertical flight plan.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
globalLegIndex | number | The global leg index of the leg to get. |
Returns
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:1113
Gets a VNAV leg from the plan from a specified segment.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
segmentIndex | number | The segment index of the leg to get. |
legIndex | number | The index of the leg to get within the specified segment. |
Returns
The requested VNAV leg.
Throws
Not found if the index is not valid.
getVerticalSegmentsFromPlan()
static
getVerticalSegmentsFromPlan(verticalPlan
):VNavPlanSegment
[]
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1140
Gets the VNAV segments from the calculated VNAV plan.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The vertical flight plan. |
Returns
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:48
Gets the vertical speed required to maintain a given flight path angle and groundspeed.
Parameters
Parameter | Type | Description |
---|---|---|
fpa | number | The flight path angle, in degrees. Positive angles represent an ascending flight path. |
groundspeed | number | The 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:1149
Gets whether a lateral plan leg is a hold or procedure turn.
Parameters
Parameter | Type | Description |
---|---|---|
lateralLeg | LegDefinition | The 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:19
Checks if a constraint is a user-created constraint.
Parameters
Parameter | Type | Description |
---|---|---|
lateralLeg | LegDefinition | The 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:1333
Checks whether an index is a valid VNAV index.
Parameters
Parameter | Type | Description |
---|---|---|
index | number | The index to check. |
Returns
boolean
Whether the specified index is a valid VNAV index.
speedConstraintDetailsEquals()
static
speedConstraintDetailsEquals(a
,b
):boolean
Defined in: src/sdk/autopilot/vnav/VNavUtils.ts:1307
Checks whether two speed constraint details are equal.
Parameters
Parameter | Type | Description |
---|---|---|
a | SpeedConstraintDetails | The first speed constraint details. |
b | SpeedConstraintDetails | The 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:1287
Checks whether two speed constraints are equal.
Parameters
Parameter | Type | Description |
---|---|---|
a | SpeedConstraint | The first speed constraint. |
b | SpeedConstraint | The 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:1077
Checks whether or not the vertical plan has a leg at a given globalLegIndex.
Parameters
Parameter | Type | Description |
---|---|---|
verticalPlan | VerticalFlightPlan | The Vertical Flight Plan. |
globalLegIndex | number | The global leg index to check. |
Returns
boolean
True if the leg exists.