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
Parameter | Type | Description |
---|---|---|
query | ApproachProcedure | RnavTypeFlags | The 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
Parameter | Type | Description |
---|---|---|
approach | ApproachProcedure | The 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
Parameter | Type | Description |
---|---|---|
a | Readonly <ApproachDetails > | The first FMS approach details object to compare. |
b | Readonly <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
Parameter | Type | Description |
---|---|---|
approach | ApproachProcedure | The 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
Parameter | Type | Description |
---|---|---|
runway | OneWayRunway | The 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
Parameter | Type | Description |
---|---|---|
airport | string | AirportFacility | The runway's parent airport or its ICAO. |
runway | OneWayRunway | The runway associated with the runway fix. |
isInitialFix | boolean | Whether 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
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | is the facility associated with the arrival |
runwayIcao | string | is 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
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport facility containing the published approach on which the VFR approach is based. |
approachIndex | number | The 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
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | is the airport facility for the visual approach. |
runway | OneWayRunway | is the runway to build the visual approach for. |
finalLegDistance | number | is the distance from the runway to place the faf leg in NM. |
initialLegDistance | number | is the distance from the final leg to place the iaf leg in NM. |
name? | string | is the optional name for the approach. |
finalLegIdent? | string | is the optional name for the faf leg. |
initialLegIdent? | string | is 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
Parameter | Type | Description |
---|---|---|
legs | LegDefinition [] | The legs in the procedure. |
ppos | GeoPoint | The 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
Parameter | Type | Description |
---|---|---|
approach | ApproachProcedure | The approach procedure. |
index | number | The approach index. |
Returns
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
Parameter | Type | Description |
---|---|---|
approach | ApproachProcedure | The approach procedure. |
transitionIndex | number | The approach transition index. |
Returns
The created TransitionListItem.
createEmptyApproachDetails()
static
createEmptyApproachDetails():ApproachDetails
Defined in: src/garminsdk/flightplan/FmsUtils.ts:1614
Creates a new empty, default approach details object.
Returns
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
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
Parameter | Type | Description |
---|---|---|
altitudeMeters | number | The 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
Parameter | Type | Description |
---|---|---|
a | Readonly <FmsFlightPhase > | The first FMS flight phase object to compare. |
b | Readonly <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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | The flight plan to use. |
reverse | boolean | Whether 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
Parameter | Type | Default value | Description |
---|---|---|---|
airport? | AirportFacility | undefined | An airport. |
includeVisual? | boolean | true | Whether to include visual approaches. Defaults to true . |
Returns
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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A flight plan. |
destination | AirportFacility | The 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
Parameter | Type | Description |
---|---|---|
proc | GarminApproachProcedure | The approach procedure. |
Returns
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
Parameter | Type | Description |
---|---|---|
approach | GarminApproachProcedure | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
approach | ApproachProcedure | The approach procedure. |
transitionIndex | number | The 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
Parameter | Type | Description |
---|---|---|
approachItem? | ApproachListItem | The approach procedure to get the transitions for. |
Returns
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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
procedure | Procedure | is the arrival procedure. |
transitionIndex | number | is the index of the enroute transition in the procedure. |
rwyTransitionIndex | number | is 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
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport to which the departure belongs. |
arrival | Procedure | An arrival procedure definition. |
transitionIndex | number | The index of the arrival enroute transition. |
runway | undefined | OneWayRunway | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Default value | Description |
---|---|---|---|
airport | AirportFacility | undefined | An airport facility. |
includeVisual | boolean | false | Whether to include visual approaches. Defaults to false . |
includeRnpAr | boolean | false | Whether 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
Parameter | Type | Description |
---|---|---|
procedure | Procedure | is the departure procedure. |
transitionIndex | number | is the index of the enroute transition in the procedure. |
rwyTransitionIndex | number | is 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
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport to which the departure belongs. |
departure | Procedure | A departure procedure definition. |
transitionIndex | number | The index of the departure enroute transition. |
runway | undefined | OneWayRunway | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A flight plan. |
globalLegIndex | number | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A flight plan. |
segmentIndex | number | The index of the segment containing the leg for which to get the from leg. |
segmentLegIndex | number | The 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
Parameter | Type | Description |
---|---|---|
lateralPlan | FlightPlan | The Lateral Flight Plan. |
segmentIndex | number | The Segment Index. |
segmentLegIndex | number | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
lateralPlan | FlightPlan | The Lateral Flight Plan. |
leg | LegDefinition | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A flight plan. |
segmentIndex | number | The index of the segment containing the leg for which to get the from leg. |
segmentLegIndex | number | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A flight plan. |
segmentIndex | number | The index of the segment containing the leg for which to get the from leg. |
segmentLegIndex | number | The 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
Parameter | Type | Description |
---|---|---|
leg | LegDefinition | The leg for which to get the nominal desired track. |
out | Float64Array | The 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
Parameter | Type | Description |
---|---|---|
publishedSpeedRestriction | number | The published speed. |
segmentType | FlightPlanSegmentType | The 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
Parameter | Type | Default value | Description |
---|---|---|---|
leg | LegDefinition | undefined | The leg definition. |
allowHdg | boolean | true | If 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
Parameter | Type | Description |
---|---|---|
airport? | AirportFacility | An airport. |
Returns
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
Parameter | Type | Description |
---|---|---|
facility | AirportFacility | is 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | The flight plan containing the leg to evaluate. |
leg | LegDefinition | The flight plan leg to evaluate. |
isAdvancedVNav | boolean | Whether 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | The flight plan containing the leg to evaluate. |
leg | LegDefinition | The flight plan leg to evaluate. |
isAdvancedVNav | boolean | Whether this is for advanced vnav mode or not. |
isEditable? | boolean | Whether 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
approach | ApproachProcedure | The 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
Parameter | Type | Description |
---|---|---|
leg | LegDefinition | A flight plan leg. |
isAdvancedVNav | boolean | Whether 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
Parameter | Type | Description |
---|---|---|
approach | ApproachProcedure | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A 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
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the FMS. |
bus | EventBus | The event bus to which to subscribe. |
baseTopic | K | The 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
Parameter | Type | Description |
---|---|---|
id | ID | The ID of the FMS. |
subscriber | EventSubscriber <FmsEventsForId <ID >> | The event subscriber to use to subscribe. |
baseTopic | K | The 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | A flight plan. |
Returns
void