Skip to main content

Class: Fms<ID>

A Garmin flight management system.

Type parameters

NameType
IDextends string = any

Constructors

constructor

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

Creates an instance of the FMS.

Type parameters

NameType
IDextends string = any

Parameters

NameTypeDescription
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>

Defined in

src/garminsdk/flightplan/Fms.ts:261

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

Creates an instance of the FMS.

Type parameters

NameType
IDextends string = any

Parameters

NameTypeDescription
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: FlightPlanLeg) => 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>

Defined in

src/garminsdk/flightplan/Fms.ts:282

Properties

bus

Readonly bus: EventBus

Defined in

src/garminsdk/flightplan/Fms.ts:294


cdiId

Readonly cdiId: string

The ID of the CDI associated with this FMS.

Defined in

src/garminsdk/flightplan/Fms.ts:189


facLoader

Readonly facLoader: FacilityLoader

A facility loader instance.

Defined in

src/garminsdk/flightplan/Fms.ts:210


flightPlanner

Readonly flightPlanner: FlightPlanner<ID>

Defined in

src/garminsdk/flightplan/Fms.ts:295


isAdvancedVnav

Readonly isAdvancedVnav: boolean

Whether advanced VNAV is supported.

Defined in

src/garminsdk/flightplan/Fms.ts:196


isPrimary

Readonly isPrimary: boolean

Defined in

src/garminsdk/flightplan/Fms.ts:293


Readonly lnavIndex: number

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

Defined in

src/garminsdk/flightplan/Fms.ts:170


ppos

Readonly ppos: GeoPoint

Defined in

src/garminsdk/flightplan/Fms.ts:206


verticalPathCalculator

Optional Readonly verticalPathCalculator: VNavPathCalculator

Defined in

src/garminsdk/flightplan/Fms.ts:296


vnavIndex

Readonly vnavIndex: number

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

Defined in

src/garminsdk/flightplan/Fms.ts:182


DTO_RANDOM_PLAN_INDEX

Static Readonly DTO_RANDOM_PLAN_INDEX: 1

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

Defined in

src/garminsdk/flightplan/Fms.ts:140


PRIMARY_PLAN_INDEX

Static Readonly PRIMARY_PLAN_INDEX: 0

The index of the primary flight plan.

Defined in

src/garminsdk/flightplan/Fms.ts:137


PROC_PREVIEW_PLAN_INDEX

Static Readonly PROC_PREVIEW_PLAN_INDEX: 2

The index of the procedure preview flight plan.

Defined in

src/garminsdk/flightplan/Fms.ts:143

Methods

activateApproach

activateApproach(): void

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

Defined in

src/garminsdk/flightplan/Fms.ts:3691


activateLeg

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

Activates a flight plan leg.

Parameters

NameTypeDefault 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

Defined in

src/garminsdk/flightplan/Fms.ts:3333


activateMissedApproach

activateMissedApproach(): void

Activates the missed approach.

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:3881


activateNearestLeg

activateNearestLeg(allowMissedApproach?): boolean

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

Parameters

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

Returns

boolean

Whether a leg was successfully activated.

Defined in

src/garminsdk/flightplan/Fms.ts:4993


activateVerticalDirect

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

Activates a vertical direct to a selected constraint.

Parameters

NameTypeDefault 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.

Defined in

src/garminsdk/flightplan/Fms.ts:3514


activateVtf

activateVtf(): Promise<void>

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>

Defined in

src/garminsdk/flightplan/Fms.ts:3724


addUserFacility

addUserFacility(userFacility): void

Adds a user facility.

Parameters

NameTypeDescription
userFacilityUserFacilitythe facility to add.

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:895


buildAirwayPreviewSegment

buildAirwayPreviewSegment(airway, entry, exit): number

Builds a temporary flight plan to preview an airway entry.

Parameters

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

Returns

number

the index of the temporary flight plan.

Defined in

src/garminsdk/flightplan/Fms.ts:4595


buildProcedurePreviewPlan

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

Builds a flight plan to preview a procedure.

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:4238


buildProcedureTransitionPreviewPlan

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

Builds a flight plan to preview procedure transitions.

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:4339


buildVfrApproachPreviewPlan

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

Builds a flight plan to preview a VFR approach procedure.

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:4566


canActivateApproach

canActivateApproach(): boolean

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.

Defined in

src/garminsdk/flightplan/Fms.ts:3677


canActivateLeg

canActivateLeg(segmentIndex, segmentLegIndex): boolean

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

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:751


canActivateVtf

canActivateVtf(): boolean

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.

Defined in

src/garminsdk/flightplan/Fms.ts:3709


canApproachLoad

canApproachLoad(): boolean

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.

Defined in

src/garminsdk/flightplan/Fms.ts:1842


canDirectTo

canDirectTo(segmentIndex, segmentLegIndex): boolean

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

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:802


