Class: GpsReceiverSelector
Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:60
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
Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:93
Creates a new instance of GpsReceiverSelector.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
candidateReceiverIndexes | Iterable <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
Constructor
new GpsReceiverSelector(
bus
,candidateReceiverIndexes
,preferredReceiverIndex?
):GpsReceiverSelector
Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:106
Creates a new instance of GpsReceiverSelector.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
candidateReceiverIndexes | Iterable <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
Properties
selectedIndex
readonly
selectedIndex:Subscribable
<number
>
Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:66
Methods
destroy()
destroy():
void
Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:260
Destroys this selector.
Returns
void
init()
init():
void
Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:157
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.