Skip to main content

Class: ApproachUtils

Defined in: src/sdk/navigation/ApproachUtils.ts:15

A utility class for working with approach procedures.

Constructors​

Constructor​

new ApproachUtils(): ApproachUtils

Returns​

ApproachUtils

Methods​

emptyIdentifier()​

static emptyIdentifier(): ApproachIdentifier

Defined in: src/sdk/navigation/ApproachUtils.ts:69

Creates an empty approach identifier.

Returns​

ApproachIdentifier

An empty approach identifier.


getBestRnavType()​

static getBestRnavType(query): RnavTypeFlags

Defined in: src/sdk/navigation/ApproachUtils.ts:122

Gets the best RNAV minimum type available for a given approach.

Parameters​

ParameterTypeDescription
queryApproachProcedure | RnavTypeFlagsThe approach to check, or its RNAV type flags.

Returns​

RnavTypeFlags

The best RNAV minimum type available for the specified approach.


getFafOriginIcao()​

static getFafOriginIcao(approach): string | undefined

Defined in: src/sdk/navigation/ApproachUtils.ts:192

Gets the origin facility ICAO for the FAF leg of an approach. The facility type is not checked against the approach type to ensure it is valid, in contrast to getReferenceFacility which does perform these checks.

Parameters​

ParameterTypeDescription
approachApproachProcedureThe approach for which to get a reference facility.

Returns​

string | undefined

The ICAO of the origin facility for the FAF leg of the specified approach, or undefined if one could not be found.


getFrequencyFromAirport()​

Call Signature​

static getFrequencyFromAirport(facility, approach): FacilityFrequency | undefined

Defined in: src/sdk/navigation/ApproachUtils.ts:155

Gets an approach frequency from its parent airport facility record.

Parameters​
ParameterTypeDescription
facilityAirportFacilityThe approach's parent airport facility.
approachApproachProcedureThe approach for which to get a frequency.
Returns​

FacilityFrequency | undefined

The frequency of the specified approach, or undefined if one could not be found.

Call Signature​

static getFrequencyFromAirport(facility, approachIndex): FacilityFrequency | undefined

Defined in: src/sdk/navigation/ApproachUtils.ts:162

Gets an approach frequency from its parent airport facility record.

Parameters​
ParameterTypeDescription
facilityAirportFacilityThe approach's parent airport facility.
approachIndexnumberThe index of the approach for which to get a frequency.
Returns​

FacilityFrequency | undefined

The frequency of the specified approach, or undefined if one could not be found.


getIdentifier()​

static getIdentifier(approach, out): ApproachIdentifier

Defined in: src/sdk/navigation/ApproachUtils.ts:96

Gets the identifier corresponding to an approach procedure.

Parameters​

ParameterTypeDescription
approachApproachProcedureThe approach procedure for which to get an identifier.
outApproachIdentifierThe object to which to write the result. If not defined, then a new identifier object will be created.

Returns​

ApproachIdentifier

The identifier corresponding to the specified approach procedure.


getReferenceFacility()​

static getReferenceFacility(approach, facLoader): Promise<VorFacility | NdbFacility | undefined>

Defined in: src/sdk/navigation/ApproachUtils.ts:220

Gets the reference facility for an approach. Only ILS, LOC (BC), LDA, SDF, VOR(DME), and NDB(DME) approaches can have reference facilities.

Parameters​

ParameterTypeDescription
approachApproachProcedureThe approach for which to get a reference facility.
facLoaderFacilityLoaderThe facility loader.

Returns​

Promise<VorFacility | NdbFacility | undefined>

A Promise which is fulfilled with the reference facility for the specified approach, or undefined if one could not be found.


identifierEquals()​

static identifierEquals(a, b): boolean

Defined in: src/sdk/navigation/ApproachUtils.ts:110

Checks whether two approach identifiers are equal.

Parameters​

ParameterTypeDescription
a{ __Type: "JS_ApproachIdentifier"; runway: { __Type: "JS_RunwayIdentifier"; designator: string; number: string; }; suffix: string; type: string; }The first identifier.
a.__Type"JS_ApproachIdentifier"Coherent C++ object binding type.
a.runway{ __Type: "JS_RunwayIdentifier"; designator: string; number: string; }The approach's associated runway.
a.runway.__Type"JS_RunwayIdentifier"Coherent C++ object binding type.
a.runway.designatorstringThe designator of the runway.
a.runway.numberstringThe number of the runway.
a.suffixstringThe suffix of the approach.
a.typestringThe type name of the approach.
b{ __Type: "JS_ApproachIdentifier"; runway: { __Type: "JS_RunwayIdentifier"; designator: string; number: string; }; suffix: string; type: string; }The second identifier.
b.__Type"JS_ApproachIdentifier"Coherent C++ object binding type.
b.runway{ __Type: "JS_RunwayIdentifier"; designator: string; number: string; }The approach's associated runway.
b.runway.__Type"JS_RunwayIdentifier"Coherent C++ object binding type.
b.runway.designatorstringThe designator of the runway.
b.runway.numberstringThe number of the runway.
b.suffixstringThe suffix of the approach.
b.typestringThe type name of the approach.

Returns​

boolean

Whether the two specified approach identifiers are equal.


isRnpAr()​

static isRnpAr(approach): boolean

Defined in: src/sdk/navigation/ApproachUtils.ts:145

Checks whether an approach procedure is an RNP (AR) approach.

Parameters​

ParameterTypeDescription
approachApproachProcedureThe approach procedure to check.

Returns​

boolean

Whether the approach procedure is an RNP (AR) approach.


nameToType()​

static nameToType(name): ExtendedApproachType

Defined in: src/sdk/navigation/ApproachUtils.ts:22

Converts an approach type name to its corresponding approach type.

Parameters​

ParameterTypeDescription
namestringThe name to convert.

Returns​

ExtendedApproachType

The approach type corresponding to the specified name.


toEmptyIdentifier()​

static toEmptyIdentifier(ident): ApproachIdentifier

Defined in: src/sdk/navigation/ApproachUtils.ts:83

Sets an approach identifier to be empty.

Parameters​

ParameterTypeDescription
identApproachIdentifierThe identifier to set.

Returns​

ApproachIdentifier

The specified identifier, after it has been set to be empty.


typeToName()​

static typeToName(type): string

Defined in: src/sdk/navigation/ApproachUtils.ts:46

Converts an approach type to its corresponding approach type name.

Parameters​

ParameterTypeDescription
typeExtendedApproachTypeThe type to convert.

Returns​

string

The approach type name corresponding to the specified type.