Class: Fms<ID>
Defined in: src/garminsdk/flightplan/Fms.ts:135
A Garmin flight management system.
Type Parameters
Type Parameter | Default type |
---|---|
ID extends string | any |
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
Parameter | 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
>
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
Parameter | 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 ) => 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
>
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
lnavIndex
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
Parameter | 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
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
Parameter | 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.
activateVerticalDirect()
activateVerticalDirect(
constraintGlobalLegIndex
,altitudeMeters
,displayAsFlightLevel
,fpa
):boolean
Defined in: src/garminsdk/flightplan/Fms.ts:3577
Activates a vertical direct to a selected constraint.
Parameters
Parameter | 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.
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
Parameter | Type | Description |
---|---|---|
userFacility | UserFacility | the 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
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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
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
Parameter | 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
deleteFlightPlanName()
deleteFlightPlanName(
planIndex
):void
Defined in: src/garminsdk/flightplan/Fms.ts:547
Clears the name of the flight plan.
Parameters
Parameter | Type | Description |
---|---|---|
planIndex | number | The 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
Parameter | 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.
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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | is 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
Parameter | Type | Description |
---|---|---|
plan | FlightPlan | is 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
Parameter | Type | Description |
---|---|---|
segmentIndex | number | is 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
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
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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.
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
Parameter | Type | Description |
---|---|---|
index | number | A 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
Parameter | 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
>
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
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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
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
Parameter | 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
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
Parameter | 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.
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
Parameter | 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.
insertWaypoint()
insertWaypoint(
segmentIndex
,facility
,legIndex?
):undefined
|LegDefinition
Defined in: src/garminsdk/flightplan/Fms.ts:921
Inserts a waypoint into the primary flight plan.
Parameters
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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.
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
Parameter | 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.
removeAirway()
removeAirway(
segmentIndex
):void
Defined in: src/garminsdk/flightplan/Fms.ts:4879
Method to remove an airway from the flight plan.
Parameters
Parameter | Type | Description |
---|---|---|
segmentIndex | number | is 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
Parameter | Type | Description |
---|---|---|
userFacility | UserFacility | the 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
Parameter | 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.
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
Parameter | Type | Description |
---|---|---|
segmentIndex | number | The segment index to revert the constraint at. |
segmentLegIndex | number | The 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
Parameter | 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
setDestination()
setDestination(
airport
,runway?
):void
Defined in: src/garminsdk/flightplan/Fms.ts:1231
Sets the primary flight plan's destination airport and runway.
Parameters
Parameter | 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
setFlightPlanName()
setFlightPlanName(
planIndex
,name
):void
Defined in: src/garminsdk/flightplan/Fms.ts:539
Sets the name of the flight plan.
Parameters
Parameter | 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
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
Parameter | 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
setUserConstraint()
setUserConstraint(
segmentIndex
,segmentLegIndex
,altitudeFeet?
,displayAsFlightLevel?
):void
Defined in: src/garminsdk/flightplan/Fms.ts:2765
Method to set a user altitude constraint.
Parameters
Parameter | 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.
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
Parameter | 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.
setUserFpa()
setUserFpa(
planIndex
,segmentIndex
,segmentLegIndex
,fpa?
):void
Defined in: src/garminsdk/flightplan/Fms.ts:2976
Method to set a user flight path angle.
Parameters
Parameter | 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.
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
Parameter | 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.