Skip to main content

Class: Fms<ID>

Defined in: src/garminsdk/flightplan/Fms.ts:135

A Garmin flight management system.

Type Parameters

Type ParameterDefault type
ID extends stringany

Constructors

Constructor

new Fms<ID>(isPrimary, bus, flightPlanner, verticalPathCalculator?, options?): Fms<ID>

Defined in: src/garminsdk/flightplan/Fms.ts:246

Creates an instance of the FMS.

Parameters

ParameterTypeDescription
isPrimarybooleanWhether this FMS is the primary instance. Only the primary FMS will execute certain operations that have global effects across the entire airplane.
busEventBusThe event bus.
flightPlannerFlightPlanner<ID>The flight planner.
verticalPathCalculator?VNavPathCalculatorThe vertical path calculator. Required to support the vertical direct-to functionality.
options?Readonly<FmsOptions>Options with which to configure the FMS.

Returns

Fms<ID>

Constructor

new Fms<ID>(isPrimary, bus, flightPlanner, verticalPathCalculator?, isAdvancedVnav?, procedureLegMapper?, visualApproachOptions?): Fms<ID>

Defined in: src/garminsdk/flightplan/Fms.ts:267

Creates an instance of the FMS.

Parameters

ParameterTypeDescription
isPrimarybooleanWhether this FMS is the primary instance. Only the primary FMS will execute certain operations that have global effects across the entire airplane.
busEventBusThe event bus.
flightPlannerFlightPlanner<ID>The flight planner.
verticalPathCalculator?VNavPathCalculatorThe vertical path calculator. Required to support the vertical direct-to functionality.
isAdvancedVnav?booleanWhether advanced VNAV is supported. Defaults to false.
procedureLegMapper?(leg) => undefined | FlightPlanLegA function which transforms unsupported leg types in procedures to supported leg types. If not defined, all legs in procedures will retain their original types.
visualApproachOptions?Readonly<FmsVisualApproachOptions>Options for visual approach procedures. If not defined, then visual approach fix distances will default to 2.5 nautical miles for both runway to FINAL and FINAL to STRGHT.

Returns

Fms<ID>

Properties

bus

readonly bus: EventBus

Defined in: src/garminsdk/flightplan/Fms.ts:279


cdiId

readonly cdiId: string

Defined in: src/garminsdk/flightplan/Fms.ts:189

The ID of the CDI associated with this FMS.


facLoader

readonly facLoader: FacilityLoader

Defined in: src/garminsdk/flightplan/Fms.ts:210

A facility loader instance.


flightPlanner

readonly flightPlanner: FlightPlanner<ID>

Defined in: src/garminsdk/flightplan/Fms.ts:280


isAdvancedVnav

readonly isAdvancedVnav: boolean

Defined in: src/garminsdk/flightplan/Fms.ts:196

Whether advanced VNAV is supported.


isPrimary

readonly isPrimary: boolean

Defined in: src/garminsdk/flightplan/Fms.ts:278


readonly lnavIndex: number

Defined in: src/garminsdk/flightplan/Fms.ts:170

The index of the LNAV associated with the FMS's active flight plan.


ppos

readonly ppos: GeoPoint

Defined in: src/garminsdk/flightplan/Fms.ts:206


verticalPathCalculator?

readonly optional verticalPathCalculator: VNavPathCalculator

Defined in: src/garminsdk/flightplan/Fms.ts:281


vnavIndex

readonly vnavIndex: number

Defined in: src/garminsdk/flightplan/Fms.ts:182

The index of the VNAV associated with the FMS's flight plans, or -1 if this FMS does not support VNAV functionality.


DTO_RANDOM_PLAN_INDEX

readonly static DTO_RANDOM_PLAN_INDEX: 1 = FmsUtils.DTO_RANDOM_PLAN_INDEX

Defined in: src/garminsdk/flightplan/Fms.ts:140

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


PRIMARY_PLAN_INDEX

readonly static PRIMARY_PLAN_INDEX: 0 = FmsUtils.PRIMARY_PLAN_INDEX

Defined in: src/garminsdk/flightplan/Fms.ts:137

The index of the primary flight plan.


PROC_PREVIEW_PLAN_INDEX

readonly static PROC_PREVIEW_PLAN_INDEX: 2 = FmsUtils.PROC_PREVIEW_PLAN_INDEX

Defined in: src/garminsdk/flightplan/Fms.ts:143

The index of the procedure preview flight plan.

Methods

activateApproach()

activateApproach(): void

