Skip to main content

Class: AdaptiveNearestContext

A singleton context of all nearest facility information which uses adaptive searches.

Properties

airportRadius

airportRadius: number = 50

The search radius for airports, in nautical miles.

Defined in

src/sdk/navigation/NearestContext.ts:365


airports

Readonly airports: AdaptiveNearestSubscription<NearestAirportSubscription>

The nearest airports.

Defined in

src/sdk/navigation/NearestContext.ts:280


intersectionRadius

intersectionRadius: number = 10

The search radius for intersections, in nautical miles.

Defined in

src/sdk/navigation/NearestContext.ts:371


intersections

Readonly intersections: AdaptiveNearestSubscription<NearestIntersectionSubscription>

The nearest intersections.

Defined in

src/sdk/navigation/NearestContext.ts:286


maxAirports

maxAirports: number = 25

The maximum number of airports in the context.

Defined in

src/sdk/navigation/NearestContext.ts:295


maxIntersections

maxIntersections: number = 25

The maximum number of intersections in the context.

Defined in

src/sdk/navigation/NearestContext.ts:301


maxNdbs

maxNdbs: number = 25

The maximum number of NDBs in the context.

Defined in

src/sdk/navigation/NearestContext.ts:304


maxUsrs

maxUsrs: number = 25

The maximum number of user facilities in the context.

Defined in

src/sdk/navigation/NearestContext.ts:307


maxVors

maxVors: number = 25

The maximum number of VORs in the context.

Defined in

src/sdk/navigation/NearestContext.ts:298


ndbRadius

ndbRadius: number = 150

The search radius for NDBs, in nautical miles.

Defined in

src/sdk/navigation/NearestContext.ts:374


ndbs

Readonly ndbs: AdaptiveNearestSubscription<NearestNdbSubscription>

The nearest NDB stations.

Defined in

src/sdk/navigation/NearestContext.ts:289


usrRadius

usrRadius: number = 150

The search radius for user facilities, in nautical miles.

Defined in

src/sdk/navigation/NearestContext.ts:377


usrs

Readonly usrs: AdaptiveNearestSubscription<NearestUsrSubscription>

The nearest USR facilities.

Defined in

src/sdk/navigation/NearestContext.ts:292


vorRadius

vorRadius: number = 150

The search radius for VORs, in nautical miles.

Defined in

src/sdk/navigation/NearestContext.ts:368


vors

Readonly vors: AdaptiveNearestSubscription<NearestVorSubscription>

The nearest VOR stations.

Defined in

src/sdk/navigation/NearestContext.ts:283

Accessors

maxAirportsAbsolute

get maxAirportsAbsolute(): number

The maximum number of airports returned by this context's inner searches.

Returns

number

Defined in

src/sdk/navigation/NearestContext.ts:311

set maxAirportsAbsolute(val): void

Parameters

NameType
valnumber

Returns

void

Defined in

src/sdk/navigation/NearestContext.ts:316


maxIntersectionsAbsolute

get maxIntersectionsAbsolute(): number

The maximum number of intersections returned by this context's inner searches.

Returns

number

Defined in

src/sdk/navigation/NearestContext.ts:333

set maxIntersectionsAbsolute(val): void

Parameters

NameType
valnumber

Returns

void

Defined in

src/sdk/navigation/NearestContext.ts:338


maxNdbsAbsolute

get maxNdbsAbsolute(): number

The maximum number of NDBs returned by this context's inner searches.

Returns

number

Defined in

src/sdk/navigation/NearestContext.ts:344

set maxNdbsAbsolute(val): void

Parameters

NameType
valnumber

Returns

void

Defined in

src/sdk/navigation/NearestContext.ts:349


maxUsrsAbsolute

get maxUsrsAbsolute(): number

The maximum number of user facilities returned by this context's inner searches.

Returns

number

Defined in

src/sdk/navigation/NearestContext.ts:355

set maxUsrsAbsolute(val): void

Parameters

NameType
valnumber

Returns

void

Defined in

src/sdk/navigation/NearestContext.ts:360


maxVorsAbsolute

get maxVorsAbsolute(): number

The maximum number of VORs returned by this context's inner searches.

Returns

number

Defined in

src/sdk/navigation/NearestContext.ts:322

set maxVorsAbsolute(val): void

Parameters

NameType
valnumber

Returns

void

Defined in

src/sdk/navigation/NearestContext.ts:327

Methods

getNearest

getNearest<T>(facilityType): undefined | FacilityTypeMap[T]

Gets the nearest facility for a given type.

Type parameters

NameType
Textends FacilityType

Parameters

NameTypeDescription
facilityTypeTThe type of facility.

Returns

undefined | FacilityTypeMap[T]

The nearest facility for a given type.

Defined in

src/sdk/navigation/NearestContext.ts:503


getRegionLetter

getRegionLetter(): undefined | string

Gets the airport region letter to use for the first character in waypoint inputs.

Returns

undefined | string

The airport region letter.

Defined in

src/sdk/navigation/NearestContext.ts:485


update

update(): Promise<void>

Updates this context.

Returns

Promise<void>

Defined in

src/sdk/navigation/NearestContext.ts:471


getInstance

getInstance(): AdaptiveNearestContext

Gets an instance of the AdaptiveNearestContext.

Returns

AdaptiveNearestContext

An instance of the AdaptiveNearestContext.

Throws

An error if the AdaptiveNearestContext has not yet been initailized.

Defined in

src/sdk/navigation/NearestContext.ts:395


initialize

initialize(facilityLoader, bus, planePos?): void

Initialized the AdaptiveNearestContext instance.

Parameters

NameTypeDescription
facilityLoaderFacilityLoaderThe facility loader to use for the instance.
busEventBusThe EventBus to use with this instance.
planePos?Subscribable<GeoPointInterface>A subscribable which provides the current position of the airplane. If not defined, the context will automatically retrieve the position from the event bus.

Returns

void

Throws

An error if the AdaptiveNearestContext is already initialized.

Defined in

src/sdk/navigation/NearestContext.ts:411


onInitialized

onInitialized(handler): null | Subscription

Subscribes to this NearestContext being initialized, or invokes the handler immediately if it is already initialized

Parameters

NameTypeDescription
handler(instance: AdaptiveNearestContext) => voidthe handler

Returns

null | Subscription

the subscription, if the action was not immediately performed

Defined in

src/sdk/navigation/NearestContext.ts:427