canMissedApproachActivate

canMissedApproachActivate(): boolean

Checks if the missed approach can be activated.

Returns

boolean

whether the missed approach can be activated.

Defined in

src/garminsdk/flightplan/Fms.ts:3841


cancelDirectTo

cancelDirectTo(): boolean

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

Returns

boolean

Whether an active direct-to was cancelled.

Defined in

src/garminsdk/flightplan/Fms.ts:4120


cancelVerticalDirectTo

cancelVerticalDirectTo(): void

Cancels the currently active vertical direct-to.

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:3595


createDirectToExisting

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

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

Parameters

NameTypeDefault 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.
deletePriorConstraintsbooleanfalseWhether to delete all altitude constraints before the Direct-To target leg. User-defined flight path angles will be preserved.

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:3949


createDirectToRandom

createDirectToRandom(target, course?): void

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

Parameters

NameTypeDescription
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

Defined in

src/garminsdk/flightplan/Fms.ts:3893


deleteFlightPlanName

deleteFlightPlanName(planIndex): void

Clears the name of the flight plan.

Parameters

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

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:562


deletePrimaryFlightPlan

deletePrimaryFlightPlan(): Promise<void>

Empties the primary flight plan and deletes its name.

Returns

Promise<void>

Defined in

src/garminsdk/flightplan/Fms.ts:4205


editHold

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

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

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:4963


emptyPrimaryFlightPlan

emptyPrimaryFlightPlan(): Promise<void>

Empties the primary flight plan.

Returns

Promise<void>

Defined in

src/garminsdk/flightplan/Fms.ts:4160


findFirstEnrouteSegmentIndex

findFirstEnrouteSegmentIndex(plan): number

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

Parameters

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

Returns

number

a segment index.

Defined in

src/garminsdk/flightplan/Fms.ts:1791


findLastEnrouteSegmentIndex

findLastEnrouteSegmentIndex(plan): number

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

Parameters

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

Returns

number

a segment index.

Defined in

src/garminsdk/flightplan/Fms.ts:1806


getAirwayDistance

getAirwayDistance(segmentIndex): number

Method to get the distance of an airway segment.

Parameters

NameTypeDescription
segmentIndexnumberis the index of the segment of the airway.

Returns

number

the cumulative distance for the airway segment.

Defined in

src/garminsdk/flightplan/Fms.ts:1196


getApproachRunway

getApproachRunway(): null | OneWayRunway

Gets the approach runway:

Returns

null | OneWayRunway

Selected approach runway

Defined in

src/garminsdk/flightplan/Fms.ts:545


getDirectToFlightPlan

getDirectToFlightPlan(): FlightPlan

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.

Defined in

src/garminsdk/flightplan/Fms.ts:536


getDirectToState

getDirectToState(): DirectToState

Gets the current Direct To State.

Returns

DirectToState

the DirectToState.

Defined in

src/garminsdk/flightplan/Fms.ts:832


getDirectToTargetIcao

getDirectToTargetIcao(): undefined | string

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.

Defined in

src/garminsdk/flightplan/Fms.ts:853


getEventSubscriber

getEventSubscriber(): EventSubscriber<FmsEventsForId<ID>>

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.

Defined in

src/garminsdk/flightplan/Fms.ts:458


getFlightPlan

getFlightPlan(index?): FlightPlan

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

Parameters

NameTypeDefault 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.

Defined in

src/garminsdk/flightplan/Fms.ts:502


getPrimaryFlightPlan

getPrimaryFlightPlan(): FlightPlan

Gets the primary flight plan.

Returns

FlightPlan

The primary flight plan.

Throws

Error if the primary flight plan does not exist.

Defined in

src/garminsdk/flightplan/Fms.ts:519


getVerticalDirectRequiredFpa

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

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

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:3443


hasConstraint

hasConstraint(segmentIndex, segmentLegIndex): undefined | number

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

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:3005


hasDirectToFlightPlan

hasDirectToFlightPlan(): boolean

Checks whether the Direct To Random flight plan exists.

Returns

boolean

Whether the Direct To Random flight plan exists.

Defined in

src/garminsdk/flightplan/Fms.ts:527


hasFlightPlan

hasFlightPlan(index): boolean

Checks whether an indexed flight plan exists.

Parameters

NameTypeDescription
indexnumberA flight plan index.

Returns

boolean

Whether a flight plan at the specified index exists.

Defined in

src/garminsdk/flightplan/Fms.ts:492


hasPrimaryFlightPlan

hasPrimaryFlightPlan(): boolean

Checks whether the primary flight plan exists.

Returns

boolean

Whether the primary flight plan exists.

Defined in

src/garminsdk/flightplan/Fms.ts:510


initPrimaryFlightPlan

initPrimaryFlightPlan(force?): Promise<void>

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

Parameters

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