Defined in: src/garminsdk/flightplan/Fms.ts:3754

Activates an approach. Activating an approach activates a Direct To to the first approach waypoint of the primary flight plan, and attempts to load the primary approach frequency (if one exists) to the nav radios. If the primary flight plan does not have an approach loaded, this method has no effect.

Returns

void


activateLeg()

activateLeg(segmentIndex, segmentLegIndex, planIndex, inhibitImmediateSequence): void

Defined in: src/garminsdk/flightplan/Fms.ts:3396

Activates a flight plan leg.

Parameters

ParameterTypeDefault valueDescription
segmentIndexnumberundefinedThe index of the flight plan segment containing the leg to activate.
segmentLegIndexnumberundefinedThe index of the leg to activate in its containing segment.
planIndexnumberFms.PRIMARY_PLAN_INDEXThe index of the flight plan containing the leg to activate. Defaults to the index of the primary flight plan.
inhibitImmediateSequencebooleanfalseWhether to inhibit immediate automatic sequencing past the activated leg. Defaults to false.

Returns

void


activateMissedApproach()

activateMissedApproach(): void

Defined in: src/garminsdk/flightplan/Fms.ts:3944

Activates the missed approach.

Returns

void


activateNearestLeg()

activateNearestLeg(allowMissedApproach): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:5056

Activates the nearest and most applicable leg of the primary flight plan.

Parameters

ParameterTypeDefault valueDescription
allowMissedApproachbooleanfalseWhether to allow activation of missed approach legs. Defaults to false.

Returns

boolean

Whether a leg was successfully activated.


activateVerticalDirect()

activateVerticalDirect(constraintGlobalLegIndex, altitudeMeters, displayAsFlightLevel, fpa): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:3577

Activates a vertical direct to a selected constraint.

Parameters

ParameterTypeDefault valueDescription
constraintGlobalLegIndexnumberundefinedThe global index of the target flight plan leg of the vertical direct-to.
altitudeMetersnumberundefinedThe target altitude, in meters, of the vertical direct-to.
displayAsFlightLevelbooleanfalseWhether the target altitude should be displayed as a flight level. Defaults to false.
fpaundefined | numberundefinedThe flight path angle, in degrees, for the vertical direct-to. Positive values indicate descending paths. The FPA will be clamped to between 0 and 6 degrees. If not defined, then the flight path angle will be set to the default VNAV descent FPA.

Returns

boolean

Whether the vertical direct was activated or not.


activateVtf()

activateVtf(): Promise<void>

Defined in: src/garminsdk/flightplan/Fms.ts:3787

Activates vectors-to-final. Activating vectors-to-final activates the primary flight plan's vectors-to-final leg, and attempts to load the primary approach frequency (if one exists) to the nav radios. If the primary flight plan has a non-VTF approach loaded, it will be replaced by its VTF counterpart. If the primary flight plan has no approach loaded, this method has no effect.

Returns

Promise<void>


addUserFacility()

addUserFacility(userFacility): void

Defined in: src/garminsdk/flightplan/Fms.ts:880

Adds a user facility.

Parameters

ParameterTypeDescription
userFacilityUserFacilitythe facility to add.

Returns

void


buildAirwayPreviewSegment()

buildAirwayPreviewSegment(airway, entry, exit): number

Defined in: src/garminsdk/flightplan/Fms.ts:4658

Builds a temporary flight plan to preview an airway entry.

Parameters

ParameterTypeDescription
airwayAirwayObjectThe airway object.
entryIntersectionFacilityThe entry intersection facility.
exitIntersectionFacilityThe exit intersection facility.

Returns

number

the index of the temporary flight plan.


buildProcedurePreviewPlan()

buildProcedurePreviewPlan(calculator, facility, procType, procIndex, transIndex, oneWayRunway?, rwyTransIndex?, visualRunwayNumber?, visualRunwayDesignator?): Promise<FlightPlan>

Defined in: src/garminsdk/flightplan/Fms.ts:4301

Builds a flight plan to preview a procedure.

Parameters

ParameterTypeDescription
calculatorFlightPathCalculatorThe flight path calculator to assign to the preview plan.
facilityAirportFacilityThe airport facility to load the approach from
procTypeProcedureTypeThe type of procedure to preview.
procIndexnumberThe procedure index selected.
transIndexnumberThe transition index selected.
oneWayRunway?OneWayRunwayThe one way runway to build the preview with, if any.
rwyTransIndex?numberThe runway transition index selected, if any.
visualRunwayNumber?numberis the visual runway number, if any.
visualRunwayDesignator?RunwayDesignatoris the visual runway designator, if any.

