Class: AdaptiveNearestContext
Defined in: src/sdk/navigation/NearestContext.ts:277
A singleton context of all nearest facility information which uses adaptive searches.
Properties
airportRadius
airportRadius:
number=50
Defined in: src/sdk/navigation/NearestContext.ts:365
The search radius for airports, in nautical miles.
airports
readonlyairports:AdaptiveNearestSubscription<NearestAirportSubscription>
Defined in: src/sdk/navigation/NearestContext.ts:280
The nearest airports.
intersectionRadius
intersectionRadius:
number=10
Defined in: src/sdk/navigation/NearestContext.ts:371
The search radius for intersections, in nautical miles.
intersections
readonlyintersections:AdaptiveNearestSubscription<NearestIntersectionSubscription>
Defined in: src/sdk/navigation/NearestContext.ts:286
The nearest intersections.
maxAirports
maxAirports:
number=25
Defined in: src/sdk/navigation/NearestContext.ts:295
The maximum number of airports in the context.
maxIntersections
maxIntersections:
number=25
Defined in: src/sdk/navigation/NearestContext.ts:301
The maximum number of intersections in the context.
maxNdbs
maxNdbs:
number=25
Defined in: src/sdk/navigation/NearestContext.ts:304
The maximum number of NDBs in the context.
maxUsrs
maxUsrs:
number=25
Defined in: src/sdk/navigation/NearestContext.ts:307
The maximum number of user facilities in the context.
maxVors
maxVors:
number=25
Defined in: src/sdk/navigation/NearestContext.ts:298
The maximum number of VORs in the context.
ndbRadius
ndbRadius:
number=150
Defined in: src/sdk/navigation/NearestContext.ts:374
The search radius for NDBs, in nautical miles.
ndbs
readonlyndbs:AdaptiveNearestSubscription<NearestNdbSubscription>
Defined in: src/sdk/navigation/NearestContext.ts:289
The nearest NDB stations.
usrRadius
usrRadius:
number=150
Defined in: src/sdk/navigation/NearestContext.ts:377
The search radius for user facilities, in nautical miles.
usrs
readonlyusrs:AdaptiveNearestSubscription<NearestUsrSubscription>
Defined in: src/sdk/navigation/NearestContext.ts:292
The nearest USR facilities.
vorRadius
vorRadius:
number=150
Defined in: src/sdk/navigation/NearestContext.ts:368
The search radius for VORs, in nautical miles.
vors
readonlyvors:AdaptiveNearestSubscription<NearestVorSubscription>
Defined in: src/sdk/navigation/NearestContext.ts:283
The nearest VOR stations.
Accessors
maxAirportsAbsolute
Get Signature
get maxAirportsAbsolute():
number
Defined in: src/sdk/navigation/NearestContext.ts:311
The maximum number of airports returned by this context's inner searches.
Returns
number
Set Signature
set maxAirportsAbsolute(
val):void
Defined in: src/sdk/navigation/NearestContext.ts:316
Parameters
| Parameter | Type |
|---|---|
val | number |
Returns
void
maxIntersectionsAbsolute
Get Signature
get maxIntersectionsAbsolute():
number
Defined in: src/sdk/navigation/NearestContext.ts:333
The maximum number of intersections returned by this context's inner searches.
Returns
number
Set Signature
set maxIntersectionsAbsolute(
val):void
Defined in: src/sdk/navigation/NearestContext.ts:338
Parameters
| Parameter | Type |
|---|---|
val | number |
Returns
void
maxNdbsAbsolute
Get Signature
get maxNdbsAbsolute():
number
Defined in: src/sdk/navigation/NearestContext.ts:344
The maximum number of NDBs returned by this context's inner searches.
Returns
number
Set Signature
set maxNdbsAbsolute(
val):void
Defined in: src/sdk/navigation/NearestContext.ts:349
Parameters
| Parameter | Type |
|---|---|
val | number |
Returns
void
maxUsrsAbsolute
Get Signature
get maxUsrsAbsolute():
number
Defined in: src/sdk/navigation/NearestContext.ts:355
The maximum number of user facilities returned by this context's inner searches.
Returns
number
Set Signature
set maxUsrsAbsolute(
val):void
Defined in: src/sdk/navigation/NearestContext.ts:360
Parameters
| Parameter | Type |
|---|---|
val | number |
Returns
void
maxVorsAbsolute
Get Signature
get maxVorsAbsolute():
number
Defined in: src/sdk/navigation/NearestContext.ts:322
The maximum number of VORs returned by this context's inner searches.
Returns
number
Set Signature
set maxVorsAbsolute(
val):void
Defined in: src/sdk/navigation/NearestContext.ts:327
Parameters
| Parameter | Type |
|---|---|
val | number |
Returns
void
Methods
getNearest()
getNearest<
T>(facilityType):undefined|FacilityTypeMap[T]
Defined in: src/sdk/navigation/NearestContext.ts:503
Gets the nearest facility for a given type.
Type Parameters
| Type Parameter |
|---|
T extends FacilityType |
Parameters
| Parameter | Type | Description |
|---|---|---|
facilityType | T | The type of facility. |
Returns
undefined | FacilityTypeMap[T]
The nearest facility for a given type.
getRegionLetter()
getRegionLetter():
undefined|string
Defined in: src/sdk/navigation/NearestContext.ts:485
Gets the airport region letter to use for the first character in waypoint inputs.
Returns
undefined | string
The airport region letter.
update()
update():
Promise<void>
Defined in: src/sdk/navigation/NearestContext.ts:471
Updates this context.
Returns
Promise<void>
getInstance()
staticgetInstance():AdaptiveNearestContext
Defined in: src/sdk/navigation/NearestContext.ts:395
Gets an instance of the AdaptiveNearestContext.
Returns
AdaptiveNearestContext
An instance of the AdaptiveNearestContext.
Throws
An error if the AdaptiveNearestContext has not yet been initailized.
initialize()
staticinitialize(facilityLoader,bus,planePos?):void
Defined in: src/sdk/navigation/NearestContext.ts:411
Initialized the AdaptiveNearestContext instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
facilityLoader | FacilityLoader | The facility loader to use for the instance. |
bus | EventBus | The 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.
onInitialized()
staticonInitialized(handler):null|Subscription
Defined in: src/sdk/navigation/NearestContext.ts:427
Subscribes to this NearestContext being initialized, or invokes the handler immediately if it is already initialized
Parameters
| Parameter | Type | Description |
|---|---|---|
handler | (instance) => void | the handler |
Returns
null | Subscription
the subscription, if the action was not immediately performed