Skip to main content

Class: NearestStore

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:119

A nearest store.

Constructors​

Constructor​

new NearestStore(loader, filter?): NearestStore

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:150

Create a NearestStore.

Parameters​

ParameterTypeDescription
loaderFacilityLoaderA facility loader.
filter?AirportFilterAn instance of AirportFilter to use for filtration.

Returns​

NearestStore

Properties​

airportCount​

readonly airportCount: Subscribable<number>

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:138


loader?​

optional loader: FacilityLoader

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:123


nearestAirports​

nearestAirports: Map<string, NearbyAirport>

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:131

Map of old facility ICAO (V1) to airport. Excludes facilities that don't fit in the old ICAO format.


nearestFacilities​

nearestFacilities: Map<string, AirportFacility>

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:127

Map of old facility ICAO (V1) to airport. Excludes facilities that don't fit in the old ICAO format.


nearestSubjectList​

readonly nearestSubjectList: ArraySubject<Subject<NearbyAirport>>

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:135


nearestSubjects​

nearestSubjects: Subject<NearbyAirport>[]

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:134


planeHeading​

readonly planeHeading: Subject<number>

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:121


planePos​

readonly planePos: GeoPointSubject

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:120

Methods​

createNearbyAirport()​

createNearbyAirport(facility): NearbyAirport

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:327

Create a NearbyAirport from an AirportFacility.

Parameters​

ParameterTypeDescription
facilityAirportFacilityThe AirportFacility record.

Returns​

NearbyAirport

The populated NearbyAirport


searchNearest()​

searchNearest(): void

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:189

Update our nearest airport list.

Returns​

void


setFilter()​

setFilter(runwayLength, surfaceType): void

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:178

Sets a new airport filter for the nearest search.

Parameters​

ParameterTypeDescription
runwayLengthnumberThe desired minimum runway length in feet.
surfaceTypenumberThe allowable surface types.

Returns​

void


updateNearbyAirport()​

updateNearbyAirport(airport): NearbyAirport | undefined

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/Controllers/NearestStore.ts:377

Update the dynamic data on a nearby airport.

Parameters​

ParameterTypeDescription
airportNearbyAirportThe airport to update.

Returns​

NearbyAirport | undefined

An updated airport or undefined.