Returns

Promise<FlightPlan>

A Promise which is fulfilled with whether the preview plan was successfully built.


buildProcedureTransitionPreviewPlan()

buildProcedureTransitionPreviewPlan(calculator, facility, procType, procIndex, excludeTransitionIndex, rwyTransIndex?): Promise<FlightPlan>

Defined in: src/garminsdk/flightplan/Fms.ts:4402

Builds a flight plan to preview procedure transitions.

Parameters

ParameterTypeDescription
calculatorFlightPathCalculatorThe flight path calculator to assign to the preview plan.
facilityAirportFacilityThe airport facility to which the procedure to preview belongs.
procTypeProcedureTypeThe type of procedure to preview.
procIndexnumberThe index of the procedure to preview.
excludeTransitionIndexnumberThe index of the transition to exclude in the preview.
rwyTransIndex?numberThe index of the procedure's runway transition.

Returns

Promise<FlightPlan>

The index of the procedure transition preview plan.


buildVfrApproachPreviewPlan()

buildVfrApproachPreviewPlan(calculator, facility, approachIndex, isVtf): Promise<FlightPlan>

Defined in: src/garminsdk/flightplan/Fms.ts:4629

Builds a flight plan to preview a VFR approach procedure.

Parameters

ParameterTypeDescription
calculatorFlightPathCalculatorThe flight path calculator to assign to the preview plan.
facilityAirportFacilityThe airport facility containing the published approach on which the VFR approach to preview is based.
approachIndexnumberThe index of the published approach on which the VFR approach to preview is based.
isVtfbooleanWhether to preview the approach as a vectors-to-final (VTF) approach.

Returns

Promise<FlightPlan>

A Promise which will be fulfilled with the preview plan after it has been built.


canActivateApproach()

canActivateApproach(): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:3740

Checks whether an approach can be activated. An approach can be activated if and only if the primary flight plan has a non-vectors-to-final approach loaded.

Returns

boolean

Whether an approach can be activated.


canActivateLeg()

canActivateLeg(segmentIndex, segmentLegIndex): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:736

Checks whether a leg in the primary flight plan can be manually activated.

Parameters

ParameterTypeDescription
segmentIndexnumberThe index of the segment in which the leg resides.
segmentLegIndexnumberThe index of the leg in its segment.

Returns

boolean

Whether the leg can be manually activated.


canActivateVtf()

canActivateVtf(): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:3772

Checks whether vectors-to-final can be activated. VTF can be activated if and only if the primary flight plan has an approach loaded.

Returns

boolean

Whether vectors-to-final can be activated.


canApproachLoad()

canApproachLoad(): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:1878

Method to check whether an approach can load, or only activate.

Returns

boolean

true if the approach can be loaded and not activated, otherwise the approach can only be immediatly activated.


cancelDirectTo()

cancelDirectTo(): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:4183

Cancels the currently active on-route or off-route direct-to.

Returns

boolean

Whether an active direct-to was cancelled.


cancelVerticalDirectTo()

cancelVerticalDirectTo(): void

Defined in: src/garminsdk/flightplan/Fms.ts:3658

Cancels the currently active vertical direct-to.

Returns

void


canDirectTo()

canDirectTo(segmentIndex, segmentLegIndex): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:787

Checks whether a leg in the primary flight plan is a valid direct to target.

Parameters

ParameterTypeDescription
segmentIndexnumberThe index of the segment in which the leg resides.
segmentLegIndexnumberThe index of the leg in its segment.

Returns

boolean

Whether the leg is a valid direct to target.

Throws

Error if a leg could not be found at the specified location.


canMissedApproachActivate()

canMissedApproachActivate(): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:3904

Checks if the missed approach can be activated.

Returns

boolean

whether the missed approach can be activated.


createDirectToExisting()

createDirectToExisting(segmentIndex, segmentLegIndex, course?, deletePriorConstraints?): void

Defined in: src/garminsdk/flightplan/Fms.ts:4012

Creates and activates a Direct-To to an existing waypoint in the primary flight plan (on-route Direct-To).

Parameters

ParameterTypeDefault valueDescription
segmentIndexnumberundefinedThe index of the segment containing the Direct-To's target flight plan leg.
segmentLegIndexnumberundefinedThe index of the Direct-To's target flight plan leg in its containing segment.
course?numberundefinedThe magnetic course for the Direct-To, in degrees. If not defined, then the Direct-To will be initiated from the airplane's present position.
deletePriorConstraints?booleanfalseWhether to delete all altitude constraints before the Direct-To target leg. User-defined flight path angles will be preserved.

