62 #define UBX_CONFIG_TIMEOUT 250 // ms, timeout for waiting ACK 63 #define UBX_PACKET_TIMEOUT 2 // ms, if now data during this delay assume that full update received 64 #define DISABLE_MSG_INTERVAL 1000000 // us, try to disable message with this interval 66 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) 67 #define SWAP16(X) ((((X) >> 8) & 0x00ff) | (((X) << 8) & 0xff00)) 69 #define FNV1_32_INIT ((uint32_t)0x811c9dc5) // init value for FNV1 hash algorithm 70 #define FNV1_32_PRIME ((uint32_t)0x01000193) // magic prime for FNV1 hash algorithm 74 #define UBX_TRACE_PARSER(...) {} 75 #define UBX_TRACE_RXMSG(...) {} 76 #define UBX_TRACE_SVINFO(...) {} 79 #define UBX_WARN(...) {GPS_WARN(__VA_ARGS__);} 80 #define UBX_DEBUG(...) {} 85 uint8_t dynamic_model)
87 , _gps_position(gps_position)
88 , _satellite_info(satellite_info)
89 , _interface(gpsInterface)
90 , _dyn_model(dynamic_model)
115 const bool auto_baudrate = baudrate == 0;
120 const unsigned baudrates[] = {38400, 57600, 9600, 115200, 230400};
125 for (baud_i = 0; baud_i <
sizeof(baudrates) /
sizeof(baudrates[0]); baud_i++) {
126 unsigned test_baudrate = baudrates[baud_i];
128 if (!auto_baudrate && baudrate != test_baudrate) {
132 UBX_DEBUG(
"baudrate set to %i", test_baudrate);
149 cfg_valset_msg_size);
153 cfg_valset_msg_size);
160 cfg_valset_msg_size);
164 cfg_valset_msg_size);
167 bool cfg_valset_success =
false;
172 cfg_valset_success =
true;
176 if (cfg_valset_success) {
203 cfg_prt[0].
baudRate = test_baudrate;
208 cfg_prt[1].
baudRate = test_baudrate;
222 cfg_prt[0].baudRate = desired_baudrate;
223 cfg_prt[1].baudRate = desired_baudrate;
233 if (desired_baudrate != test_baudrate) {
242 baudrate = desired_baudrate;
246 if (baud_i >=
sizeof(baudrates) /
sizeof(baudrates[0])) {
263 bool cfg_valset_success =
false;
268 cfg_valset_success =
true;
272 if (cfg_valset_success) {
333 if (_proto_ver_27_or_higher) {
372 memset(&_buf.payload_tx_cfg_nav5, 0,
sizeof(_buf.payload_tx_cfg_nav5));
374 _buf.payload_tx_cfg_nav5.dynModel =
_dyn_model;
443 cfg_valset_msg_size);
495 if (msg_size +
sizeof(key_id) +
sizeof(value) >
sizeof(
_buf)) {
497 UBX_WARN(
"buf for CFG_VALSET too small");
502 memcpy(buffer + msg_size, &key_id,
sizeof(key_id));
503 msg_size +=
sizeof(key_id);
504 memcpy(buffer + msg_size, &value,
sizeof(value));
505 msg_size +=
sizeof(value);
512 if (!cfgValset<uint8_t>(key_id + 4, value, msg_size)) {
518 if (!cfgValset<uint8_t>(key_id + 1, value, msg_size)) {
522 if (!cfgValset<uint8_t>(key_id + 3, value, msg_size)) {
546 UBX_WARN(
"TMODE3 failed. Device w/o base station support?");
557 memset(&_buf.payload_tx_cfg_tmode3, 0,
sizeof(_buf.payload_tx_cfg_tmode3));
558 _buf.payload_tx_cfg_tmode3.flags = 1;
576 UBX_DEBUG(
"Setting fixed base position");
580 memset(&_buf.payload_tx_cfg_tmode3, 0,
sizeof(_buf.payload_tx_cfg_tmode3));
581 _buf.payload_tx_cfg_tmode3.flags = 2 | (1 << 8) ;
582 int64_t lat64 = (int64_t)(settings.
latitude * 1e9);
583 _buf.payload_tx_cfg_tmode3.ecefXOrLat = (int32_t)(lat64 / 100);
584 _buf.payload_tx_cfg_tmode3.ecefXOrLatHP = lat64 % 100;
585 int64_t lon64 = (int64_t)(settings.
longitude * 1e9);
586 _buf.payload_tx_cfg_tmode3.ecefYOrLon = (int32_t)(lon64 / 100);
587 _buf.payload_tx_cfg_tmode3.ecefYOrLonHP = lon64 % 100;
588 int64_t alt64 = (int64_t)((
double)settings.
altitude * 1e4);
589 _buf.payload_tx_cfg_tmode3.ecefZOrAlt = (int32_t)(alt64 / 100);
590 _buf.payload_tx_cfg_tmode3.ecefZOrAltHP = alt64 % 100;
592 _buf.payload_tx_cfg_tmode3.fixedPosAcc = (uint32_t)(settings.
position_accuracy * 10.f);
648 UBX_DEBUG(
"Setting fixed base position");
654 int64_t lat64 = (int64_t)(settings.
latitude * 1e9);
657 int64_t lon64 = (int64_t)(settings.
longitude * 1e9);
660 int64_t alt64 = (int64_t)((
double)settings.
altitude * 1e4);
664 cfg_valset_msg_size);
733 }
else if (ret == 0) {
735 if (ready_to_return) {
745 for (
int i = 0; i < ret; i++) {
751 if (buf[ret - 1] == 0xff) {
752 if (ready_to_return) {
869 }
else if (ret > 0) {
1121 UBX_WARN(
"ubx msg 0x%04x invalid len %u",
SWAP16((
unsigned)_rx_msg), (
unsigned)_rx_payload_length);
1141 uint8_t *p_buf = (uint8_t *)&
_buf;
1156 uint8_t *p_buf = (uint8_t *)&
_buf;
1175 p_buf[buf_index] = b;
1186 UBX_TRACE_SVINFO(
"SAT #%02u used %u snr %3u elevation %3u azimuth %3u svid %3u",
1187 (
unsigned)sat_index + 1,
1211 uint8_t *p_buf = (uint8_t *)&
_buf;
1230 p_buf[buf_index] = b;
1241 UBX_TRACE_SVINFO(
"SVINFO #%02u used %u snr %3u elevation %3u azimuth %3u svid %3u",
1242 (
unsigned)sat_index + 1,
1267 uint8_t *p_buf = (uint8_t *)&
_buf;
1313 p_buf[buf_index] = b;
1357 if (carr_soln == 1) {
1360 }
else if (carr_soln == 2) {
1405 time_t epoch = mktime(&timeinfo);
1444 uint8_t *p_buf = (uint8_t *)&
_buf;
1452 uint8_t *p_buf = (uint8_t *)&
_buf;
1507 timeinfo.tm_isdst = 0;
1509 time_t epoch = mktime(&timeinfo);
1556 UBX_DEBUG(
"Survey-in status: %is cur accuracy: %imm nr obs: %i valid: %i active: %i",
1560 double ecef_x = ((double)svin.
meanX + (
double)svin.
meanXHP * 0.01) * 0.01;
1561 double ecef_y = ((double)svin.
meanY + (
double)svin.
meanYHP * 0.01) * 0.01;
1562 double ecef_z = ((double)svin.
meanZ + (
double)svin.
meanZHP * 0.01) * 0.01;
1766 for (uint16_t i = 0; i < length; i++) {
1767 checksum->
ck_a = checksum->
ck_a + buffer[i];
1778 UBX_WARN(
"FIXME: use of deprecated msg CFG_MSG (%i %i)", msg, rate);
1782 memset(&cfg_msg, 0,
sizeof(cfg_msg));
1785 cfg_msg.
rate = rate;
1811 calcChecksum(((uint8_t *)&header) + 2,
sizeof(header) - 2, &checksum);
1813 if (payload !=
nullptr) {
1818 if (
write((
void *)&header,
sizeof(header)) !=
sizeof(header)) {
1822 if (payload &&
write((
void *)payload, length) != length) {
1826 if (
write((
void *)&checksum,
sizeof(checksum)) !=
sizeof(checksum)) {
1844 #if defined(NO_FNV_GCC_OPTIMIZATION) 1847 hval += (hval << 1) + (hval << 4) + (hval << 7) + (hval << 8) + (hval << 24);
1851 hval ^= (uint32_t) * s++;
1864 switch (restart_type) {
#define UBX_CFG_KEY_RATE_MEAS
#define UBX_MSG_INF_NOTICE
void surveyInStatus(SurveyInStatus &status)
#define UBX_TX_CFG_PRT_INPROTOMASK_RTCM
UBX in.
uint32_t cAcc
Course / Heading accuracy estimate [1e-5 deg].
ubx_payload_tx_cfg_rst_t payload_tx_cfg_rst
#define UBX_TX_CFG_RST_BBR_MODE_WARM_START
int restartSurveyIn()
Start or restart the survey-in procees.
#define DISABLE_MSG_INTERVAL
const Interface _interface
ubx_payload_rx_nav_svinfo_part2_t payload_rx_nav_svinfo_part2
void addByteToChecksum(const uint8_t)
While parsing add every byte (except the sync bytes) to the checksum.
uint32_t hAcc
Horizontal accuracy estimate [mm].
#define UBX_CFG_KEY_RATE_NAV
#define UBX_TX_CFG_NAV5_FIXMODE
1 2D only, 2 3D only, 3 Auto 2D/3D
uint8_t min
Minute of hour, range 0..59 (UTC)
#define UBX_CFG_KEY_TMODE_HEIGHT
#define UBX_CFG_KEY_CFG_UART1_PARITY
ubx_payload_rx_mon_hw_ubx6_t payload_rx_mon_hw_ubx6
#define UBX_PAYLOAD_RX_NAV_PVT_SIZE_UBX8
uint16_t timeRef
Alignment to reference time: 0 = UTC time, 1 = GPS time.
#define UBX_CFG_KEY_NAVSPG_UTCSTANDARD
union GPSBaseStationSupport::BaseSettings::@4 settings
static struct vehicle_status_s status
#define UBX_CFG_KEY_MSGOUT_UBX_MON_RF_I2C
#define UBX_CFG_KEY_SPI_ENABLED
#define UBX_CFG_LAYER_RAM
#define UBX_MSG_RTCM3_1127
int restartSurveyInPreV27()
restartSurveyIn for protocol version < 27 (_proto_ver_27_or_higher == false)
#define UBX_CFG_KEY_CFG_UART1_BAUDRATE
uint8_t numCh
Number of channels.
#define UBX_CFG_KEY_TMODE_POS_TYPE
#define UBX_MSG_INF_ERROR
#define UBX_CFG_KEY_MSGOUT_RTCM_3X_TYPE1230_I2C
#define UBX_CFG_KEY_TMODE_LAT
int32_t height
Height above ellipsoid [mm].
ubx_payload_rx_nav_posllh_t payload_rx_nav_posllh
#define UBX_PAYLOAD_RX_NAV_PVT_SIZE_UBX7
uint64_t _last_timestamp_time
uint32_t hAcc
Horizontal accuracy estimate [mm].
#define UBX_CFG_KEY_TMODE_HEIGHT_HP
int setBaudrate(int baudrate)
set the Baudrate
uint16_t navRate
Navigation Rate, in number of measurement cycles.
#define UBX_TX_CFG_PRT_BAUDRATE
choose 38400 as GPS baudrate (pre M8* boards only)
uint32_t vAcc
Vertical accuracy estimate [mm].
uint8_t gpsFix
GPSfix type: 0 = No fix, 1 = Dead Reckoning only, 2 = 2D fix, 3 = 3d-fix, 4 = GPS + dead reckoning...
uint8_t month
Month, range 1..12 (UTC)
#define UBX_RX_NAV_TIMEUTC_VALID_VALIDUTC
validUTC (1 = Valid UTC Time)
#define UBX_CFG_KEY_MSGOUT_RTCM_3X_TYPE1005_I2C
#define UBX_CFG_KEY_CFG_SPIINPROT_RTCM3X
ubx_payload_rx_mon_hw_ubx7_t payload_rx_mon_hw_ubx7
uint8_t valid
Validity Flags (see UBX_RX_NAV_TIMEUTC_VALID_...)
uint16_t year
Year, range 1999..2099 (UTC)
ubx_payload_rx_nav_timeutc_t payload_rx_nav_timeutc
bool cfgValsetPort(uint32_t key_id, uint8_t value, int &msg_size)
Add a configuration value that is port-specific (MSGOUT messages).
bool sendMessage(const uint16_t msg, const uint8_t *payload, const uint16_t length)
Send a message.
#define UBX_CFG_KEY_CFG_UART1OUTPROT_NMEA
#define UBX_MSG_CFG_TMODE3
ubx_payload_rx_mon_rf_t payload_rx_mon_rf
uint32_t sAcc
Speed accuracy estimate [mm/s].
#define UBX_CFG_KEY_CFG_UART1OUTPROT_RTCM3X
ubx_payload_rx_nav_sol_t payload_rx_nav_sol
int32_t velN
North velocity component [cm/s].
uint8_t day
Day of month, range 1..31 (UTC)
ubx_payload_rx_nav_pvt_t payload_rx_nav_pvt
#define UBX_CFG_KEY_CFG_UART1_STOPBITS
struct vehicle_gps_position_s * _gps_position
ubx_payload_rx_mon_ver_part1_t payload_rx_mon_ver_part1
uint32_t fnv1_32_str(uint8_t *str, uint32_t hval)
Calculate FNV1 hash.
int32_t lat
Latitude [1e-7 deg].
ubx_payload_rx_mon_ver_part2_t payload_rx_mon_ver_part2
void reset()
reset the parsing state
int8_t elev
Elevation [deg] range: +/-90.
#define UBX_CFG_KEY_NAVHPG_DGNSSMODE
int32_t lon
Longitude [1e-7 deg].
uint8_t sec
Seconds of minute, range 0..60 (UTC)
#define UBX_CFG_KEY_CFG_SPIINPROT_NMEA
uint8_t numSvs
Number of Satellites.
int read(uint8_t *buf, int buf_length, int timeout)
read from device
uint16_t _ack_waiting_msg
ubx_payload_rx_nav_sat_part1_t payload_rx_nav_sat_part1
#define UBX_CFG_KEY_NAVSPG_FIXMODE
#define UBX_CFG_KEY_SPI_MAXFF
#define UBX_CFG_KEY_CFG_USBOUTPROT_UBX
bool configureMessageRate(const uint16_t msg, const uint8_t rate)
Configure message rate.
ubx_payload_tx_cfg_tmode3_t payload_tx_cfg_tmode3
#define UBX_TX_CFG_PRT_PORTID_USB
USB.
#define UBX_BAUDRATE_M8_AND_NEWER
baudrate for M8+ boards
#define UBX_TX_CFG_PRT_MODE
0b0000100011010000: 8N1
FixedPositionSettings fixed_position
int32_t height
Height above ellipsoid [mm].
#define UBX_CFG_KEY_TMODE_SVIN_MIN_DUR
#define UBX_CFG_KEY_CFG_UART1INPROT_UBX
#define UBX_MSG_NAV_TIMEUTC
#define UBX_TX_CFG_PRT_INPROTOMASK_GPS
RTCM3 in and UBX in.
#define UBX_MSG_RTCM3_1230
#define UBX_CFG_KEY_CFG_UART1INPROT_NMEA
gps_abstime _disable_cmd_last
void decodeInit(void)
Reset the parse state machine for a fresh start.
#define UBX_CFG_KEY_CFG_USBINPROT_UBX
#define UBX_CFG_KEY_CFG_USBINPROT_RTCM3X
int receive(unsigned timeout) override
receive & handle new data from the device
bool _proto_ver_27_or_higher
true if protocol version 27 or higher detected
#define UBX_TX_CFG_NAV5_MASK
Only update dynamic model and fix mode.
int write(const void *buf, int buf_length)
write to the device
int reset(GPSRestartType restart_type) override
Reset GPS device.
static char msg[NUM_MSG][CONFIG_USART1_TXBUFSIZE]
#define UBX_CFG_KEY_MSGOUT_RTCM_3X_TYPE1087_I2C
#define UBX_TX_CFG_PRT_OUTPROTOMASK_RTCM
RTCM3 out and UBX out.
#define UBX_CFG_KEY_CFG_UART1INPROT_RTCM3X
uint32_t speed
Speed (3-D) [cm/s].
int32_t timestamp_time_relative
#define UBX_TRACE_SVINFO(...)
#define UBX_RX_NAV_PVT_FLAGS_DIFFSOLN
diffSoln (1 if differential corrections were applied)
int32_t gSpeed
Ground Speed (2-D) [mm/s].
uint8_t valid
Validity flags (see UBX_RX_NAV_PVT_VALID_...)
int32_t nano
Fraction of second, range -1e9 .
uint8_t cno
Carrier to Noise Ratio (Signal Strength) [dbHz].
#define UBX_CFG_KEY_CFG_SPIINPROT_UBX
uint8_t min
Minute of hour, range 0..59 (UTC)
void gotRTCMMessage(uint8_t *buf, int buf_length)
got an RTCM message from the device
ubx_payload_rx_mon_rf_block_t block[1]
only read out the first block
#define UBX_RX_NAV_PVT_VALID_VALIDTIME
validTime (Valid UTC Time)
#define UBX_CFG_KEY_CFG_USBINPROT_NMEA
int payloadRxAddNavSat(const uint8_t b)
#define UBX_CFG_KEY_TMODE_SVIN_ACC_LIMIT
#define UBX_CFG_KEY_ODO_USE_COG
int32_t velD
NED down velocity [mm/s].
ubx_decode_state_t _decode_state
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
#define UBX_TX_CFG_PRT_PORTID
UART1.
#define UBX_CFG_KEY_TMODE_MODE
#define UBX_MSG_RTCM3_1077
int32_t velE
NED east velocity [mm/s].
#define UBX_TX_CFG_RST_BBR_MODE_COLD_START
ubx_payload_rx_nav_dop_t payload_rx_nav_dop
int(* GPSCallbackPtr)(GPSCallbackType type, void *data1, int data2, void *user)
Callback function for platform-specific stuff.
ubx_payload_tx_cfg_valset_t payload_tx_cfg_valset
#define UBX_MSG_INF_DEBUG
int payloadRxAddMonVer(const uint8_t b)
Add MON-VER payload rx byte.
ubx_payload_rx_ack_ack_t payload_rx_ack_ack
#define UBX_CFG_KEY_CFG_SPIOUTPROT_NMEA
GPSDriverUBX(Interface gpsInterface, GPSCallbackPtr callback, void *callback_user, struct vehicle_gps_position_s *gps_position, struct satellite_info_s *satellite_info, uint8_t dynamic_model=7)
#define UBX_CFG_KEY_CFG_USBOUTPROT_RTCM3X
uint8_t cfgData
configuration data (key and value pairs, max 64)
uint8_t sec
Seconds of minute, range 0..60 (UTC)
#define GPS_READ_BUFFER_SIZE
buffer size for the read() call. Messages can be longer than that.
#define UBX_CFG_KEY_CFG_UART1_DATABITS
int32_t velN
NED north velocity [mm/s].
U-Blox protocol definition.
#define UBX_TX_CFG_RATE_TIMEREF
0: UTC, 1: GPS time
#define UBX_CFG_KEY_TMODE_LAT_HP
request RTCM output. This is used for (fixed position) base stations
#define UBX_CFG_KEY_CFG_USBOUTPROT_NMEA
#define UBX_RX_NAV_PVT_VALID_VALIDDATE
validDate (Valid UTC Date)
RTCMParsing * _rtcm_parsing
#define UBX_CFG_KEY_TMODE_FIXED_POS_ACC
In cold start mode, the receiver has no information from the last position at startup.
#define UBX_RX_NAV_PVT_VALID_FULLYRESOLVED
fullyResolved (1 = UTC Time of Day has been fully resolved (no seconds uncertainty)) ...
#define UBX_TX_CFG_PRT_OUTPROTOMASK_GPS
UBX out.
uint8_t svid
Satellite ID.
#define UBX_CFG_KEY_MSGOUT_RTCM_3X_TYPE1127_I2C
struct satellite_info_s * _satellite_info
uint16_t vDOP
Vertical DOP [0.01].
#define UBX_MSG_RTCM3_1087
uint8_t svId
Satellite ID.
uint16_t _rx_payload_index
int8_t elev
Elevation [deg].
In warm start mode, the receiver has approximate information for time, position, and coarse satellite...
int parseChar(const uint8_t b)
Parse the binary UBX packet.
#define UBX_CFG_KEY_ODO_OUTLPVEL
uint8_t day
Day of month, range 1..31 (UTC)
#define UBX_MSG_RTCM3_1005
int32_t velD
Down velocity component [cm/s].
int32_t lon
Longitude [1e-7 deg].
uint16_t noisePerMS
Noise level as measured by the GPS core.
#define UBX_TX_CFG_RST_MODE_SOFTWARE
int32_t hMSL
Height above mean sea level [mm].
#define UBX_TX_CFG_RATE_MEASINTERVAL
200ms for 5Hz (F9* boards use 10Hz)
uint16_t hDOP
Horizontal DOP [0.01].
uint32_t vAcc
Vertical accuracy estimate [mm].
uint16_t messageLength() const
ubx_payload_tx_cfg_rate_t payload_tx_cfg_rate
ubx_rxmsg_state_t _rx_state
uint16_t measRate
Measurement Rate, GPS measurements are taken every measRate milliseconds.
uint8_t numSV
Number of SVs used in Nav Solution.
int32_t jamming_indicator
#define UBX_PACKET_TIMEOUT
int16_t azim
Azimuth [deg].
#define UBX_CFG_KEY_MSGOUT_UBX_NAV_PVT_I2C
int16_t azim
Azimuth [deg] range: 0-360.
uint8_t * message() const
#define UBX_CFG_KEY_NAVSPG_DYNMODEL
GPS driver base class with Base Station Support.
int initCfgValset()
Init _buf as CFG-VALSET.
ubx_payload_rx_nav_svinfo_part1_t payload_rx_nav_svinfo_part1
int payloadRxDone(void)
Finish payload rx.
int configureDevicePreV27()
Send configuration values and desired message rates (for protocol version < 27)
#define UBX_MSG_RTCM3_1097
#define UBX_MSG_NAV_SVINFO
#define UBX_CFG_KEY_TMODE_LON
int32_t lat
Latitude [1e-7 deg].
uint8_t _rate_count_lat_lon
#define UBX_TX_CFG_RST_BBR_MODE_HOT_START
#define UBX_MSG_NAV_POSLLH
BaseSettings _base_settings
#define UBX_CFG_KEY_MSGOUT_UBX_NAV_SAT_I2C
#define UBX_CFG_KEY_MSGOUT_RTCM_3X_TYPE1097_I2C
#define UBX_CFG_KEY_CFG_UART1OUTPROT_UBX
#define UBX_CFG_KEY_MSGOUT_RTCM_3X_TYPE1077_I2C
int waitForAck(const uint16_t msg, const unsigned timeout, const bool report)
Wait for message acknowledge.
uint8_t numSV
Number of SVs used in Nav Solution.
#define UBX_CFG_KEY_TMODE_LON_HP
#define UBX_CFG_KEY_MSGOUT_UBX_NAV_DOP_I2C
uint8_t fixType
GNSSfix type: 0 = No fix, 1 = Dead Reckoning only, 2 = 2D fix, 3 = 3d-fix, 4 = GNSS + dead reckoning...
int payloadRxAddNavSvinfo(const uint8_t b)
Add NAV-SVINFO payload rx byte.
#define UBX_TX_CFG_RATE_NAVRATE
cannot be changed
SurveyInSettings survey_in
uint8_t month
Month, range 1..12 (UTC)
bool cfgValset(uint32_t key_id, T value, int &msg_size)
Add a configuration value to _buf and increase the message size msg_size as needed.
#define UBX_RX_NAV_PVT_FLAGS_GNSSFIXOK
gnssFixOK (A valid fix (i.e within DOP & accuracy masks))
void calcChecksum(const uint8_t *buffer, const uint16_t length, ubx_checksum_t *checksum)
Calculate & add checksum for given buffer.
int32_t nano
Fraction of second (UTC) [-1e9...1e9 ns].
#define UBX_CFG_KEY_ODO_OUTLPCOG
uint16_t _rx_payload_length
#define UBX_TX_CFG_PRT_MODE_SPI
#define UBX_CFG_KEY_ODO_USE_ODO
int payloadRxInit(void)
Start payload rx.
In hot start mode, the receiver was powered down only for a short time (4 hours or less)...
int configureDevice()
Send configuration values and desired message rates.
uint8_t flags
Fix Status Flags (see UBX_RX_NAV_PVT_FLAGS_...)
int32_t headMot
Heading of motion (2-D) [1e-5 deg].
#define gps_absolute_time
Get the current time in us.
#define UBX_CFG_KEY_CFG_SPIOUTPROT_UBX
#define UBX_CFG_KEY_RATE_TIMEREF
#define UBX_MSG_INF_WARNING
uint8_t hour
Hour of day, range 0..23 (UTC)
ubx_ack_state_t _ack_state
#define UBX_TRACE_RXMSG(...)
#define UBX_CFG_KEY_CFG_SPIOUTPROT_RTCM3X
uint8_t cno
Carrier to Noise Ratio (Signal Strength) [dbHz].
uint8_t hour
Hour of day, range 0..23 (UTC)
int32_t hMSL
Height above mean sea level [mm].
uint8_t layers
The layers where the configuration should be applied (.
#define UBX_CONFIG_TIMEOUT
#define UBX_MSG_NAV_VELNED
int payloadRxAdd(const uint8_t b)
Add payload rx byte.
#define UBX_TX_CFG_PRT_PORTID_SPI
SPI.
int configure(unsigned &baudrate, OutputMode output_mode) override
configure the device
ubx_payload_rx_nav_sat_part2_t payload_rx_nav_sat_part2
int32_t velE
East velocity component [cm/s].
void setClock(timespec &t)
bool configureMessageRateAndAck(uint16_t msg, uint8_t rate, bool report_ack_error=false)
Combines the configure_message_rate & wait_for_ack calls.
static void ECEF2lla(double ecef_x, double ecef_y, double ecef_z, double &latitude, double &longitude, float &altitude)
Convert an ECEF (Earth Centered Earth Fixed) coordinate to LLA WGS84 (Lat, Lon, Alt).
ubx_payload_rx_nav_velned_t payload_rx_nav_velned
uint32_t headAcc
Heading accuracy estimate (motion and vehicle) [1e-5 deg].
#define UBX_TRACE_PARSER(...)
uint8_t jamInd
CW jamming indicator, scaled (0=no CW jamming, 255=strong CW jamming)
bool addByte(uint8_t b)
add a byte to the message
ubx_payload_rx_nav_svin_t payload_rx_nav_svin
#define UBX_MSG_CFG_VALSET
#define UBX_CFG_KEY_MSGOUT_UBX_NAV_SVIN_I2C
int32_t heading
Heading of motion 2-D [1e-5 deg].