Skip to main content

Class: GpsReceiverSelector

Defined in: workingtitle-instruments-epic2/shared/Systems/GpsReceiverSelector.ts:13

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, enabledReceiverIndexes, preferredReceiverIndex?): GpsReceiverSelector

Defined in: workingtitle-instruments-epic2/shared/Systems/GpsReceiverSelector.ts:43

Constructor.

Parameters​

ParameterTypeDescription
busEventBusThe event bus.
enabledReceiverIndexesIterable<number, any, any> | 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: workingtitle-instruments-epic2/shared/Systems/GpsReceiverSelector.ts:25

Methods​

destroy()​

destroy(): void

Defined in: workingtitle-instruments-epic2/shared/Systems/GpsReceiverSelector.ts:130

Destroys this selector.

Returns​

void


init()​

init(): void

Defined in: workingtitle-instruments-epic2/shared/Systems/GpsReceiverSelector.ts:57

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.