Returns

void


createDirectToRandom()

createDirectToRandom(target, course?): void

Defined in: src/garminsdk/flightplan/Fms.ts:3956

Creates and activates a Direct-To targeting a waypoint not in the primary flight plan (off-route Direct-To).

Parameters

ParameterTypeDescription
targetstring | FacilityThe Direct-To's target waypoint facility or its ICAO.
course?numberThe magnetic course for the Direct-To, in degrees. If not defined, then the Direct-To will be initiated from the airplane's present position.

Returns

void


deleteFlightPlanName()

deleteFlightPlanName(planIndex): void

Defined in: src/garminsdk/flightplan/Fms.ts:547

Clears the name of the flight plan.

Parameters

ParameterTypeDescription
planIndexnumberThe index of the plan the clear the name for.

Returns

void


deletePrimaryFlightPlan()

deletePrimaryFlightPlan(): Promise<void>

Defined in: src/garminsdk/flightplan/Fms.ts:4268

Empties the primary flight plan and deletes its name.

Returns

Promise<void>


editHold()

editHold(planIndex, segmentIndex, segmentLegIndex, holdLeg): undefined | LegDefinition

Defined in: src/garminsdk/flightplan/Fms.ts:5026

Edits a hold in a flight plan. The existing hold leg will be removed from the flight plan and a new hold leg with the edited parameters will be inserted in its place.

Parameters

ParameterTypeDescription
planIndexnumberThe index of the flight plan containing the hold to edit.
segmentIndexnumberThe index of the segment containing the hold to edit.
segmentLegIndexnumberThe index of the hold leg in its containing segment.
holdLegFlightPlanLegA leg describing the new hold parameters to apply.

Returns

undefined | LegDefinition

The edited hold leg, or undefined if the hold could not be edited.


emptyPrimaryFlightPlan()

emptyPrimaryFlightPlan(): Promise<void>

Defined in: src/garminsdk/flightplan/Fms.ts:4223

Empties the primary flight plan.

Returns

Promise<void>


findFirstEnrouteSegmentIndex()

findFirstEnrouteSegmentIndex(plan): number

Defined in: src/garminsdk/flightplan/Fms.ts:1827

Method to find the first enroute segment of the supplied flight plan.

Parameters

ParameterTypeDescription
planFlightPlanis the flight plan to find the first enroute segment in.

Returns

number

a segment index.


findLastEnrouteSegmentIndex()

findLastEnrouteSegmentIndex(plan): number

Defined in: src/garminsdk/flightplan/Fms.ts:1842

Method to find the last enroute segment of the supplied flight plan.

Parameters

ParameterTypeDescription
planFlightPlanis the flight plan to find the last enroute segment in.

Returns

number

a segment index.


getAirwayDistance()

getAirwayDistance(segmentIndex): number

Defined in: src/garminsdk/flightplan/Fms.ts:1181

Method to get the distance of an airway segment.

Parameters

ParameterTypeDescription
segmentIndexnumberis the index of the segment of the airway.

Returns

number

the cumulative distance for the airway segment.


getApproachRunway()

getApproachRunway(): null | OneWayRunway

Defined in: src/garminsdk/flightplan/Fms.ts:530

Gets the approach runway:

Returns

null | OneWayRunway

Selected approach runway


getDirectToFlightPlan()

getDirectToFlightPlan(): FlightPlan

Defined in: src/garminsdk/flightplan/Fms.ts:521

Gets the Direct To Random flight plan.

Returns

FlightPlan

The Direct To Random flight plan.

Throws

Error if the Direct To Random flight plan does not exist.


getDirectToState()

getDirectToState(): DirectToState

Defined in: src/garminsdk/flightplan/Fms.ts:817

Gets the current Direct To State.

Returns

DirectToState

the DirectToState.


getDirectToTargetIcao()

getDirectToTargetIcao(): undefined | string

Defined in: src/garminsdk/flightplan/Fms.ts:838

Gets the ICAO string of the current Direct To target.

Returns

undefined | string

The ICAO string of the current Direct To target, or undefined if Direct To is not active.


getEventSubscriber()

getEventSubscriber(): EventSubscriber<FmsEventsForId<ID>>

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

Gets an event bus subscriber for topics published by this FMS.

Returns

