Skip to main content

Class: FmsUtils

Defined in: src/garminsdk/flightplan/FmsUtils.ts:20

Utility Methods for the FMS.

Constructors

Constructor

new FmsUtils(): FmsUtils

Returns

FmsUtils

Properties

DTO_LEG_OFFSET

readonly static DTO_LEG_OFFSET: 3 = 3

Defined in: src/garminsdk/flightplan/FmsUtils.ts:31

The number of flight plan legs between a direct-to target leg and its associated direct-to leg.


DTO_RANDOM_PLAN_INDEX

readonly static DTO_RANDOM_PLAN_INDEX: 1 = 1

Defined in: src/garminsdk/flightplan/FmsUtils.ts:25

The index of the off-route direct-to flight plan.


getBestRnavType()

static getBestRnavType: (query) => RnavTypeFlags = ApproachUtils.getBestRnavType

Defined in: src/garminsdk/flightplan/FmsUtils.ts:418

Gets the best RNAV minimum type available for a given approach.

Gets the best RNAV minimum type available for a given approach.

Parameters

ParameterTypeDescription
queryApproachProcedure | RnavTypeFlagsThe approach to check, or its RNAV type flags.

Returns

RnavTypeFlags

The best RNAV minimum type available for the specified approach.

Param

The approach to check, or its RNAV type flags.

Returns

The best RNAV minimum type available for the specified approach.


isApproachRnpAr()

static isApproachRnpAr: (approach) => boolean = ApproachUtils.isRnpAr

Defined in: src/garminsdk/flightplan/FmsUtils.ts:718

Checks whether an approach procedure is an RNP (AR) approach.

Checks whether an approach procedure is an RNP (AR) approach.

Parameters

ParameterTypeDescription
approachApproachProcedureThe approach procedure to check.

Returns

boolean

Whether the approach procedure is an RNP (AR) approach.

Param

The approach procedure to check.

Returns

Whether the approach procedure is an RNP (AR) approach.


PRIMARY_PLAN_INDEX

readonly static PRIMARY_PLAN_INDEX: 0 = 0

Defined in: src/garminsdk/flightplan/FmsUtils.ts:22

The index of the primary flight plan.


PROC_PREVIEW_PLAN_INDEX

readonly static PROC_PREVIEW_PLAN_INDEX: 2 = 2

Defined in: src/garminsdk/flightplan/FmsUtils.ts:28

The index of the procedure preview flight plan.

Methods

approachDetailsEquals()

static approachDetailsEquals(a, b): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1634

Checks whether two FMS approach details objects are equal.

Parameters

ParameterTypeDescription
aReadonly<ApproachDetails>The first FMS approach details object to compare.
bReadonly<ApproachDetails>The second FMS approach details object to compare.

Returns

boolean

Whether the two FMS approach details objects are equal.


approachHasNavFrequency()

static approachHasNavFrequency(approach): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:823

Checks whether an approach has a primary NAV frequency based on its type. Only approaches of the following types have primary NAV frequencies: ILS, LOC (BC), LDA, SDF, VOR(DME).

Parameters

ParameterTypeDescription
approachApproachProcedureThe approach to check.

Returns

boolean

Whether the specified approach has a primary NAV frequency based on its type.


buildEmptyVisualApproach()

static buildEmptyVisualApproach(runway): ApproachProcedure

Defined in: src/garminsdk/flightplan/FmsUtils.ts:304

Builds an empty approach procedure object for a visual approach. The empty object contains all descriptive data for the approach but lacks flight plan leg information for the approach.

Parameters

ParameterTypeDescription
runwayOneWayRunwayThe runway to which the approach belongs.

Returns

ApproachProcedure

An empty approach procedure object for the specified approach.


buildRunwayLeg()

static buildRunwayLeg(airport, runway, isInitialFix): FlightPlanLeg

Defined in: src/garminsdk/flightplan/FmsUtils.ts:162

