Skip to main content

Class: UserFacilityUtils

Utility functions for working with user facilities.

Constructors

constructor

new UserFacilityUtils(): UserFacilityUtils

Returns

UserFacilityUtils

Methods

createFromLatLon

createFromLatLon(icao, lat, lon, isTemporary?, name?): UserFacility

Creates a user facility from latitude/longitude coordinates.

Parameters

NameTypeDefault valueDescription
icaostringundefinedThe ICAO string of the new facility.
latnumberundefinedThe latitude of the new facility.
lonnumberundefinedThe longitude of the new facility.
isTemporarybooleanfalseWhether the new facility is temporary.
name?stringundefinedThe name of the new facility.

Returns

UserFacility

A new user facility.

Defined in

src/sdk/navigation/Facilities.ts:1647


createFromRadialDistance

createFromRadialDistance(icao, reference, radial, distance, isTemporary?, name?): UserFacility

Creates a user facility from a radial and distance relative to a reference facility.

Parameters

NameTypeDefault valueDescription
icaostringundefinedThe ICAO string of the new facility.
referenceFacilityundefinedThe reference facility.
radialnumberundefinedThe magnetic radial, in degrees, of the reference facility on which the new facility lies.
distancenumberundefinedThe distance, in nautical miles, from the reference facility.
isTemporarybooleanfalseWhether the new facility is temporary.
name?stringundefinedThe name of the new facility.

Returns

UserFacility

A new user facility.

Defined in

src/sdk/navigation/Facilities.ts:1672


createFromRadialRadial

createFromRadialRadial(icao, reference1, radial1, reference2, radial2, isTemporary?, name?): undefined | UserFacility

Creates a user facility from a radial and distance relative to a reference facility.

Parameters

NameTypeDefault valueDescription
icaostringundefinedThe ICAO string of the new facility.
reference1FacilityundefinedThe first reference facility.
radial1numberundefinedThe magnetic radial, in degrees, of the first reference facility on which the new facility lies.
reference2FacilityundefinedThe second reference facility.
radial2numberundefinedThe magnetic radial, in degrees, of the second reference facility on which the new facility lies.
isTemporarybooleanfalseWhether the new facility is temporary.
name?stringundefinedThe name of the new facility.

Returns

undefined | UserFacility

A new user facility, or undefined if the specified radials do not intersect at a unique point.

Defined in

src/sdk/navigation/Facilities.ts:1703