EventSubscriber<FmsEventsForId<ID>>

An event bus subscriber for topics published by this flight planner.


getFlightPlan()

getFlightPlan(index): FlightPlan

Defined in: src/garminsdk/flightplan/Fms.ts:487

Gets a specified flightplan, or by default the primary flight plan.

Parameters

ParameterTypeDefault valueDescription
indexnumberFms.PRIMARY_PLAN_INDEXThe index of the flight plan.

Returns

FlightPlan

the requested flight plan

Throws

Error if no flight plan exists at the specified index.


getPrimaryFlightPlan()

getPrimaryFlightPlan(): FlightPlan

Defined in: src/garminsdk/flightplan/Fms.ts:504

Gets the primary flight plan.

Returns

FlightPlan

The primary flight plan.

Throws

Error if the primary flight plan does not exist.


getVerticalDirectRequiredFpa()

getVerticalDirectRequiredFpa(constraintGlobalLegIndex, altitudeMeters): Promise<undefined | number>

Defined in: src/garminsdk/flightplan/Fms.ts:3506

Gets the required flight path angle, in degrees, for a vertical direct-to if it were to be activated immediately. Positive angles represent descending paths.

Parameters

ParameterTypeDescription
constraintGlobalLegIndexnumberThe global index of the target flight plan leg of the vertical direct-to.
altitudeMetersnumberThe target altitude, in meters, of the vertical direct-to.

Returns

Promise<undefined | number>

The required flight path angle, in degrees, for the specified vertical direct-to if it were to be activated immediately, or undefined if an angle cannot be calculated. Positive angles represent descending paths.


hasConstraint()

hasConstraint(segmentIndex, segmentLegIndex): undefined | number

Defined in: src/garminsdk/flightplan/Fms.ts:3068

Method to check if a leg constraint can be reverted to the nav data constraint.

Parameters

ParameterTypeDescription
segmentIndexnumberThe segment index to insert the constraint at.
segmentLegIndexnumberThe leg index to insert the constraint at.

Returns

undefined | number

Whether the leg has a nav data constraint to be reverted to.


hasDirectToFlightPlan()

hasDirectToFlightPlan(): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:512

Checks whether the Direct To Random flight plan exists.

Returns

boolean

Whether the Direct To Random flight plan exists.


hasFlightPlan()

hasFlightPlan(index): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:477

Checks whether an indexed flight plan exists.

Parameters

ParameterTypeDescription
indexnumberA flight plan index.

Returns

boolean

Whether a flight plan at the specified index exists.


hasPrimaryFlightPlan()

hasPrimaryFlightPlan(): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:495

Checks whether the primary flight plan exists.

Returns

boolean

Whether the primary flight plan exists.


initPrimaryFlightPlan()

initPrimaryFlightPlan(force): Promise<void>

Defined in: src/garminsdk/flightplan/Fms.ts:463

Initializes the primary flight plan. Does nothing if the primary flight plan already exists.

Parameters

ParameterTypeDefault valueDescription
forcebooleanfalseWhether to force a new primary flight plan to be created, even if one already exists

Returns

Promise<void>


insertAirwaySegment()

insertAirwaySegment(airway, entry, exit, segmentIndex, segmentLegIndex): number

Defined in: src/garminsdk/flightplan/Fms.ts:4681

Inserts an airway segment into the flight plan.

Parameters

ParameterTypeDescription
airwayAirwayObjectThe airway object.
entryIntersectionFacilityThe entry intersection facility.
exitIntersectionFacilityThe exit intersection facility.
segmentIndexnumberThe index of the segment containing the airway entry leg.
segmentLegIndexnumberThe index of the airway entry leg in its containing leg.

Returns

number

The index of the inserted airway segment.


insertApproach()

insertApproach(facility, approachIndex, approachTransitionIndex, visualRunwayNumber?, visualRunwayDesignator?, skipCourseReversal?, activate?): Promise<boolean>

Defined in: src/garminsdk/flightplan/Fms.ts:1902

Method to add or replace an approach procedure in the flight plan.

Parameters

ParameterTypeDefault valueDescription
facilityAirportFacilityundefinedis the facility that contains the procedure to add.
approachIndexnumberundefinedis the index of the approach procedure.
approachTransitionIndexnumberundefinedis the index of the approach transition.
visualRunwayNumber?numberundefinedis the visual runway number, if any.
visualRunwayDesignator?RunwayDesignatorundefinedis the visual runway designator, if any.
skipCourseReversal?booleanfalseWhether to skip the course reversal. False by default.
activate?booleanfalseWhether to activate the approach once it is loaded into the flight plan. Defaults to false.