Builds a flight plan leg to a runway fix.

Parameters

ParameterTypeDescription
airportstring | AirportFacilityThe runway's parent airport or its ICAO.
runwayOneWayRunwayThe runway associated with the runway fix.
isInitialFixbooleanWhether to create the flight plan leg as an initial fix (IF) leg instead of a track-to-fix (TF) leg.

Returns

FlightPlanLeg

A flight plan leg to the specified runway fix.


buildRunwayLegForApproach()

static buildRunwayLegForApproach(airport, runwayIcao): undefined | FlightPlanLeg

Defined in: src/garminsdk/flightplan/FmsUtils.ts:179

Utility method to return a one-way runway leg from an approach runway leg definition

Parameters

ParameterTypeDescription
airportAirportFacilityis the facility associated with the arrival
runwayIcaostringis the icao string for the runway waypoint in the final legs

Returns

undefined | FlightPlanLeg

a leg object for the runway


buildVfrApproach()

static buildVfrApproach(airport, approachIndex): undefined | GarminVfrApproachProcedure

Defined in: src/garminsdk/flightplan/FmsUtils.ts:329

Creates a VFR approach object based on a published approach.

Parameters

ParameterTypeDescription
airportAirportFacilityThe airport facility containing the published approach on which the VFR approach is based.
approachIndexnumberThe index of the published approach on which the VFR approach is based.

Returns

undefined | GarminVfrApproachProcedure

A new VFR approach object based on the specified published approach, or undefined if a VFR approach could not be generated.


buildVisualApproach()

static buildVisualApproach(airport, runway, finalLegDistance, initialLegDistance, name?, finalLegIdent?, initialLegIdent?): ApproachProcedure

Defined in: src/garminsdk/flightplan/FmsUtils.ts:208

Utility method to return a visual approach for a runway.

Parameters

ParameterTypeDescription
airportAirportFacilityis the airport facility for the visual approach.
runwayOneWayRunwayis the runway to build the visual approach for.
finalLegDistancenumberis the distance from the runway to place the faf leg in NM.
initialLegDistancenumberis the distance from the final leg to place the iaf leg in NM.
name?stringis the optional name for the approach.
finalLegIdent?stringis the optional name for the faf leg.
initialLegIdent?stringis the optional name for the iaf leg.

Returns

ApproachProcedure

an approach procedure.


checkForCourseReversal()

static checkForCourseReversal(legs, ppos): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1322

Checks for a course reversal in the procedure.

Parameters

ParameterTypeDescription
legsLegDefinition[]The legs in the procedure.
pposGeoPointThe current aircraft present position.

Returns

boolean

true if there is an optional course reversal.


createApproachListItem()

static createApproachListItem(approach, index): ApproachListItem

Defined in: src/garminsdk/flightplan/FmsUtils.ts:937

Creates an ApproachListItem from an ApproachProcedure and the approach index.

Parameters

ParameterTypeDescription
approachApproachProcedureThe approach procedure.
indexnumberThe approach index.

Returns

ApproachListItem

The created ApproachListItem.


createApproachTransitionListItem()

static createApproachTransitionListItem(approach, transitionIndex): TransitionListItem

Defined in: src/garminsdk/flightplan/FmsUtils.ts:990

Creates an TransitionListItem from an ApproachProcedure and the transition index.

Parameters

ParameterTypeDescription
approachApproachProcedureThe approach procedure.
transitionIndexnumberThe approach transition index.

Returns

TransitionListItem

The created TransitionListItem.


createEmptyApproachDetails()

static createEmptyApproachDetails(): ApproachDetails

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1614

Creates a new empty, default approach details object.

Returns

ApproachDetails

A new empty, default approach details object.


createEmptyFlightPhase()

static createEmptyFlightPhase(): FmsFlightPhase

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1588

Creates a new empty, default flight phase object.

Returns

FmsFlightPhase

A new empty, default flight phase object.


displayAltitudeAsFlightLevel()

