Skip to main content

Class: ICAO

Methods for working with FS ICAO strings.

Constructors

constructor

new ICAO(): ICAO

Returns

ICAO

Properties

emptyIcao

Static Readonly emptyIcao: " "

An empty ICAO.

Defined in

src/sdk/navigation/Facilities.ts:1267

Methods

getAssociatedAirportIdent

getAssociatedAirportIdent(icao): string

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

Parameters

NameTypeDescription
icaostringThe icao to get the airport ident for.

Returns

string

The airport ident.

Defined in

src/sdk/navigation/Facilities.ts:1301


getFacilityType

getFacilityType(icao): FacilityType

Gets the facility type from an ICAO.

Parameters

NameTypeDescription
icaostringThe icao to get the facility type for.

Returns

FacilityType

The ICAO facility type.

Throws

An error if the facility type cannot be determined.

Defined in

src/sdk/navigation/Facilities.ts:1275


getIdent

getIdent(icao): string

Gets the ident for a given ICAO string.

Parameters

NameTypeDescription
icaostringThe FS ICAO to get the ident for.

Returns

string

The ICAO ident.

Defined in

src/sdk/navigation/Facilities.ts:1338


getRegionCode

getRegionCode(icao): string

Gets the region code for a given ICAO string.

Parameters

NameTypeDescription
icaostringThe FS ICAO to get the ident for.

Returns

string

The two letter region code.

Defined in

src/sdk/navigation/Facilities.ts:1347


isFacility

isFacility(icao, type?): boolean

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

Parameters

NameTypeDescription
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.

Defined in

src/sdk/navigation/Facilities.ts:1312