Class: FacilityUtils
Defined in: src/sdk/navigation/FacilityUtils.ts:13
Utility functions for working with facilities.
Constructors
Constructor
new FacilityUtils():
FacilityUtils
Returns
FacilityUtils
Methods
getLatLonFromRadialDistance()
staticgetLatLonFromRadialDistance(reference,radial,distance,out):GeoPoint
Defined in: src/sdk/navigation/FacilityUtils.ts:58
Gets latitude/longitude coordinates corresponding to a radial and distance from a reference facility.
Parameters
| Parameter | Type | Description |
|---|---|---|
reference | Facility | The reference facility. |
radial | number | The magnetic radial, in degrees. |
distance | number | The distance, in nautical miles. |
out | GeoPoint | The GeoPoint object to which to write the result. |
Returns
The latitude/longitude coordinates corresponding to the specified radial and distance from the reference facility.
getLatLonFromRadialRadial()
staticgetLatLonFromRadialRadial(reference1,radial1,reference2,radial2,out):GeoPoint
Defined in: src/sdk/navigation/FacilityUtils.ts:76
Gets latitude/longitude coordinates corresponding to the intersection of two facility radials.
Parameters
| Parameter | Type | Description |
|---|---|---|
reference1 | Facility | The first reference facility. |
radial1 | number | The first magnetic radial, in degrees. |
reference2 | Facility | The second reference facility. |
radial2 | number | The second magnetic radial, in degrees. |
out | GeoPoint | The GeoPoint object to which to write the result. |
Returns
The latitude/longitude coordinates corresponding to the intersection of the two specified radials. If
the specified radials do not intersect at a unique point, NaN is written to both lat and lon.
getMagVar()
staticgetMagVar(facility):number
Defined in: src/sdk/navigation/FacilityUtils.ts:41
Gets the magnetic variation at a facility, in degrees. If the facility is a VOR, the magnetic variation defined by the VOR is returned. For all other facilities, the modeled magnetic variation at the location of the facility is returned.
Parameters
| Parameter | Type | Description |
|---|---|---|
facility | Facility | A facility. |
Returns
number
The magnetic variation at the specified facility, in degrees.
isFacilityType()
staticisFacilityType<T>(facility,type):facility is FacilityTypeMap[T]
Defined in: src/sdk/navigation/FacilityUtils.ts:24
Checks whether a facility is of a given type.
Type Parameters
| Type Parameter |
|---|
T extends FacilityType |
Parameters
| Parameter | Type | Description |
|---|---|---|
facility | Facility | The facility to check. |
type | T | The facility type to check against. |
Returns
facility is FacilityTypeMap[T]
Whether the facility is of the specified type.