Skip to main content

Class: ICAO

Defined in: src/sdk/navigation/Facilities.ts:1274

Methods for working with FS ICAO strings.

Constructors​

Constructor​

new ICAO(): ICAO

Returns​

ICAO

Properties​

emptyIcao​

readonly static emptyIcao: " " = ' '

Defined in: src/sdk/navigation/Facilities.ts:1279

An empty ICAO.

Methods​

getAssociatedAirportIdent()​

static getAssociatedAirportIdent(icao): string

Defined in: src/sdk/navigation/Facilities.ts:1313

Returns the ident of the icao's associated airport. (ex. for terminal waypoints)

Parameters​

ParameterTypeDescription
icaostringThe icao to get the airport ident for.

Returns​

string

The airport ident.


getFacilityType()​

static getFacilityType(icao): FacilityType

Defined in: src/sdk/navigation/Facilities.ts:1287

Gets the facility type from an ICAO.

Parameters​

ParameterTypeDescription
icaostringThe icao to get the facility type for.

Returns​

FacilityType

The ICAO facility type.

Throws​

An error if the facility type cannot be determined.


getIdent()​

static getIdent(icao): string

Defined in: src/sdk/navigation/Facilities.ts:1350

Gets the ident for a given ICAO string.

Parameters​

ParameterTypeDescription
icaostringThe FS ICAO to get the ident for.

Returns​

string

The ICAO ident.


getRegionCode()​

static getRegionCode(icao): string

Defined in: src/sdk/navigation/Facilities.ts:1359

Gets the region code for a given ICAO string.

Parameters​

ParameterTypeDescription
icaostringThe FS ICAO to get the ident for.

Returns​

string

The two letter region code.


isFacility()​

static isFacility(icao, type?): boolean

Defined in: src/sdk/navigation/Facilities.ts:1324

Checks whether an ICAO string defines a facility (optionally of a specific type).

Parameters​

ParameterTypeDescription
icaostringAn ICAO string.
type?FacilityTypeThe specific facility type to check against. If not defined, this method will return true as long as the ICAO string defines any valid facility type.

Returns​

boolean

Whether the given ICAO string defines a facility of the specified type.