Skip to main content

Class: FacilityUtils

Utility functions for working with facilities.

Constructors

constructor

new FacilityUtils(): FacilityUtils

Returns

FacilityUtils

Methods

getLatLonFromRadialDistance

getLatLonFromRadialDistance(reference, radial, distance, out): GeoPoint

Gets latitude/longitude coordinates corresponding to a radial and distance from a reference facility.

Parameters

NameTypeDescription
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.

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

NameTypeDescription
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.

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

NameTypeDescription
facilityFacilityA 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

NameType
Textends FacilityType

Parameters

NameTypeDescription
facilityFacilityThe facility to check.
typeTThe 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