SELKIELogger  1.0.0
Collaboration diagram for UBX Commands:

Functions

bool ubx_setBaudRate (const int handle, const uint32_t baud)
 Send UBX port configuration to switch baud rate. More...
 
bool ubx_setMessageRate (const int handle, const uint8_t msgClass, const uint8_t msgID, const uint8_t rate)
 Send UBX rate command to enable/disable message types. More...
 
bool ubx_pollMessage (const int handle, const uint8_t msgClass, const uint8_t msgID)
 Request specific message by class and ID. More...
 
bool ubx_enableGalileo (const int handle)
 Enable Galileo constellation use. More...
 
bool ubx_setNavigationRate (const int handle, const uint16_t interval, const uint16_t outputRate)
 Set UBX navigation calculation and reporting rate. More...
 
bool ubx_enableLogMessages (const int handle)
 Enable log/information messages from GPS device. More...
 
bool ubx_disableLogMessages (const int handle)
 Disable log/information messages from GPS device. More...
 
bool ubx_setI2CAddress (const int handle, const uint8_t addr)
 Set I2C address. More...
 

Detailed Description

Send commands to a connected GPS module

Function Documentation

◆ ubx_disableLogMessages()

bool ubx_disableLogMessages ( const int  handle)

Disable log/information messages from GPS device.

Disables options set by ubx_enableLogMessages()

Parameters
[in]handleFile descriptor to write command to
Returns
Status of ubx_writeMessage()

Definition at line 224 of file GPSCommands.c.

◆ ubx_enableGalileo()

bool ubx_enableGalileo ( const int  handle)

Enable Galileo constellation use.

Not making this configurable for now, as the "proper" method would need a bit more faff

Parameters
[in]handleFile descriptor to write command to
Returns
Status of ubx_writeMessage()

Definition at line 140 of file GPSCommands.c.

◆ ubx_enableLogMessages()

bool ubx_enableLogMessages ( const int  handle)

Enable log/information messages from GPS device.

Allows us to log warnings and information from the GPS module, largely during the startup and configuration process.

Enables error, warning and information messages on UART1 only and disables message output on all other ports.

Parameters
[in]handleFile descriptor to write command to
Returns
Status of ubx_writeMessage()

Definition at line 199 of file GPSCommands.c.

◆ ubx_pollMessage()

bool ubx_pollMessage ( const int  handle,
const uint8_t  msgClass,
const uint8_t  msgID 
)

Request specific message by class and ID.

Some UBX message types can be polled by sending a message with the message class and ID but zero length.

Not valid for all types, check U-Blox manual for information

Parameters
[in]handleFile descriptor to write command to
[in]msgClassUBX Message Class
[in]msgIDUBX Message ID/Type
Returns
Status of ubx_writeMessage()

Definition at line 128 of file GPSCommands.c.

◆ ubx_setBaudRate()

bool ubx_setBaudRate ( const int  handle,
const uint32_t  baud 
)

Send UBX port configuration to switch baud rate.

Sends a UBX protocol CFG-PRT message, configuring UART 1 for the specified baud rate with all protocols permitted as input and only UBX messages permitted as output.

No configuration for UBX message types is performed here, so the GPS may just sit silently until we configure the messages we want as output (depending on default configuration).

Parameters
[in]handleFile descriptor to write command to
[in]baudDesired baud rate - will be converted with baud_to_flag()
Returns
Status of ubx_writeMessage()

Definition at line 53 of file GPSCommands.c.

◆ ubx_setI2CAddress()

bool ubx_setI2CAddress ( const int  handle,
const uint8_t  addr 
)

Set I2C address.

Set I2C address for this GPS module

Parameters
[in]handleFile descriptor to write command to
[in]addrNew I2C address
Returns
Status of ubx_writeMessage()

Definition at line 250 of file GPSCommands.c.

◆ ubx_setMessageRate()

bool ubx_setMessageRate ( const int  handle,
const uint8_t  msgClass,
const uint8_t  msgID,
const uint8_t  rate 
)

Send UBX rate command to enable/disable message types.

Sends a UBX protcol CFG-MSG message with the provided message class, type and rate.

The message is output very "rate" updates/calculations on UART1 and disabled on all other outputs.

Parameters
[in]handleFile descriptor to write command to
[in]msgClassUBX Message Class
[in]msgIDUBX Message ID/Type
[in]rateRequested message rate (0 to disable)
Returns
Status of ubx_writeMessage()

Definition at line 95 of file GPSCommands.c.

◆ ubx_setNavigationRate()

bool ubx_setNavigationRate ( const int  handle,
const uint16_t  interval,
const uint16_t  outputRate 
)

Set UBX navigation calculation and reporting rate.

Configures the GPS navigation calculation and reporting rate.

  • Interval is measured in milliseconds and sets navigation results calculation rate
  • Output rate sets how many measurements are made before an update message is sent.

Can be overridden by power saving settings

Parameters
[in]handleFile descriptor to write command to
[in]intervalCalculation interval in milliseconds
[in]outputRateOutput solution every 'outputRate' calculations
Returns
Status of ubx_writeMessage()

Definition at line 171 of file GPSCommands.c.