Returns

Promise<boolean>

A Promise which is fulfilled with whether the approach was inserted.


insertArrival()

insertArrival(facility, arrivalIndex, arrivalRunwayTransitionIndex, enrouteTransitionIndex, arrivalRunway?): void

Defined in: src/garminsdk/flightplan/Fms.ts:1605

Method to add or replace an arrival procedure in the flight plan.

Parameters

ParameterTypeDescription
facilityAirportFacilityis the facility that contains the procedure to add.
arrivalIndexnumberis the index of the arrival procedure.
arrivalRunwayTransitionIndexnumberis the index of the arrival runway transition.
enrouteTransitionIndexnumberis the index of the enroute transition.
arrivalRunway?OneWayRunwayis the one way runway to set as the destination leg.

Returns

void


insertDeparture()

insertDeparture(facility, departureIndex, departureRunwayIndex, enrouteTransitionIndex, oneWayRunway?): void

Defined in: src/garminsdk/flightplan/Fms.ts:1462

Method to add or replace a departure procedure in the flight plan.

Parameters

ParameterTypeDescription
facilityAirportFacilityis the facility that contains the procedure to add.
departureIndexnumberis the index of the departure
departureRunwayIndexnumberis the index of the runway transition
enrouteTransitionIndexnumberis the index of the enroute transition
oneWayRunway?OneWayRunwayis the one way runway to set as the origin leg.

Returns

void


insertHold()

insertHold(planIndex, segmentIndex, segmentLegIndex, holdLeg): undefined | LegDefinition

Defined in: src/garminsdk/flightplan/Fms.ts:4967

Inserts a hold-at-waypoint leg to a flight plan. The hold leg will be inserted immediately after the specified parent leg. The hold leg must have the same fix as the parent leg.

Parameters

ParameterTypeDescription
planIndexnumberThe index of the flight plan to add the hold to.
segmentIndexnumberThe index of the segment that contains the hold's parent leg.
segmentLegIndexnumberThe index of the hold's parent leg in its segment.
holdLegFlightPlanLegThe hold leg to add.

Returns

undefined | LegDefinition

The inserted hold-at-waypoint leg, or undefined if the leg could not be inserted.


insertVfrApproach()

insertVfrApproach(facility, approachIndex, isVtf, activate): Promise<boolean>

Defined in: src/garminsdk/flightplan/Fms.ts:2299

Inserts a VFR approach into the primary flight plan, replacing any approach that is already loaded.

VFR approaches are distinct from both visual instrument approaches, which are a type of published IFR approach, and Garmin visual approaches, which are auto-generated approaches not based on any published approach. A VFR approach is based on a published IFR approach, but only includes the flight plan legs between and including those ending at the final approach fix (faf) and missed approach point (map). Flight plan legs in the missed approach procedure are not included.

Parameters

ParameterTypeDefault valueDescription
facilityAirportFacilityundefinedThe airport facility containing the published approach on which the VFR approach to insert is based.
approachIndexnumberundefinedThe index of the published approach on which the VFR approach to insert is based.
isVtfbooleanundefinedWhether to insert the approach as a vectors-to-final (VTF) approach.
activatebooleanfalseWhether to activate the approach once it is loaded into the flight plan. Defaults to false.

Returns

Promise<boolean>

A Promise which is fulfilled with whether the approach was inserted.


insertWaypoint()

insertWaypoint(segmentIndex, facility, legIndex?): undefined | LegDefinition

Defined in: src/garminsdk/flightplan/Fms.ts:921

Inserts a waypoint into the primary flight plan.

Parameters

ParameterTypeDescription
segmentIndexnumberThe index of the flight plan segment into which to insert the waypoint.
facilityFacilityThe waypoint facility to insert.
legIndex?numberThe index in the segment at which to insert the waypoint. If a leg already exists at the index, the existing leg and all subsequent legs will be shifted to the right. If not defined, the waypoint will be inserted at the end of the segment.

Returns

undefined | LegDefinition

The leg that was inserted into the flight plan, or undefined if the insertion operation could not be carried out.


invertFlightplan()

invertFlightplan(): void

Defined in: src/garminsdk/flightplan/Fms.ts:1339

Method to invert the flightplan.

Returns

void


isApproachVtf()

isApproachVtf(): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:3892

Method to check if the approach is VTF.

Returns

boolean

whether the approach is VTF.


isConstraintUser()

