Class: AirportUtils
Utility functions for working with airport data.
Constructors
constructor
• new AirportUtils(): AirportUtils
Returns
Methods
getElevation
▸ getElevation(facility
): undefined
| number
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
Name | 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.
Defined in
src/sdk/navigation/AirportUtils.ts:196
getFilteredRunways
▸ getFilteredRunways(facility
, minLength
, surfaceTypes?
): AirportRunway
[]
Get a list of runways at an airport matching specific criteria.
Parameters
Name | 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.
Defined in
src/sdk/navigation/AirportUtils.ts:226
getLongestRunway
▸ getLongestRunway(facility
): null
| AirportRunway
Gets the longest runway of an airport.
Parameters
Name | Type | Description |
---|---|---|
facility | AirportFacility | The facility record for the airport. |
Returns
null
| AirportRunway
The longest runway as an AirportRunway, or null.
Defined in
src/sdk/navigation/AirportUtils.ts:209
hasMatchingRunway
▸ hasMatchingRunway(facility
, minLength
, surfaceTypes?
): boolean
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
Name | 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.
Defined in
src/sdk/navigation/AirportUtils.ts:248
tryGetRegionCode
▸ tryGetRegionCode(facility
): undefined
| string
Attempts to get the region code of an airport.
Parameters
Name | 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.
Defined in
src/sdk/navigation/AirportUtils.ts:33