Class: GarminFlightPlanRouteUtils
Defined in: src/garminsdk/flightplan/GarminFlightPlanRouteUtils.ts:10
A utility class for working with Garmin flight plan routes.
Constructors
Constructor
new GarminFlightPlanRouteUtils():
GarminFlightPlanRouteUtils
Returns
GarminFlightPlanRouteUtils
Properties
DEFAULT_LOAD_ROUTE_BATCH_NAME
readonly
static
DEFAULT_LOAD_ROUTE_BATCH_NAME:"flight-plan-route-load"
='flight-plan-route-load'
Defined in: src/garminsdk/flightplan/GarminFlightPlanRouteUtils.ts:12
The default name for flight plan modification batches opened when loading a flight plan route into a flight plan.
Methods
createRouteFromFlightPlan()
static
createRouteFromFlightPlan(facLoader
,flightPlan
):Promise
<FlightPlanRoute
>
Defined in: src/garminsdk/flightplan/GarminFlightPlanRouteUtils.ts:20
Creates a flight plan route representing the structure of a flight plan.
Parameters
Parameter | Type | Description |
---|---|---|
facLoader | FacilityLoader | The facility loader to use to retrieve facilities referenced in the flight plan. |
flightPlan | FlightPlan | The flight plan from which to create the route. |
Returns
Promise
<FlightPlanRoute
>
A flight plan route representing the structure of the specified flight plan.
legToFlightPlanRouteEnrouteLeg()
static
legToFlightPlanRouteEnrouteLeg(facLoader
,leg
,out?
):Promise
<FlightPlanRouteEnrouteLeg
>
Defined in: src/garminsdk/flightplan/GarminFlightPlanRouteUtils.ts:158
Converts a flight plan leg into a flight plan route enroute leg.
Parameters
Parameter | Type | Description |
---|---|---|
facLoader | FacilityLoader | The facility loader to use to retrieve facilities referenced in the flight plan leg. |
leg | FlightPlanLeg | The flight plan leg. |
out? | FlightPlanRouteEnrouteLeg | The flight plan route enroute leg object to which to write the results. If not defined, then a new object will be created. |
Returns
Promise
<FlightPlanRouteEnrouteLeg
>
The converted flight plan route enroute leg. If the specified flight plan leg could not be converted, then the converted enroute leg will be empty.