isConstraintUser(segmentIndex, segmentLegIndex): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:3051

Method to check if a leg has a user specified constraint.

Parameters

ParameterTypeDescription
segmentIndexnumberThe segment index to insert the constraint at.
segmentLegIndexnumberThe leg index to insert the constraint at.

Returns

boolean

Whether the leg has a user constraint.

Deprecated

Use FmsUtils.isLegAltitudeEdited in preference to this.


isFirstEnrouteSegment()

isFirstEnrouteSegment(segmentIndex): boolean

Defined in: src/garminsdk/flightplan/Fms.ts:865

Checks if a segment is the first enroute segment that is not an airway.

Parameters

ParameterTypeDescription
segmentIndexnumberis the segment index of the segment to check

Returns

boolean

whether or not the segment is the first enroute segment that is not an airway.


moveCurrentDestinationLegToEnroute()

moveCurrentDestinationLegToEnroute(): void

Defined in: src/garminsdk/flightplan/Fms.ts:1258

Moves any current legs in the destination segment to the end of the last enroute segment.

Returns

void


onEvent()

onEvent<K>(baseTopic): Consumer<BaseFmsEvents[K]>

Defined in: src/garminsdk/flightplan/Fms.ts:452

Subscribes to one of the event bus topics published by this FMS.

Type Parameters

Type Parameter
K extends keyof BaseFmsEvents

Parameters

ParameterTypeDescription
baseTopicKThe base name of the topic to which to subscribe.

Returns

Consumer<BaseFmsEvents[K]>

A consumer for the specified event bus topic.


removeAirway()

removeAirway(segmentIndex): void

Defined in: src/garminsdk/flightplan/Fms.ts:4879

Method to remove an airway from the flight plan.

Parameters

ParameterTypeDescription
segmentIndexnumberis the segment index of the airway to remove.

Returns

void


removeApproach()

removeApproach(): Promise<void>

Defined in: src/garminsdk/flightplan/Fms.ts:3336

Method to remove the approach from the flight plan.

Returns

Promise<void>


removeArrival()

removeArrival(): Promise<void>

Defined in: src/garminsdk/flightplan/Fms.ts:3297

Method to remove the arrival from the flight plan.

Returns

Promise<void>


removeDeparture()

removeDeparture(): Promise<void>

Defined in: src/garminsdk/flightplan/Fms.ts:3258

Method to remove the departure from the flight plan.

Returns

Promise<void>


removeDestLegFromSegments()

removeDestLegFromSegments(): void

Defined in: src/garminsdk/flightplan/Fms.ts:1275

Method to remove runway or airport legs from segments where they shouldn't exist.

Returns

void


removeUserFacility()

removeUserFacility(userFacility): void

Defined in: src/garminsdk/flightplan/Fms.ts:888

Removes a user facility.

Parameters

ParameterTypeDescription
userFacilityUserFacilitythe facility to remove.

Returns

void


removeWaypoint()

removeWaypoint(segmentIndex, segmentLegIndex): boolean

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

Removes a leg to a waypoint from the primary flight plan.

Parameters

ParameterTypeDescription
segmentIndexnumberThe index of the segment containing the leg to remove.
segmentLegIndexnumberThe index of the leg to remove in its segment.

Returns

boolean

Whether the waypoint was successfully removed.


resetAllFlightPlans()

resetAllFlightPlans(): Promise<void>

Defined in: src/garminsdk/flightplan/Fms.ts:4282

Resets all flight plans to their initial empty states, and cancels any active off-route Direct-To.

Returns

Promise<void>


revertAltitudeConstraint()

revertAltitudeConstraint(segmentIndex, segmentLegIndex): void

Defined in: src/garminsdk/flightplan/Fms.ts:2846

Reverts an altitude constraint to the published data.

Parameters

ParameterTypeDescription
segmentIndexnumberThe segment index to revert the constraint at.
segmentLegIndexnumberThe leg index to revert the constraint at.

Returns

void


revertSpeedConstraint()

revertSpeedConstraint(planIndex, segmentIndex, segmentLegIndex): void

Defined in: src/garminsdk/flightplan/Fms.ts:2948

Method to revert the speed constraint back to published value.

Parameters

ParameterTypeDescription
planIndexnumberThe flight plan index to use.
segmentIndexnumberThe segment index to revert the constraint at.
segmentLegIndexnumberThe leg index to revert the constraint at.

Returns

void


setDestination()

setDestination(airport, runway?): void