static displayAltitudeAsFlightLevel(altitudeMeters): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1579

Determines whether an altitude should be displayed as a flight level.

Parameters

ParameterTypeDescription
altitudeMetersnumberThe altitude in meters.

Returns

boolean

Whether an altitude should be displayed as a flight level.


flightPhaseEquals()

static flightPhaseEquals(a, b): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1603

Checks whether two FMS flight phase objects are equal.

Parameters

ParameterTypeDescription
aReadonly<FmsFlightPhase>The first FMS flight phase object to compare.
bReadonly<FmsFlightPhase>The second FMS flight phase object to compare.

Returns

boolean

Whether the two FMS flight phase objects are equal.


getAirportFromPlan()

static getAirportFromPlan(plan, reverse): undefined | string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1365

Gets and returns the ICAO of first or last airport fix from the flight plan legs.

Parameters

ParameterTypeDescription
planFlightPlanThe flight plan to use.
reversebooleanWhether to get the first or last airport.

Returns

undefined | string

The ICAO of last airport fix from the flight plan legs.


getApproaches()

static getApproaches(airport?, includeVisual?): ApproachListItem[]

Defined in: src/garminsdk/flightplan/FmsUtils.ts:844

Gets an array of approach list items from an airport.

Parameters

ParameterTypeDefault valueDescription
airport?AirportFacilityundefinedAn airport.
includeVisual?booleantrueWhether to include visual approaches. Defaults to true.

Returns

ApproachListItem[]

An array of approach list items for the specified airport.


getApproachFafLeg()

static getApproachFafLeg(plan): undefined | LegDefinition

Defined in: src/garminsdk/flightplan/FmsUtils.ts:562

Gets the final approach fix leg of a flight plan.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

undefined | LegDefinition

The final approach fix leg of a flight plan, or undefined if one could not be found.


getApproachFromPlan()

static getApproachFromPlan(plan, destination): undefined | GarminApproachProcedure

Defined in: src/garminsdk/flightplan/FmsUtils.ts:496

Gets an approach procedure from a flight plan. If the flight plan has an visual approach loaded, an empty procedure object, containing descriptive data for the approach but lacking flight plan leg information, will be returned.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.
destinationAirportFacilityThe destination airport of the flight plan.

Returns

undefined | GarminApproachProcedure

The approach procedure from the flight plan, or undefined if the plan has no approach.


getApproachNameAsParts()

static getApproachNameAsParts(proc): ApproachNameParts

Defined in: src/garminsdk/flightplan/FmsUtils.ts:726

Utility method to analyze an approach for its name components and pack them into a custom type.

Parameters

ParameterTypeDescription
procGarminApproachProcedureThe approach procedure.

Returns

ApproachNameParts

The name as an ApproachNameParts


getApproachNameAsString()

static getApproachNameAsString(approach): string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:807

Utility method that takes an approach and returns its name as a flat string suitable for use in embedded text content.

Parameters

ParameterTypeDescription
approachGarminApproachProcedureThe approach as an ApproaceProcedure

Returns

string

The formatted name as a string.


getApproachSegment()

static getApproachSegment(plan): undefined | FlightPlanSegment

Defined in: src/garminsdk/flightplan/FmsUtils.ts:131

Gets the approach segment from a flight plan.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

undefined | FlightPlanSegment

The approach segment in the specified flight plan, or undefined if one does not exist.


getApproachTransitionName()

static getApproachTransitionName(approach, transitionIndex): string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1003

Creates an TransitionListItem from an ApproachProcedure and the transition index.

Parameters

ParameterTypeDescription
approachApproachProcedureThe approach procedure.
transitionIndexnumberThe approach transition index.

Returns

string

The created TransitionListItem.


getApproachTransitions()

static getApproachTransitions(approachItem?): TransitionListItem[]

Defined in: src/garminsdk/flightplan/FmsUtils.ts:958

