Class: FlightPlanUtils
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:7
Utility class for working with flight plans.
Constructors
Constructor
new FlightPlanUtils():
FlightPlanUtils
Returns
FlightPlanUtils
Methods
convertLegRunwayIcaosToSdkFormat()
static
convertLegRunwayIcaosToSdkFormat(leg
):FlightPlanLeg
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:123
Converts all runway ICAO references in a flight plan leg to the runway ICAO format used by the MSFS avionics SDK.
Parameters
Parameter | Type | Description |
---|---|---|
leg | FlightPlanLeg | The flight plan leg to change. |
Returns
The specified flight plan leg, after all of its runway ICAO references have been changed to the format used by the MSFS avionics SDK.
getTerminatorIcao()
static
getTerminatorIcao(leg
):undefined
|string
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:99
Gets the ICAO of the facility defining the terminator of a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
Returns
undefined
| string
The ICAO of the facility defining the terminator of the specified flight plan leg, or undefined
if
the leg's terminator is not defined by a facility.
isAltitudeLeg()
static
isAltitudeLeg(legType
): legType is CA | FA | VA
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:44
Checks if a leg type is an "to altitude" leg type.
Parameters
Parameter | Type | Description |
---|---|---|
legType | LegType | The leg type to check. |
Returns
legType is CA | FA | VA
Whether the leg type is a "to altitude" leg type.
isDiscontinuityLeg()
static
isDiscontinuityLeg(legType
): legType is Discontinuity | ThruDiscontinuity
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:89
Checks if a leg type is a discontinuity leg type.
Parameters
Parameter | Type | Description |
---|---|---|
legType | LegType | The leg type to check. |
Returns
legType is Discontinuity | ThruDiscontinuity
Whether the leg type is a discontinuity leg type.
isHeadingToLeg()
static
isHeadingToLeg(legType
): legType is VA | VD | VI | VM | VR
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:53
Checks if a leg type is a "heading to" leg type.
Parameters
Parameter | Type | Description |
---|---|---|
legType | LegType | The leg type to check. |
Returns
legType is VA | VD | VI | VM | VR
Whether the leg type is a "heading to" leg type.
isHoldLeg()
static
isHoldLeg(legType
): legType is HA | HF | HM
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:71
Checks if a leg type is a "hold" leg type.
Parameters
Parameter | Type | Description |
---|---|---|
legType | LegType | The leg type to check. |
Returns
legType is HA | HF | HM
Whether the leg type is a "hold" leg type.
isManualDiscontinuityLeg()
static
isManualDiscontinuityLeg(legType
): legType is FM | VM
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:80
Checks if a leg type is a manual termination leg type that ends in a discontinuity.
Parameters
Parameter | Type | Description |
---|---|---|
legType | LegType | The leg type to check. |
Returns
legType is FM | VM
Whether the leg type is a manual termination leg type that ends in a discontinuity.
isToFixLeg()
static
isToFixLeg(legType
): legType is AF | CF | DF | HF | IF | RF | TF
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:35
Checks if a leg type is a "to fix" leg type. Note that while HM and HA legs may terminate at the hold fix, they are explicitly excluded from this check.
Parameters
Parameter | Type | Description |
---|---|---|
legType | LegType | The leg type to check. |
Returns
legType is AF | CF | DF | HF | IF | RF | TF
Whether the leg type is a "to fix" leg type.
isToRadialLeg()
static
isToRadialLeg(legType
): legType is CR | VR
Defined in: src/sdk/flightplan/FlightPlanUtils.ts:62
Checks if a leg type is a "to radial" leg type.
Parameters
Parameter | Type | Description |
---|---|---|
legType | LegType | The leg type to check. |
Returns
legType is CR | VR
Whether the leg type is a "to radial" leg type.