Skip to main content

Class: G3000NearestContext

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:15

A G3000 nearest facilities context. Maintains search subscriptions for the nearest airports, VORs, NDBs, intersections, and user waypoints to the airplane's position.

Properties

_updateEvent

readonly _updateEvent: SubEvent<G3000NearestContext, void>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:38


airports

readonly airports: NearestSubscription<AirportFacility>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:21

The nearest airports.


intersections

readonly intersections: NearestSubscription<IntersectionFacility>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:27

The nearest intersections.


ndbs

readonly ndbs: NearestSubscription<NdbFacility>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:30

The nearest NDB stations.


updateEvent

readonly updateEvent: ReadonlySubEvent<G3000NearestContext, void>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:40

A subscribable event which fires when this context is updated.


usrs

readonly usrs: NearestSubscription<UserFacility>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:33

The nearest USR facilities.


vors

readonly vors: NearestSubscription<VorFacility>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:24

The nearest VOR stations.


weather

readonly weather: NearestSubscription<AirportFacility>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:36

The nearest airports with weather information.

Methods

getNearest()

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

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:191

Gets the nearest facility for a given type.

Type Parameters

Type Parameter
T extends FacilityType

Parameters

ParameterTypeDescription
facilityTypeTThe type of facility.

Returns

undefined | FacilityTypeMap[T]

The nearest facility for a given type.


getRegionLetter()

getRegionLetter(): undefined | string

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:182

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/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:198

Updates this context.

Returns

Promise<void>


getInstance()

static getInstance(): Promise<G3000NearestContext>

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:217

Gets the G3000NearestContext instance on the local instrument.

Returns

Promise<G3000NearestContext>

A Promise which will be fulfilled with the G3000NearestContext instance on the local instrument once it is initialized.


initializeInstance()

static initializeInstance(facilityLoader, bus, fmsPosIndex): G3000NearestContext

Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/Nearest/G3000NearestContext.ts:233

Initializes and returns the G3000NearestContext instance on the local instrument. If the instance is already initialized, this method returns the instance without performing any other actions.

Parameters

ParameterTypeDescription
facilityLoaderFacilityLoaderA facility loader.
busEventBusThe event bus.
fmsPosIndexnumber | Subscribable<number>The index of the FMS geo-positioning system used by the context to get the airplane's position.

Returns

G3000NearestContext

The initialized G3000NearestContext instance on the local instrument.