Gets the transitions for the approach, adding suffixes, vectors transtion, and default approach if needed.

Parameters

ParameterTypeDescription
approachItem?ApproachListItemThe approach procedure to get the transitions for.

Returns

TransitionListItem[]

The transitions for the approach.


getApproachVtfLeg()

static getApproachVtfLeg(plan): undefined | LegDefinition

Defined in: src/garminsdk/flightplan/FmsUtils.ts:587

Gets the vectors-to-final faf leg of a flight plan.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

undefined | LegDefinition

The vectors-to-final faf leg of the flight plan, or undefined if one could not be found.


getArrivalEnrouteTransitionName()

static getArrivalEnrouteTransitionName(procedure, transitionIndex, rwyTransitionIndex): string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:690

Gets the transition name and creates a default transition when the procedure has no transitions.

Parameters

ParameterTypeDescription
procedureProcedureis the arrival procedure.
transitionIndexnumberis the index of the enroute transition in the procedure.
rwyTransitionIndexnumberis the index of the runway transition in the procedure.

Returns

string

The transition name string.


getArrivalNameAsString()

static getArrivalNameAsString(airport, arrival, transitionIndex, runway): string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:631

Gets the name of a arrival procedure as a string.

Parameters

ParameterTypeDescription
airportAirportFacilityThe airport to which the departure belongs.
arrivalProcedureAn arrival procedure definition.
transitionIndexnumberThe index of the arrival enroute transition.
runwayundefined | OneWayRunwayThe runway of the arrival, if any.

Returns

string

The name of the arrival procedure.


getArrivalSegment()

static getArrivalSegment(plan): undefined | FlightPlanSegment

Defined in: src/garminsdk/flightplan/FmsUtils.ts:117

Gets the arrival segment from a flight plan.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

undefined | FlightPlanSegment

The arrival segment in the specified flight plan, or undefined if one does not exist.


getBestApproachType()

static getBestApproachType(airport, includeVisual, includeRnpAr): ExtendedApproachType

Defined in: src/garminsdk/flightplan/FmsUtils.ts:443

Gets the best approach type available at an airport.

Parameters

ParameterTypeDefault valueDescription
airportAirportFacilityundefinedAn airport facility.
includeVisualbooleanfalseWhether to include visual approaches. Defaults to false.
includeRnpArbooleanfalseWhether to include RNP AR approaches. Defaults to false.

Returns

ExtendedApproachType

The best approach type available at the specified airport.


getDepartureEnrouteTransitionName()

static getDepartureEnrouteTransitionName(procedure, transitionIndex, rwyTransitionIndex): string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:657

Gets the transition name and creates a default transition when the procedure has no transitions.

Parameters

ParameterTypeDescription
procedureProcedureis the departure procedure.
transitionIndexnumberis the index of the enroute transition in the procedure.
rwyTransitionIndexnumberis the index of the runway transition in the procedure.

Returns

string

The transition name string.


getDepartureNameAsString()

static getDepartureNameAsString(airport, departure, transitionIndex, runway): string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:604

Gets the name of a departure procedure as a string.

Parameters

ParameterTypeDescription
airportAirportFacilityThe airport to which the departure belongs.
departureProcedureA departure procedure definition.
transitionIndexnumberThe index of the departure enroute transition.
runwayundefined | OneWayRunwayThe runway of the departure, if any.

Returns

string

The name of the departure procedure.


getDepartureSegment()

static getDepartureSegment(plan): undefined | FlightPlanSegment

Defined in: src/garminsdk/flightplan/FmsUtils.ts:69

Gets the departure segment from a flight plan.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

undefined | FlightPlanSegment

The departure segment in the specified flight plan, or undefined if one does not exist.


getDestinationSegment()

static getDestinationSegment(plan): undefined | FlightPlanSegment

Defined in: src/garminsdk/flightplan/FmsUtils.ts:145

Gets the destination segment from a flight plan.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

undefined | FlightPlanSegment

