Class: Fms<ID>
A Garmin flight management system.
Type parameters
Name | Type |
---|---|
ID | extends string = any |
Constructors
constructor
• new Fms<ID
>(isPrimary
, bus
, flightPlanner
, verticalPathCalculator?
, options?
): Fms
<ID
>
Creates an instance of the FMS.
Type parameters
Name | Type |
---|---|
ID | extends string = any |
Parameters
Name | Type | Description |
---|---|---|
isPrimary | boolean | Whether this FMS is the primary instance. Only the primary FMS will execute certain operations that have global effects across the entire airplane. |
bus | EventBus | The event bus. |
flightPlanner | FlightPlanner <ID > | The flight planner. |
verticalPathCalculator? | VNavPathCalculator | The 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
Name | Type |
---|---|
ID | extends string = any |
Parameters
Name | Type | Description |
---|---|---|
isPrimary | boolean | Whether this FMS is the primary instance. Only the primary FMS will execute certain operations that have global effects across the entire airplane. |
bus | EventBus | The event bus. |
flightPlanner | FlightPlanner <ID > | The flight planner. |
verticalPathCalculator? | VNavPathCalculator | The vertical path calculator. Required to support the vertical direct-to functionality. |
isAdvancedVnav? | boolean | Whether advanced VNAV is supported. Defaults to false . |
procedureLegMapper? | (leg : FlightPlanLeg ) => undefined | FlightPlanLeg | A 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
lnavIndex
• 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
Name | Type | Default value | Description |
---|---|---|---|
segmentIndex | number | undefined | The index of the flight plan segment containing the leg to activate. |
segmentLegIndex | number | undefined | The index of the leg to activate in its containing segment. |
planIndex | number | Fms.PRIMARY_PLAN_INDEX | The index of the flight plan containing the leg to activate. Defaults to the index of the primary flight plan. |
inhibitImmediateSequence | boolean | false | Whether 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
Name | Type | Default value | Description |
---|---|---|---|
allowMissedApproach | boolean | false | Whether 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
Name | Type | Default value | Description |
---|---|---|---|
constraintGlobalLegIndex | number | undefined | The global index of the target flight plan leg of the vertical direct-to. |
altitudeMeters | number | undefined | The target altitude, in meters, of the vertical direct-to. |
displayAsFlightLevel | boolean | false | Whether the target altitude should be displayed as a flight level. Defaults to false. |
fpa | undefined | number | undefined | The 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
Name | Type | Description |
---|---|---|
userFacility | UserFacility | the 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
Name | Type | Description |
---|---|---|
airway | AirwayObject | The airway object. |
entry | IntersectionFacility | The entry intersection facility. |
exit | IntersectionFacility | The 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
Name | Type | Description |
---|---|---|
calculator | FlightPathCalculator | The flight path calculator to assign to the preview plan. |
facility | AirportFacility | The airport facility to load the approach from |
procType | ProcedureType | The type of procedure to preview. |
procIndex | number | The procedure index selected. |
transIndex | number | The transition index selected. |
oneWayRunway? | OneWayRunway | The one way runway to build the preview with, if any. |
rwyTransIndex? | number | The runway transition index selected, if any. |
visualRunwayNumber? | number | is the visual runway number, if any. |
visualRunwayDesignator? | RunwayDesignator | is 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
Name | Type | Description |
---|---|---|
calculator | FlightPathCalculator | The flight path calculator to assign to the preview plan. |
facility | AirportFacility | The airport facility to which the procedure to preview belongs. |
procType | ProcedureType | The type of procedure to preview. |
procIndex | number | The index of the procedure to preview. |
excludeTransitionIndex | number | The index of the transition to exclude in the preview. |
rwyTransIndex? | number | The 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
Name | Type | Description |
---|---|---|
calculator | FlightPathCalculator | The flight path calculator to assign to the preview plan. |
facility | AirportFacility | The airport facility containing the published approach on which the VFR approach to preview is based. |
approachIndex | number | The index of the published approach on which the VFR approach to preview is based. |
isVtf | boolean | Whether 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
Name | Type | Description |
---|---|---|
segmentIndex | number | The index of the segment in which the leg resides. |
segmentLegIndex | number | The 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
Name | Type | Description |
---|---|---|
segmentIndex | number | The index of the segment in which the leg resides. |
segmentLegIndex | number | The 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
Name | Type | Default value | Description |
---|---|---|---|
segmentIndex | number | undefined | The index of the segment containing the Direct-To's target flight plan leg. |
segmentLegIndex | number | undefined | The index of the Direct-To's target flight plan leg in its containing segment. |
course? | number | undefined | The 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 | boolean | false | Whether 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
Name | Type | Description |
---|---|---|
target | string | Facility | The Direct-To's target waypoint facility or its ICAO. |
course? | number | The 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
Name | Type | Description |
---|---|---|
planIndex | number | The 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
Name | Type | Description |
---|---|---|
planIndex | number | The index of the flight plan containing the hold to edit. |
segmentIndex | number | The index of the segment containing the hold to edit. |
segmentLegIndex | number | The index of the hold leg in its containing segment. |
holdLeg | FlightPlanLeg | A 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
Name | Type | Description |
---|---|---|
plan | FlightPlan | is 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
Name | Type | Description |
---|---|---|
plan | FlightPlan | is 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
Name | Type | Description |
---|---|---|
segmentIndex | number | is 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
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
Name | Type | Default value | Description |
---|---|---|---|
index | number | Fms.PRIMARY_PLAN_INDEX | The 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
Name | Type | Description |
---|---|---|
constraintGlobalLegIndex | number | The global index of the target flight plan leg of the vertical direct-to. |
altitudeMeters | number | The 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
Name | Type | Description |
---|---|---|
segmentIndex | number | The segment index to insert the constraint at. |
segmentLegIndex | number | The 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
Name | Type | Description |
---|---|---|
index | number | A 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
Name | Type | Default value | Description |
---|---|---|---|
force | boolean | false | Whether 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
Name | Type | Description |
---|---|---|
airway | AirwayObject | The airway object. |
entry | IntersectionFacility | The entry intersection facility. |
exit | IntersectionFacility | The exit intersection facility. |
segmentIndex | number | The index of the segment containing the airway entry leg. |
segmentLegIndex | number | The 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
Name | Type | Default value | Description |
---|---|---|---|
facility | AirportFacility | undefined | is the facility that contains the procedure to add. |
approachIndex | number | undefined | is the index of the approach procedure. |
approachTransitionIndex | number | undefined | is the index of the approach transition. |
visualRunwayNumber? | number | undefined | is the visual runway number, if any. |
visualRunwayDesignator? | RunwayDesignator | undefined | is the visual runway designator, if any. |
skipCourseReversal | boolean | false | Whether to skip the course reversal. False by default. |
activate | boolean | false | Whether 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
Name | Type | Description |
---|---|---|
facility | AirportFacility | is the facility that contains the procedure to add. |
arrivalIndex | number | is the index of the arrival procedure. |
arrivalRunwayTransitionIndex | number | is the index of the arrival runway transition. |
enrouteTransitionIndex | number | is the index of the enroute transition. |
arrivalRunway? | OneWayRunway | is 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
Name | Type | Description |
---|---|---|
facility | AirportFacility | is the facility that contains the procedure to add. |
departureIndex | number | is the index of the departure |
departureRunwayIndex | number | is the index of the runway transition |
enrouteTransitionIndex | number | is the index of the enroute transition |
oneWayRunway? | OneWayRunway | is 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
Name | Type | Description |
---|---|---|
planIndex | number | The index of the flight plan to add the hold to. |
segmentIndex | number | The index of the segment that contains the hold's parent leg. |
segmentLegIndex | number | The index of the hold's parent leg in its segment. |
holdLeg | FlightPlanLeg | The 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
Name | Type | Default value | Description |
---|---|---|---|
facility | AirportFacility | undefined | The airport facility containing the published approach on which the VFR approach to insert is based. |
approachIndex | number | undefined | The index of the published approach on which the VFR approach to insert is based. |
isVtf | boolean | undefined | Whether to insert the approach as a vectors-to-final (VTF) approach. |
activate | boolean | false | Whether 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
Name | Type | Description |
---|---|---|
segmentIndex | number | The index of the flight plan segment into which to insert the waypoint. |
facility | Facility | The waypoint facility to insert. |
legIndex? | number | The 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
Name | Type | Description |
---|---|---|
segmentIndex | number | The segment index to insert the constraint at. |
segmentLegIndex | number | The 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
Name | Type | Description |
---|---|---|
segmentIndex | number | is 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
Name | Type |
---|---|
K | extends keyof BaseFmsEvents |
Parameters
Name | Type | Description |
---|---|---|
baseTopic | K | The 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
Name | Type | Description |
---|---|---|
segmentIndex | number | is 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
Name | Type | Description |
---|---|---|
userFacility | UserFacility | the 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
Name | Type | Description |
---|---|---|
segmentIndex | number | The index of the segment containing the leg to remove. |
segmentLegIndex | number | The 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
Name | Type | Description |
---|---|---|
segmentIndex | number | The segment index to revert the constraint at. |
segmentLegIndex | number | The 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
Name | Type | Description |
---|---|---|
planIndex | number | The flight plan index to use. |
segmentIndex | number | The segment index to revert the constraint at. |
segmentLegIndex | number | The 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
Name | Type | Description |
---|---|---|
airport | undefined | string | AirportFacility | The destination airport to set or its ICAO, or undefined if the destination airport should be cleared from the flight plan. |
runway? | OneWayRunway | The 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
Name | Type | Description |
---|---|---|
planIndex | number | The index of the plan the change the name for. |
name | string | The 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
Name | Type | Description |
---|---|---|
airport | undefined | string | AirportFacility | The origin airport to set or its ICAO, or undefined if the origin airport should be cleared from the flight plan. |
runway? | OneWayRunway | The 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
Name | Type | Default value | Description |
---|---|---|---|
segmentIndex | number | undefined | The segment index to insert the constraint at. |
segmentLegIndex | number | undefined | The leg index to insert the constraint at. |
altitudeFeet? | number | undefined | The altitude, in feet, to set the constraint at; if undefined, delete user constraint. |
displayAsFlightLevel | boolean | false | Whether 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
Name | Type | Default value | Description |
---|---|---|---|
segmentIndex | number | undefined | The segment index to insert the constraint at. |
segmentLegIndex | number | undefined | The leg index to insert the constraint at. |
phase | VerticalFlightPhase | undefined | The vertical restriction type. |
altDesc | AltitudeRestrictionType | undefined | The altitude restriction type. |
altitude1Meters | number | undefined | The altitude 1 in meters. |
displayAltitude1AsFlightLevel | boolean | undefined | Whether to display altitude 1 as a flight level. |
altitude2Meters | number | 0 | The altitude 2 in meters. Optional. |
displayAltitude2AsFlightLevel | boolean | false | Whether 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
Name | Type | Description |
---|---|---|
planIndex | number | The flight plan index to use. |
segmentIndex | number | The segment index to insert the fpa at. |
segmentLegIndex | number | The leg index to insert the fpa at. |
fpa? | number | The 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
Name | Type | Description |
---|---|---|
planIndex | number | The flight plan index to use. |
segmentIndex | number | The segment index to insert the constraint at. |
segmentLegIndex | number | The leg index to insert the constraint at. |
speed? | number | The speed, in knots IAS or Mach (should match the given speedDesc), to set the constraint at; if undefined, delete user constraint. |
speedUnit? | SpeedUnit | The speed units. |
speedDesc? | SpeedRestrictionType | The speed restriction type to set. |
Returns
void
Throws
Error if speed is NaN.
Defined in
src/garminsdk/flightplan/Fms.ts:2840