PX4 Firmware
PX4 Autopilot Software http://px4.io
ubx.cpp File Reference

U-Blox protocol implementation. More...

#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <ctime>
#include "ubx.h"
#include "rtcm.h"
Include dependency graph for ubx.cpp:

Go to the source code of this file.

Macros

#define UBX_CONFIG_TIMEOUT   250
 
#define UBX_PACKET_TIMEOUT   2
 
#define DISABLE_MSG_INTERVAL   1000000
 
#define MIN(X, Y)   ((X) < (Y) ? (X) : (Y))
 
#define SWAP16(X)   ((((X) >> 8) & 0x00ff) | (((X) << 8) & 0xff00))
 
#define FNV1_32_INIT   ((uint32_t)0x811c9dc5)
 
#define FNV1_32_PRIME   ((uint32_t)0x01000193)
 
#define UBX_TRACE_PARSER(...)   {/*GPS_INFO(__VA_ARGS__);*/} /* decoding progress in parse_char() */
 
#define UBX_TRACE_RXMSG(...)   {/*GPS_INFO(__VA_ARGS__);*/} /* Rx msgs in payload_rx_done() */
 
#define UBX_TRACE_SVINFO(...)   {/*GPS_INFO(__VA_ARGS__);*/} /* NAV-SVINFO processing (debug use only, will cause rx buffer overflows) */
 
#define UBX_WARN(...)   {GPS_WARN(__VA_ARGS__);}
 
#define UBX_DEBUG(...)   {/*GPS_WARN(__VA_ARGS__);*/}
 

Detailed Description

Macro Definition Documentation

◆ DISABLE_MSG_INTERVAL

#define DISABLE_MSG_INTERVAL   1000000

Definition at line 64 of file ubx.cpp.

Referenced by GPSDriverUBX::payloadRxInit().

◆ FNV1_32_INIT

#define FNV1_32_INIT   ((uint32_t)0x811c9dc5)

Definition at line 69 of file ubx.cpp.

Referenced by GPSDriverUBX::payloadRxAddMonVer().

◆ FNV1_32_PRIME

#define FNV1_32_PRIME   ((uint32_t)0x01000193)

Definition at line 70 of file ubx.cpp.

Referenced by GPSDriverUBX::fnv1_32_str().

◆ MIN

#define MIN (   X,
 
)    ((X) < (Y) ? (X) : (Y))

◆ SWAP16

#define SWAP16 (   X)    ((((X) >> 8) & 0x00ff) | (((X) << 8) & 0xff00))

Definition at line 67 of file ubx.cpp.

Referenced by GPSDriverUBX::payloadRxInit(), and GPSDriverUBX::waitForAck().

◆ UBX_CONFIG_TIMEOUT

◆ UBX_DEBUG

◆ UBX_PACKET_TIMEOUT

#define UBX_PACKET_TIMEOUT   2

Definition at line 63 of file ubx.cpp.

Referenced by GPSDriverUBX::receive().

◆ UBX_TRACE_PARSER

#define UBX_TRACE_PARSER (   ...)    {/*GPS_INFO(__VA_ARGS__);*/} /* decoding progress in parse_char() */

Definition at line 74 of file ubx.cpp.

Referenced by GPSDriverUBX::parseChar().

◆ UBX_TRACE_RXMSG

#define UBX_TRACE_RXMSG (   ...)    {/*GPS_INFO(__VA_ARGS__);*/} /* Rx msgs in payload_rx_done() */

Definition at line 75 of file ubx.cpp.

Referenced by GPSDriverUBX::payloadRxDone().

◆ UBX_TRACE_SVINFO

#define UBX_TRACE_SVINFO (   ...)    {/*GPS_INFO(__VA_ARGS__);*/} /* NAV-SVINFO processing (debug use only, will cause rx buffer overflows) */

◆ UBX_WARN