Skip to main content

Class: GpsReceiverSelector

Automatically selects the best GPS receiver from a set of candidates based on the current states of all receivers. Receivers that have computed a 3D position solution with differential corrections are favored over those that have computed a 3D solution without corrections, and either of these are favored over those that have not computed any position solution.

Constructors

constructor

new GpsReceiverSelector(bus, candidateReceiverIndexes, options?): GpsReceiverSelector

Creates a new instance of GpsReceiverSelector.

Parameters

NameTypeDescription
busEventBusThe event bus.
candidateReceiverIndexesIterable<number> | SubscribableSet<number>The indexes of the GPS receivers from which to select.
options?Readonly<GpsReceiverSelectorOptions>Options with which to configure the selector.

Returns

GpsReceiverSelector

Defined in

src/garminsdk/navigation/GpsReceiverSelector.ts:93

new GpsReceiverSelector(bus, candidateReceiverIndexes, preferredReceiverIndex?): GpsReceiverSelector

Creates a new instance of GpsReceiverSelector.

Parameters

NameTypeDescription
busEventBusThe event bus.
candidateReceiverIndexesIterable<number> | SubscribableSet<number>The indexes of the GPS receivers from which to select.
preferredReceiverIndex?number | Subscribable<number>The index of this selector's preferred GPS receiver, or -1 if there is no such receiver. This selector is guaranteed to select the preferred GPS receiver if its state is at least as desirable as the state of all other receivers from which to select. Defaults to -1.

Returns

GpsReceiverSelector

Defined in

src/garminsdk/navigation/GpsReceiverSelector.ts:106

Properties

selectedIndex

Readonly selectedIndex: Subscribable<number>

Defined in

src/garminsdk/navigation/GpsReceiverSelector.ts:66

Methods

destroy

destroy(): void

Destroys this selector.

Returns

void

Defined in

src/garminsdk/navigation/GpsReceiverSelector.ts:260


init

init(): void

Initializes this selector. Once initialized, this selector will automatically select the best GPS receiver among its candidates.

Returns

void

Throws

Error if this selector has been destroyed.

Defined in

src/garminsdk/navigation/GpsReceiverSelector.ts:157