The destination segment in the specified flight plan, or undefined if one does not exist.


getFirstAirportFromPlan()

static getFirstAirportFromPlan(plan): undefined | string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1346

Gets and returns the ICAO of first airport fix from the flight plan legs.

Parameters

ParameterTypeDescription
planFlightPlanThe flight plan to use.

Returns

undefined | string

The ICAO of first airport fix from the flight plan legs.


getFirstEnrouteSegment()

static getFirstEnrouteSegment(plan): undefined | FlightPlanSegment

Defined in: src/garminsdk/flightplan/FmsUtils.ts:83

Gets the first enroute segment from a flight plan.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

undefined | FlightPlanSegment

The first enroute segment in the specified flight plan, or undefined if one does not exist.


getFromLegForArrowDisplay()

Call Signature

static getFromLegForArrowDisplay(plan, globalLegIndex): undefined | LegDefinition

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1113

Gets the leg from which a specified flight plan leg originates for the purpose of displaying the flight plan from-to arrow.

Parameters
ParameterTypeDescription
planFlightPlanA flight plan.
globalLegIndexnumberThe global index of the leg for which to get the from leg.
Returns

undefined | LegDefinition

The leg from which the specified flight plan leg originates for the purpose of displaying the from -to arrow.

Call Signature

static getFromLegForArrowDisplay(plan, segmentIndex, segmentLegIndex): undefined | LegDefinition

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1123

Gets the leg from which a specified flight plan leg originates for the purpose of displaying the flight plan from-to arrow.

Parameters
ParameterTypeDescription
planFlightPlanA flight plan.
segmentIndexnumberThe index of the segment containing the leg for which to get the from leg.
segmentLegIndexnumberThe index of the leg for which to get the from leg in its segment.
Returns

undefined | LegDefinition

The leg from which the specified flight plan leg originates for the purpose of displaying the from -to arrow.


getGlobalLegIndex()

static getGlobalLegIndex(lateralPlan, segmentIndex, segmentLegIndex): number

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1024

Gets the global leg index from a segment and segment leg index, whether or not the leg exists.

Parameters

ParameterTypeDescription
lateralPlanFlightPlanThe Lateral Flight Plan.
segmentIndexnumberThe Segment Index.
segmentLegIndexnumberThe Segment Leg Index.

Returns

number

The global leg index.


getLastAirportFromPlan()

static getLastAirportFromPlan(plan): undefined | string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1355

Gets and returns the ICAO of last airport fix from the flight plan legs.

Parameters

ParameterTypeDescription
planFlightPlanThe flight plan to use.

Returns

undefined | string

The ICAO of last airport fix from the flight plan legs.


getLastEnrouteSegment()

static getLastEnrouteSegment(plan): undefined | FlightPlanSegment

Defined in: src/garminsdk/flightplan/FmsUtils.ts:100

Gets the last enroute segment from a flight plan.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

undefined | FlightPlanSegment

The last enroute segment in the specified flight plan, or undefined if one does not exist.


getLegIndexes()

static getLegIndexes(lateralPlan, leg): undefined | LegIndexes

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1038

Gets the indexes for a leg.

Parameters

ParameterTypeDescription
lateralPlanFlightPlanThe Lateral Flight Plan.
legLegDefinitionThe leg definition.

Returns

undefined | LegIndexes

The leg indexes, or undefined if not found.


getNominalFromLeg()

static getNominalFromLeg(plan, segmentIndex, segmentLegIndex): undefined | LegDefinition

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1062

Gets the nominal leg from which a specified flight plan leg originates. The nominal from leg excludes any legs which are part of a direct to or vectors-to-final sequence.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.
segmentIndexnumberThe index of the segment containing the leg for which to get the from leg.
segmentLegIndexnumberThe index of the leg for which to get the from leg in its segment.

Returns

undefined | LegDefinition

The nominal leg from which the specified flight plan leg originates.


getNominalFromLegIndex()

