Class: FacilityUtils
Utility functions for working with facilities.
Constructors
constructor
• new FacilityUtils(): FacilityUtils
Returns
Methods
getLatLonFromRadialDistance
▸ getLatLonFromRadialDistance(reference
, radial
, distance
, out
): GeoPoint
Gets latitude/longitude coordinates corresponding to a radial and distance from a reference facility.
Parameters
Name | 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.
Defined in
src/sdk/navigation/Facilities.ts:1400
getLatLonFromRadialRadial
▸ getLatLonFromRadialRadial(reference1
, radial1
, reference2
, radial2
, out
): GeoPoint
Gets latitude/longitude coordinates corresponding to the intersection of two facility radials.
Parameters
Name | 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
.
Defined in
src/sdk/navigation/Facilities.ts:1418
getMagVar
▸ getMagVar(facility
): number
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
Name | Type | Description |
---|---|---|
facility | Facility | A facility. |
Returns
number
The magnetic variation at the specified facility, in degrees.
Defined in
src/sdk/navigation/Facilities.ts:1383
isFacilityType
▸ isFacilityType<T
>(facility
, type
): facility is FacilityTypeMap[T]
Checks whether a facility is of a given type.
Type parameters
Name | Type |
---|---|
T | extends FacilityType |
Parameters
Name | 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.
Defined in
src/sdk/navigation/Facilities.ts:1366