Class: RunwayUtils
Defined in: src/sdk/navigation/RunwayUtils.ts:22
Methods for working with Runways and Runway Designations.
Constructors
Constructor
new RunwayUtils():
RunwayUtils
Returns
RunwayUtils
Properties
tempGeoPoint
protected
static
tempGeoPoint:GeoPoint
Defined in: src/sdk/navigation/RunwayUtils.ts:87
Methods
createEmptyOneWayRunway()
static
createEmptyOneWayRunway():OneWayRunway
Defined in: src/sdk/navigation/RunwayUtils.ts:151
Creates an empty one-way runway.
Returns
an empty one-way runway.
createRunwayFacility()
static
createRunwayFacility(airport
,runway
):RunwayFacility
Defined in: src/sdk/navigation/RunwayUtils.ts:571
Creates a runway waypoint facility from a runway.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The runway's parent airport. |
runway | OneWayRunway | A one-way runway. |
Returns
A runway waypoint facility corresponding to the runway.
emptyIdentifier()
static
emptyIdentifier():RunwayIdentifier
Defined in: src/sdk/navigation/RunwayUtils.ts:93
Creates an empty runway identifier.
Returns
An empty runway identifier.
getBcFrequency()
static
getBcFrequency(airport
,runwayNumber
,runwayDesignator
):undefined
|FacilityFrequency
Defined in: src/sdk/navigation/RunwayUtils.ts:470
Gets the back course frequency for a runway.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport to which the query runway belongs. |
runwayNumber | number | The number of the query runway. |
runwayDesignator | RunwayDesignator | The designator of the query runway. |
Returns
undefined
| FacilityFrequency
The bc frequency for the query runway, or undefined if one could not be found.
getDesignatorLetter()
static
getDesignatorLetter(designator
,lowerCase
):string
Defined in: src/sdk/navigation/RunwayUtils.ts:140
Gets the letter for a runway designator.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
designator | RunwayDesignator | undefined | A runway designator. |
lowerCase | boolean | false | Whether the letter should be lower case. False by default. |
Returns
string
The letter for the specified runway designator.
getIdentifierFromOneWayRunway()
static
getIdentifierFromOneWayRunway(runway
,out
):RunwayIdentifier
Defined in: src/sdk/navigation/RunwayUtils.ts:119
Gets the runway identifier that describes a OneWayRunway.
Parameters
Parameter | Type | Description |
---|---|---|
runway | OneWayRunway | The runway for which to get an identifier. |
out | RunwayIdentifier | The object to which to write the results. If not defined, then a new identifier object will be created. |
Returns
The runway identifier that describes the specified runway.
getLocFrequency()
Call Signature
static
getLocFrequency(airport
,runway
):undefined
|FacilityFrequency
Defined in: src/sdk/navigation/RunwayUtils.ts:411
Gets the localizer frequency for a runway.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport to which the query runway belongs. |
runway | OneWayRunway | The query runway. |
Returns
undefined
| FacilityFrequency
The localizer frequency for the query runway, or undefined if one could not be found.
Call Signature
static
getLocFrequency(airport
,runwayDesignation
):undefined
|FacilityFrequency
Defined in: src/sdk/navigation/RunwayUtils.ts:418
Gets the localizer frequency for a runway.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport to which the query runway belongs. |
runwayDesignation | string | The designation of the query runway. |
Returns
undefined
| FacilityFrequency
The localizer frequency for the query runway, or undefined if one could not be found.
Call Signature
static
getLocFrequency(airport
,runwayNumber
,runwayDesignator
):undefined
|FacilityFrequency
Defined in: src/sdk/navigation/RunwayUtils.ts:426
Gets the localizer frequency for a runway.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport to which the query runway belongs. |
runwayNumber | number | The number of the query runway. |
runwayDesignator | RunwayDesignator | The designator of the query runway. |
Returns
undefined
| FacilityFrequency
The localizer frequency for the query runway, or undefined if one could not be found.
getNumberString()
static
getNumberString(runwayNumber
):string
Defined in: src/sdk/navigation/RunwayUtils.ts:130
Gets the standard string representation for a runway number.
Parameters
Parameter | Type | Description |
---|---|---|
runwayNumber | number | A runway number. |
Returns
string
The standard string representation for the specified runway number.
getOneWayRunways()
static
getOneWayRunways(runway
,index
):OneWayRunway
[]
Defined in: src/sdk/navigation/RunwayUtils.ts:193
Utility method to return two one-way runways from a single runway facility
Parameters
Parameter | Type | Description |
---|---|---|
runway | AirportRunway | is the AirportRunway object to evaluate |
index | number | is the index of the AirportRunway in the Facility |
Returns
splitRunways array of OneWayRunway objects
getOneWayRunwaysFromAirport()
static
getOneWayRunwaysFromAirport(airport
):OneWayRunway
[]
Defined in: src/sdk/navigation/RunwayUtils.ts:177
Utility method to return all of the one-way runways from a single airport facility
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | is the Airport Facility to evaluate |
Returns
all of the one-way runways in the airport facility, sorted.
getOppositeOneWayRunway()
static
getOppositeOneWayRunway(airport
,runwayNumber
,runwayDesignator
):undefined
|OneWayRunway
Defined in: src/sdk/navigation/RunwayUtils.ts:488
Get the opposite one way runway from a runway number and designator.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport to which the query runway belongs. |
runwayNumber | number | The number of the query runway. |
runwayDesignator | RunwayDesignator | The designator of the query runway. |
Returns
undefined
| OneWayRunway
The opposite one way runway for the query runway, or undefined if one could not be found.
getProceduresForRunway()
static
getProceduresForRunway(procedures
,runway
):ApproachProcedure
[]
Defined in: src/sdk/navigation/RunwayUtils.ts:378
Utility method to return the procedures for a given runway.
Parameters
Parameter | Type | Description |
---|---|---|
procedures | readonly ApproachProcedure [] | The procedures for the airport. |
runway | AirportRunway | The given runway to find procedures for. |
Returns
A list of approach procedures for the given runway.
getRunwayCode()
static
getRunwayCode(number
):string
Defined in: src/sdk/navigation/RunwayUtils.ts:590
Gets an alpha code from a runway number.
Parameters
Parameter | Type | Description |
---|---|---|
number | number | is the runway number. |
Returns
string
a letter.
getRunwayFacilityIcao()
static
getRunwayFacilityIcao(airport
,runway
):string
Defined in: src/sdk/navigation/RunwayUtils.ts:560
Gets the ICAO string for the runway facility associated with a one-way runway.
Parameters
Parameter | Type | Description |
---|---|---|
airport | string | AirportFacility | The runway's parent airport, or the ICAO of the airport. |
runway | OneWayRunway | A one-way runway. |
Returns
string
the ICAO string for the runway facility associated with the one-way runway.
Deprecated
Please use getRunwayFacilityIcaoValue() instead.
getRunwayFacilityIcaoValue()
static
getRunwayFacilityIcaoValue(airport
,runway
):IcaoValue
Defined in: src/sdk/navigation/RunwayUtils.ts:542
Gets the ICAO value for the runway facility associated with a one-way runway.
Parameters
Parameter | Type | Description |
---|---|---|
airport | IcaoValue | AirportFacility | The runway's parent airport, or the ICAO value of the airport. |
runway | OneWayRunway | A one-way runway. |
Returns
The ICAO value for the runway facility associated with the specified one-way runway.
getRunwayNameString()
static
getRunwayNameString(runwayNumber
,designator
,padded
,prefix
):string
Defined in: src/sdk/navigation/RunwayUtils.ts:280
Utility method to return the runway name from the number and designator (L/R/C/W)
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
runwayNumber | number | undefined | is the integer part of a runway name (18, 26, 27, etc) |
designator | RunwayDesignator | undefined | is the RunwayDesignator enum for the runway |
padded | boolean | true | Whether single-char runways should be 0-padded. Defaults to true . |
prefix | string | '' | A prefix to put before the runway name. Defaults to '' . |
Returns
string
the runway name string
getRunwayNumberPrimary()
static
getRunwayNumberPrimary(runway
):number
Defined in: src/sdk/navigation/RunwayUtils.ts:294
Gets the primary runway number for a paired runway.
Parameters
Parameter | Type | Description |
---|---|---|
runway | AirportRunway | A paired runway. |
Returns
number
The primary runway number for the specified runway.
getRunwayNumberSecondary()
static
getRunwayNumberSecondary(runway
):undefined
|number
Defined in: src/sdk/navigation/RunwayUtils.ts:309
Gets the secondary runway number for a paired runway.
Parameters
Parameter | Type | Description |
---|---|---|
runway | AirportRunway | A paired runway. |
Returns
undefined
| number
The secondary runway number for the specified runway, or undefined
if the runway has no secondary
runway.
getRunwayPairNameString()
static
getRunwayPairNameString(runway
,padded
):string
Defined in: src/sdk/navigation/RunwayUtils.ts:262
Gets a name for a paired runway. Names are formatted as dash-separated pairs of directional (one-way) runway designations, with optional leading zero padding of the runway numbers. If the specified runway is not paired, then the name will be the designation of the primary runway only.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
runway | AirportRunway | undefined | A paired runway. |
padded | boolean | true | Whether the runway numbers should be padded with leading zeroes. Defaults to true . |
Returns
string
The name for the specified paired runway.
getSurfaceCategory()
static
getSurfaceCategory(runway
):RunwaySurfaceCategory
Defined in: src/sdk/navigation/RunwayUtils.ts:600
Gets the runway surface category from a runway or runway surface type.
Parameters
Parameter | Type | Description |
---|---|---|
runway | AirportRunway | RunwaySurfaceType | OneWayRunway | A runway or runway surface type. |
Returns
The surface category of the specified runway or runway surface type.
matchOneWayRunway()
static
matchOneWayRunway(airport
,runwayNumber
,runwayDesignator
):undefined
|OneWayRunway
Defined in: src/sdk/navigation/RunwayUtils.ts:325
Gets a one-way runway from an airport that matches a runway designation by number and designator.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport facility in which to search for the match. |
runwayNumber | number | A runway number to match. |
runwayDesignator | RunwayDesignator | A runway designator to match. |
Returns
undefined
| OneWayRunway
The one-way runway which matches the designation, or undefined if no match could be found.
matchOneWayRunwayFromDesignation()
static
matchOneWayRunwayFromDesignation(airport
,designation
):undefined
|OneWayRunway
Defined in: src/sdk/navigation/RunwayUtils.ts:349
Gets a one-way runway from an airport that matches a runway designation string.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport facility in which to search for the match. |
designation | string | A runway designation. |
Returns
undefined
| OneWayRunway
The one-way runway which matches the designation, or undefined if no match could be found.
matchOneWayRunwayFromIdent()
static
matchOneWayRunwayFromIdent(airport
,ident
):undefined
|OneWayRunway
Defined in: src/sdk/navigation/RunwayUtils.ts:368
Gets a one-way runway from an airport that matches a runway ident.
Parameters
Parameter | Type | Description |
---|---|---|
airport | AirportFacility | The airport facility in which to search for the match. |
ident | string | A runway ident. |
Returns
undefined
| OneWayRunway
The one-way runway which matches the ident, or undefined if no match could be found.
sortRunways()
static
sortRunways(r1
,r2
):number
Defined in: src/sdk/navigation/RunwayUtils.ts:513
A comparer for sorting runways by number, and then by L, C, and R.
Parameters
Parameter | Type | Description |
---|---|---|
r1 | OneWayRunway | The first runway to compare. |
r2 | OneWayRunway | The second runway to compare. |
Returns
number
-1 if the first is before, 0 if equal, 1 if the first is after.
toEmptyIdentifier()
static
toEmptyIdentifier(ident
):RunwayIdentifier
Defined in: src/sdk/navigation/RunwayUtils.ts:106
Sets a runway identifier to be empty.
Parameters
Parameter | Type | Description |
---|---|---|
ident | RunwayIdentifier | The identifier to set. |
Returns
The specified identifier, after it has been set to be empty.