static getNominalFromLegIndex(plan, segmentIndex, segmentLegIndex): number

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1086

Gets the global leg index of the nominal leg from which a specified flight plan leg originates. The nominal from leg excludes any legs which are part of a direct to or vectors-to-final sequence.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.
segmentIndexnumberThe index of the segment containing the leg for which to get the from leg.
segmentLegIndexnumberThe index of the leg for which to get the from leg in its segment.

Returns

number

The nominal leg from which the specified flight plan leg originates.


getNominalLegDtk()

static getNominalLegDtk(leg, out): Float64Array

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1182

Gets the nominal desired track for a flight plan leg, as [dtk, magVar] where dtk is the true desired track and magVar is the magnetic variation used to convert between true and magnetic desired tracks, both in degrees. If a nominal desired track could not be obtained, then the value of dtk will be equal to NaN.

Parameters

ParameterTypeDescription
legLegDefinitionThe leg for which to get the nominal desired track.
outFloat64ArrayThe array to which to write the results.

Returns

Float64Array

The nominal desired track for the specified flight plan leg, as [dtk, magVar] where dtk is the true desired track and magVar is the magnetic variation used to convert between true and magnetic desired tracks, both in degrees.


getPublishedSpeedDescBasedOnSegment()

static getPublishedSpeedDescBasedOnSegment(publishedSpeedRestriction, segmentType): SpeedRestrictionType

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1566

Returns the speed restriction type to use based on the published speed and what segment it's in.

Parameters

ParameterTypeDescription
publishedSpeedRestrictionnumberThe published speed.
segmentTypeFlightPlanSegmentTypeThe segment type.

Returns

SpeedRestrictionType

The speed restriction type to use.


getSequenceLegFixTypeSuffix()

static getSequenceLegFixTypeSuffix(leg, allowHdg): string

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1298

Gets the string for the leg fix type for use in a sequence list.

Parameters

ParameterTypeDefault valueDescription
legLegDefinitionundefinedThe leg definition.
allowHdgbooleantrueIf false, will not return 'hdg'. Defaults to true.

Returns

string

The left padded suffix string or empty string.


getVfrApproaches()

static getVfrApproaches(airport?): VfrApproachListItem[]

Defined in: src/garminsdk/flightplan/FmsUtils.ts:885

Gets an array of approach list items from an airport.

Parameters

ParameterTypeDescription
airport?AirportFacilityAn airport.

Returns

VfrApproachListItem[]

An array of approach list items for the specified airport.


getVisualApproaches()

static getVisualApproaches(facility): ApproachProcedure[]

Defined in: src/garminsdk/flightplan/FmsUtils.ts:910

Gets the visual approaches for the facility.

Parameters

ParameterTypeDescription
facilityAirportFacilityis the facility.

Returns

ApproachProcedure[]

The Approach Procedures.


isAltitudeEditable()

static isAltitudeEditable(plan, leg, isAdvancedVNav): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1420

Checks whether a flight plan leg's altitude constraint should be editable.

Parameters

ParameterTypeDescription
planFlightPlanThe flight plan containing the leg to evaluate.
legLegDefinitionThe flight plan leg to evaluate.
isAdvancedVNavbooleanWhether this is for advanced vnav mode or not.

Returns

boolean

whether a leg's altitude constraint should be editable.


isAltitudeVisible()

static isAltitudeVisible(plan, leg, isAdvancedVNav, isEditable?): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1482

Checks whether a leg's altitude constraint should be visible.

Parameters

ParameterTypeDescription
planFlightPlanThe flight plan containing the leg to evaluate.
legLegDefinitionThe flight plan leg to evaluate.
isAdvancedVNavbooleanWhether this is for advanced vnav mode or not.
isEditable?booleanWhether the constraint is editable, leave undefined if we don't know yet.

Returns

boolean

whether a leg's altitude constraint should be visible.


isApproachLoaded()

