Skip to main content

Type Alias: GpsReceiverSelectorOptions

GpsReceiverSelectorOptions = object

Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:21

Configuration options for GpsReceiverSelector.

Properties

desirabilityComparator()?

optional desirabilityComparator: (a, b) => number

Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:40

A function that compares the desirability of two GPS receivers. If not defined, then a set of default criteria will be used to compare desirability.

Parameters

ParameterTypeDescription
aGpsReceiverSelectionStateThe state of the first GPS receiver.
bGpsReceiverSelectionStateThe state of the second GPS receiver.

Returns

number

A number representing the relative desirability of the two GPS receivers: negative if receiver a is more desirable than b, positive if receiver b is more desirable than a, and 0 if both are equally desirable.


receiverPriorities?

optional receiverPriorities: readonly number[] | ReadonlyMap<number, number> | SubscribableMap<number, number>

Defined in: src/garminsdk/navigation/GpsReceiverSelector.ts:29

The priorities for selecting individual GPS receivers. If two receivers have the same desirability, then the one with the higher priority will be selected. If a receiver's priority is not defined, then it will default to a value of 0. The priorities can be specified as an array of GPS receiver indexes or a map of GPS receiver indexes to the priorities for selecting those receivers. If specified as an array of indexes, then each receiver whose index appears in the array will be assigned a priority equal to array.length - array.indexOf(index).