Defined in: src/garminsdk/flightplan/Fms.ts:1231

Sets the primary flight plan's destination airport and runway.

Parameters

ParameterTypeDescription
airportundefined | string | AirportFacilityThe destination airport to set or its ICAO, or undefined if the destination airport should be cleared from the flight plan.
runway?OneWayRunwayThe destination runway to set, or undefined if the destination runway should be cleared from the flight plan. Ignored if airport is undefined.

Returns

void


setFlightPlanName()

setFlightPlanName(planIndex, name): void

Defined in: src/garminsdk/flightplan/Fms.ts:539

Sets the name of the flight plan.

Parameters

ParameterTypeDescription
planIndexnumberThe index of the plan the change the name for.
namestringThe new name for the flight plan.

Returns

void


setOrigin()

setOrigin(airport, runway?): void

Defined in: src/garminsdk/flightplan/Fms.ts:1198

Sets the primary flight plan's origin airport and runway. Any departure procedure loaded in the flight plan will be removed.

Parameters

ParameterTypeDescription
airportundefined | string | AirportFacilityThe origin airport to set or its ICAO, or undefined if the origin airport should be cleared from the flight plan.
runway?OneWayRunwayThe origin runway to set, or undefined if the origin runway should be cleared from the flight plan. Ignored if airport is undefined.

Returns

void


setUserConstraint()

setUserConstraint(segmentIndex, segmentLegIndex, altitudeFeet?, displayAsFlightLevel?): void

Defined in: src/garminsdk/flightplan/Fms.ts:2765

Method to set a user altitude constraint.

Parameters

ParameterTypeDefault valueDescription
segmentIndexnumberundefinedThe segment index to insert the constraint at.
segmentLegIndexnumberundefinedThe leg index to insert the constraint at.
altitudeFeet?numberundefinedThe altitude, in feet, to set the constraint at; if undefined, delete user constraint.
displayAsFlightLevel?booleanfalseWhether the constraint should be displayed as a flight level. Defaults to false.

Returns

void

Throws

Error if altitude is NaN.


setUserConstraintAdvanced()

setUserConstraintAdvanced(segmentIndex, segmentLegIndex, phase, altDesc, altitude1Meters, displayAltitude1AsFlightLevel, altitude2Meters, displayAltitude2AsFlightLevel): void

Defined in: src/garminsdk/flightplan/Fms.ts:2803

Method to set a user altitude constraint.

Parameters

ParameterTypeDefault valueDescription
segmentIndexnumberundefinedThe segment index to insert the constraint at.
segmentLegIndexnumberundefinedThe leg index to insert the constraint at.
phaseVerticalFlightPhaseundefinedThe vertical restriction type.
altDescAltitudeRestrictionTypeundefinedThe altitude restriction type.
altitude1MetersnumberundefinedThe altitude 1 in meters.
displayAltitude1AsFlightLevelbooleanundefinedWhether to display altitude 1 as a flight level.
altitude2Metersnumber0The altitude 2 in meters. Optional.
displayAltitude2AsFlightLevelbooleanfalseWhether to display altitude 2 as a flight level.

Returns

void

Throws

Error if either altitude is NaN.


setUserFpa()

setUserFpa(planIndex, segmentIndex, segmentLegIndex, fpa?): void

Defined in: src/garminsdk/flightplan/Fms.ts:2976

Method to set a user flight path angle.

Parameters

ParameterTypeDescription
planIndexnumberThe flight plan index to use.
segmentIndexnumberThe segment index to insert the fpa at.
segmentLegIndexnumberThe leg index to insert the fpa at.
fpa?numberThe fpa, in degrees, to set the fpa to; if undefined, deletes the fpa.

Returns

void

Throws

Error if fpa is NaN.


setUserSpeedConstraint()

setUserSpeedConstraint(planIndex, segmentIndex, segmentLegIndex, speed?, speedUnit?, speedDesc?): void

Defined in: src/garminsdk/flightplan/Fms.ts:2903

Method to set a user speed constraint.

Parameters

ParameterTypeDescription
planIndexnumberThe flight plan index to use.
segmentIndexnumberThe segment index to insert the constraint at.
segmentLegIndexnumberThe leg index to insert the constraint at.
speed?numberThe speed, in knots IAS or Mach (should match the given speedDesc), to set the constraint at; if undefined, delete user constraint.
speedUnit?SpeedUnitThe speed units.
speedDesc?SpeedRestrictionTypeThe speed restriction type to set.

Returns

void

Throws

Error if speed is NaN.