Returns

Promise<void>

Defined in

src/garminsdk/flightplan/Fms.ts:478


insertAirwaySegment

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

Inserts an airway segment into the flight plan.

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:4618


insertApproach

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

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

Parameters

NameTypeDefault 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.
skipCourseReversalbooleanfalseWhether to skip the course reversal. False by default.
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.

Defined in

src/garminsdk/flightplan/Fms.ts:1866


insertArrival

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

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

Parameters

NameTypeDescription
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

Defined in

src/garminsdk/flightplan/Fms.ts:1597


insertDeparture

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

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

Parameters

NameTypeDescription
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

Defined in

src/garminsdk/flightplan/Fms.ts:1477


insertHold

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

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

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:4904


insertVfrApproach

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

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

NameTypeDefault 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.

Defined in

src/garminsdk/flightplan/Fms.ts:2238


insertWaypoint

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

Inserts a waypoint into the primary flight plan.

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:936


invertFlightplan

invertFlightplan(): void

Method to invert the flightplan.

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:1354


isApproachVtf

isApproachVtf(): boolean

Method to check if the approach is VTF.

Returns

boolean

whether the approach is VTF.

Defined in

src/garminsdk/flightplan/Fms.ts:3829


isConstraintUser

isConstraintUser(segmentIndex, segmentLegIndex): boolean

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

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:2988


isFirstEnrouteSegment

isFirstEnrouteSegment(segmentIndex): boolean

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

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:880


moveCurrentDestinationLegToEnroute

moveCurrentDestinationLegToEnroute(): void

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

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:1273


onEvent

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

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

Type parameters

NameType
Kextends keyof BaseFmsEvents

Parameters

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

Returns

Consumer<BaseFmsEvents[K]>

A consumer for the specified event bus topic.

Defined in

src/garminsdk/flightplan/Fms.ts:467


removeAirway

removeAirway(segmentIndex): void

Method to remove an airway from the flight plan.

Parameters

NameTypeDescription
segmentIndexnumberis the segment index of the airway to remove.

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:4816


removeApproach

removeApproach(): Promise<void>

Method to remove the approach from the flight plan.

Returns

Promise<void>

Defined in

src/garminsdk/flightplan/Fms.ts:3273


removeArrival

removeArrival(): Promise<void>

Method to remove the arrival from the flight plan.

Returns

Promise<void>

Defined in

src/garminsdk/flightplan/Fms.ts:3234


removeDeparture

removeDeparture(): Promise<void>

Method to remove the departure from the flight plan.

Returns

Promise<void>

Defined in

src/garminsdk/flightplan/Fms.ts:3195


removeDestLegFromSegments

removeDestLegFromSegments(): void

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

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:1290


removeUserFacility

removeUserFacility(userFacility): void

Removes a user facility.

Parameters

NameTypeDescription
userFacilityUserFacilitythe facility to remove.

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:903


removeWaypoint

removeWaypoint(segmentIndex, segmentLegIndex): boolean

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

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:1128


resetAllFlightPlans

resetAllFlightPlans(): Promise<void>

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

Returns

Promise<void>

Defined in

src/garminsdk/flightplan/Fms.ts:4219


revertAltitudeConstraint

revertAltitudeConstraint(segmentIndex, segmentLegIndex): void

Reverts an altitude constraint to the published data.

Parameters

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

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:2783


revertSpeedConstraint

revertSpeedConstraint(planIndex, segmentIndex, segmentLegIndex): void

Method to revert the speed constraint back to published value.

Parameters

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

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:2885


setDestination

setDestination(airport, runway?): void

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

Parameters

NameTypeDescription
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

Defined in

src/garminsdk/flightplan/Fms.ts:1246


setFlightPlanName

setFlightPlanName(planIndex, name): void

Sets the name of the flight plan.

Parameters

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

Returns

void

Defined in

src/garminsdk/flightplan/Fms.ts:554


setOrigin

setOrigin(airport, runway?): void

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

Parameters

NameTypeDescription
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

Defined in

src/garminsdk/flightplan/Fms.ts:1213


setUserConstraint

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

Method to set a user altitude constraint.

Parameters

NameTypeDefault 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.
displayAsFlightLevelbooleanfalseWhether the constraint should be displayed as a flight level. Defaults to false.

Returns

void

Throws

Error if altitude is NaN.

Defined in

src/garminsdk/flightplan/Fms.ts:2702


setUserConstraintAdvanced

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

Method to set a user altitude constraint.

Parameters

NameTypeDefault 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.

Defined in

src/garminsdk/flightplan/Fms.ts:2740


setUserFpa

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

Method to set a user flight path angle.

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:2913


setUserSpeedConstraint

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

Method to set a user speed constraint.

Parameters

NameTypeDescription
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.

Defined in

src/garminsdk/flightplan/Fms.ts:2840