GnssModule

Main GNSS Module class Manages device connections, NMEA parsing, and NTRIP client

Constructor

new GnssModule(options)

Create a new GNSS module instance

Parameters:
NameTypeDescription
optionsObject

Configuration options

Methods

(async) configureDevice(settings) → {Promise.<boolean>}

Configure the device with specified settings

Parameters:
NameTypeDescription
settingsObject

Device settings to apply

Returns:

Success flag

Type: 
Promise.<boolean>

(async) connectBluetooth(options) → {Promise.<boolean>}

Connect specifically via Bluetooth

Parameters:
NameTypeDescription
optionsObject

Bluetooth connection options

Returns:

Connection success

Type: 
Promise.<boolean>

(async) connectDevice(options) → {Promise.<boolean>}

Connect to a GNSS device using available methods

Parameters:
NameTypeDescription
optionsObject

Connection options

Returns:

Connection success

Type: 
Promise.<boolean>

(async) connectNtrip(options) → {Promise.<boolean>}

Connect to NTRIP caster

Parameters:
NameTypeDescription
optionsObject

Connection options

Returns:

Connection success

Type: 
Promise.<boolean>

(async) connectSerial(options) → {Promise.<boolean>}

Connect specifically via Serial

Parameters:
NameTypeDescription
optionsObject

Serial connection options

Returns:

Connection success

Type: 
Promise.<boolean>

(async) disconnectDevice() → {Promise.<void>}

Disconnect from device

Returns:
Type: 
Promise.<void>

(async) disconnectNtrip() → {Promise.<void>}

Disconnect from NTRIP

Returns:
Type: 
Promise.<void>

getPosition() → {Object|null}

Get current position

Returns:

Current position

Type: 
Object | null

getSatellites() → {Array|null}

Get satellite information

Returns:

Satellite information

Type: 
Array | null

getSettings() → {Settings}

Get the settings manager

Returns:

Settings manager

Type: 
Settings

off(event, callback)

Unsubscribe from an event

Parameters:
NameTypeDescription
eventstring

Event name

callbackfunction

Callback function

on(event, callback) → {function}

Subscribe to an event

Parameters:
NameTypeDescription
eventstring

Event name

callbackfunction

Callback function

Returns:

Unsubscribe function

Type: 
function