static isApproachLoaded(plan): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:522

Checks whether a flight plan has an approach loaded.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

boolean

Whether the flight plan has an approach loaded.


isGpsApproach()

static isGpsApproach(approach): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:462

Utility method to check whether an approach is authorized for GPS guidance.

Parameters

ParameterTypeDescription
approachApproachProcedureThe approach procedure

Returns

boolean

True if GPS guidance is authorized, false otherwise.


isLegAltitudeEdited()

static isLegAltitudeEdited(leg, isAdvancedVNav): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1381

Determines if a flight plan leg's altitude constraint is considered to be edited. If the leg does not have a designated altitude constraint, false will be returned.

Parameters

ParameterTypeDescription
legLegDefinitionA flight plan leg.
isAdvancedVNavbooleanWhether advanced VNAV is supported.

Returns

boolean

Whether the specified flight plan leg's altitude constraint is considered to be edited.


isLocalizerApproach()

static isLocalizerApproach(approach): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:476

Utility method to check for an approach with a a tunable localizer.

Parameters

ParameterTypeDescription
approachApproachProcedureThe approach procedure

Returns

boolean

True if a localizer needs to be tuned, otherwise false.


isPublishedApproachLoaded()

static isPublishedApproachLoaded(plan): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:533

Checks whether a flight plan has an approach loaded.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

boolean

Whether the flight plan has an approach loaded.


isVfrApproachLoaded()

static isVfrApproachLoaded(plan): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:552

Checks whether a flight plan has an approach loaded.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

boolean

Whether the flight plan has an approach loaded.


isVisualApproachLoaded()

static isVisualApproachLoaded(plan): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:542

Checks whether a flight plan has an approach loaded.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

boolean

Whether the flight plan has an approach loaded.


isVtfApproachLoaded()

static isVtfApproachLoaded(plan): boolean

Defined in: src/garminsdk/flightplan/FmsUtils.ts:576

Checks whether a plan has a vectors-to-final approach loaded.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

boolean

Whether the flight plan has a vectors-to-final approach loaded.


onFmsEvent()

Call Signature

static onFmsEvent<ID, K>(id, bus, baseTopic): Consumer<BaseFmsEvents[K]>

Defined in: src/garminsdk/flightplan/FmsUtils.ts:44

Subscribes to one of the event bus topics published by an FMS with a given ID.

Type Parameters
Type Parameter
ID extends string
K extends keyof BaseFmsEvents
Parameters
ParameterTypeDescription
idIDThe ID of the FMS.
busEventBusThe event bus to which to subscribe.
baseTopicKThe base name of the topic to which to subscribe.
Returns

Consumer<BaseFmsEvents[K]>

A consumer for the specified event bus topic.

Call Signature

static onFmsEvent<ID, K>(id, subscriber, baseTopic): Consumer<BaseFmsEvents[K]>

Defined in: src/garminsdk/flightplan/FmsUtils.ts:52

Subscribes to one of the event bus topics published by an FMS with a given ID.

Type Parameters
Type Parameter
ID extends string
K extends keyof BaseFmsEvents
Parameters
ParameterTypeDescription
idIDThe ID of the FMS.
subscriberEventSubscriber<FmsEventsForId<ID>>The event subscriber to use to subscribe.
baseTopicKThe base name of the topic to which to subscribe.
Returns

Consumer<BaseFmsEvents[K]>

A consumer for the specified event bus topic.


reconcileDirectToData()

static reconcileDirectToData(plan): void

Defined in: src/garminsdk/flightplan/FmsUtils.ts:1274

Reconciles a flight plan's Direct-To data with its internal leg structure. Scans the legs of the flight plan for Direct-To legs and sets the segment index and segment leg index of the plan's Direct-To data to point to the leg immediately preceding the first Direct-To leg found, or to -1 for both if the plan contains no Direct-To legs.

Parameters

ParameterTypeDescription
planFlightPlanA flight plan.

Returns

void