Class: AirportUtils
Defined in: src/sdk/navigation/AirportUtils.ts:8
Utility functions for working with airport data.
Constructors
Constructor
new AirportUtils():
AirportUtils
Returns
AirportUtils
Methods
getElevation()
staticgetElevation(facility):undefined|number
Defined in: src/sdk/navigation/AirportUtils.ts:196
Gets the elevation of an airport, in meters. The elevation is estimated as the average elevation of the airport's
runways. If the airport has no runways, an elevation cannot be estimated and undefined is returned instead.
Parameters
| Parameter | Type | Description |
|---|---|---|
facility | AirportFacility | The facility record for the airport. |
Returns
undefined | number
The elevation of the specified airport, in meters, or undefined if the elevation could not be
determined.
getFilteredRunways()
staticgetFilteredRunways(facility,minLength,surfaceTypes?):AirportRunway[]
Defined in: src/sdk/navigation/AirportUtils.ts:226
Get a list of runways at an airport matching specific criteria.
Parameters
| Parameter | Type | Description |
|---|---|---|
facility | AirportFacility | The facility record for the airport. |
minLength | number | The minimum length of the runway, in feet. |
surfaceTypes? | number | An optional bitfield of RunwaySurfaceCategory values to allow. |
Returns
A list of matching runways.
getLongestRunway()
staticgetLongestRunway(facility):null|AirportRunway
Defined in: src/sdk/navigation/AirportUtils.ts:209
Gets the longest runway of an airport.
Parameters
| Parameter | Type | Description |
|---|---|---|
facility | AirportFacility | The facility record for the airport. |
Returns
null | AirportRunway
The longest runway as an AirportRunway, or null.
hasMatchingRunway()
statichasMatchingRunway(facility,minLength,surfaceTypes?):boolean
Defined in: src/sdk/navigation/AirportUtils.ts:248
Checks to see whether an airport has a runway matching specific criteria. This is a lighter version of getFilteredRunways that doesn't do any extra assignments.
Parameters
| Parameter | Type | Description |
|---|---|---|
facility | AirportFacility | The facility record for the airport. |
minLength | number | The minimum length of the runway, in feet. |
surfaceTypes? | number | An optional bitfield of RunwaySurfaceCategory values to allow. |
Returns
boolean
A boolean if a matching runway exists.
tryGetRegionCode()
statictryGetRegionCode(facility):undefined|string
Defined in: src/sdk/navigation/AirportUtils.ts:33
Attempts to get the region code of an airport.
Parameters
| Parameter | Type | Description |
|---|---|---|
facility | AirportFacility | The facility record for the airport. |
Returns
undefined | string
The region code of an airport, or undefined if one could not be found.