Skip to main content

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()​

static getLatLonFromRadialDistance(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​

ParameterTypeDescription
referenceFacilityThe reference facility.
radialnumberThe magnetic radial, in degrees.
distancenumberThe distance, in nautical miles.
outGeoPointThe GeoPoint object to which to write the result.

Returns​

GeoPoint

The latitude/longitude coordinates corresponding to the specified radial and distance from the reference facility.


getLatLonFromRadialRadial()​

static getLatLonFromRadialRadial(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​

ParameterTypeDescription
reference1FacilityThe first reference facility.
radial1numberThe first magnetic radial, in degrees.
reference2FacilityThe second reference facility.
radial2numberThe second magnetic radial, in degrees.
outGeoPointThe GeoPoint object to which to write the result.

Returns​

GeoPoint

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()​

static getMagVar(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​

ParameterTypeDescription
facilityFacilityA facility.

Returns​

number

The magnetic variation at the specified facility, in degrees.


isFacilityType()​

static isFacilityType<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​

ParameterTypeDescription
facilityFacilityThe facility to check.
typeTThe facility type to check against.

Returns​

facility is FacilityTypeMap[T]

Whether the facility is of the specified type.