Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit 5d65bc5

Browse files
authored
Update SparkFun_Ublox_Arduino_Library.h
1 parent e3fb4fa commit 5d65bc5

File tree

1 file changed

+171
-35
lines changed

1 file changed

+171
-35
lines changed

src/SparkFun_Ublox_Arduino_Library.h

+171-35
Original file line numberDiff line numberDiff line change
@@ -103,21 +103,23 @@ typedef enum
103103
const uint8_t UBX_SYNCH_1 = 0xB5;
104104
const uint8_t UBX_SYNCH_2 = 0x62;
105105

106-
const uint8_t UBX_CLASS_NAV = 0x01;
107-
const uint8_t UBX_CLASS_RXM = 0x02;
108-
const uint8_t UBX_CLASS_INF = 0x04;
109-
const uint8_t UBX_CLASS_ACK = 0x05;
110-
const uint8_t UBX_CLASS_CFG = 0x06;
111-
const uint8_t UBX_CLASS_UPD = 0x09;
112-
const uint8_t UBX_CLASS_MON = 0x0A;
113-
const uint8_t UBX_CLASS_AID = 0x0B;
114-
const uint8_t UBX_CLASS_TIM = 0x0D;
115-
const uint8_t UBX_CLASS_ESF = 0x10;
116-
const uint8_t UBX_CLASS_MGA = 0x13;
117-
const uint8_t UBX_CLASS_LOG = 0x21;
118-
const uint8_t UBX_CLASS_SEC = 0x27;
119-
const uint8_t UBX_CLASS_HNR = 0x28;
120-
const uint8_t UBX_CLASS_NMEA = 0xF0;
106+
//The following are UBX Class IDs. Descriptions taken from ZED-F9P Interface Description Document page 32, NEO-M8P Interface Description page 145
107+
const uint8_t UBX_CLASS_NAV = 0x01; //Navigation Results Messages: Position, Speed, Time, Acceleration, Heading, DOP, SVs used
108+
const uint8_t UBX_CLASS_RXM = 0x02; //Receiver Manager Messages: Satellite Status, RTC Status
109+
const uint8_t UBX_CLASS_INF = 0x04; //Information Messages: Printf-Style Messages, with IDs such as Error, Warning, Notice
110+
const uint8_t UBX_CLASS_ACK = 0x05; //Ack/Nak Messages: Acknowledge or Reject messages to UBX-CFG input messages
111+
const uint8_t UBX_CLASS_CFG = 0x06; //Configuration Input Messages: Configure the receiver.
112+
const uint8_t UBX_CLASS_UPD = 0x09; //Firmware Update Messages: Memory/Flash erase/write, Reboot, Flash identification, etc.
113+
const uint8_t UBX_CLASS_MON = 0x0A; //Monitoring Messages: Communication Status, CPU Load, Stack Usage, Task Status
114+
const uint8_t UBX_CLASS_AID = 0x0B; //(NEO-M8P ONLY!!!) AssistNow Aiding Messages: Ephemeris, Almanac, other A-GPS data input
115+
const uint8_t UBX_CLASS_TIM = 0x0D; //Timing Messages: Time Pulse Output, Time Mark Results
116+
const uint8_t UBX_CLASS_ESF = 0x10; //(NEO-M8P ONLY!!!) External Sensor Fusion Messages: External Sensor Measurements and Status Information
117+
const uint8_t UBX_CLASS_MGA = 0x13; //Multiple GNSS Assistance Messages: Assistance data for various GNSS
118+
const uint8_t UBX_CLASS_LOG = 0x21; //Logging Messages: Log creation, deletion, info and retrieval
119+
const uint8_t UBX_CLASS_SEC = 0x27; //Security Feature Messages
120+
const uint8_t UBX_CLASS_HNR = 0x28; //(NEO-M8P ONLY!!!) High Rate Navigation Results Messages: High rate time, position speed, heading
121+
const uint8_t UBX_CLASS_NMEA = 0xF0; //NMEA Strings: standard NMEA strings
122+
121123

122124
const uint8_t UBX_CFG_PRT = 0x00; //Used to configure port specifics
123125
const uint8_t UBX_CFG_RST = 0x04; //Used to reset device
@@ -144,20 +146,154 @@ const uint8_t UBX_NAV_HPPOSLLH = 0x14; //Used for obtaining lat/long/alt in hig
144146
const uint8_t UBX_NAV_SVIN = 0x3B; //Used for checking Survey In status
145147
const uint8_t UBX_NAV_RELPOSNED = 0x3C; //Relative Positioning Information in NED frame
146148

147-
const uint8_t UBX_NMEA_GGA = 0x00;
148-
const uint8_t UBX_NMEA_GLL = 0x01;
149-
const uint8_t UBX_NMEA_GNS = 0x0D;
150-
const uint8_t UBX_NMEA_GRS = 0x06;
151-
const uint8_t UBX_NMEA_GSA = 0x02;
152-
const uint8_t UBX_NMEA_GST = 0x07;
153-
const uint8_t UBX_NMEA_GSV = 0x03;
154-
const uint8_t UBX_NMEA_RMC = 0x04;
155-
const uint8_t UBX_NMEA_VTG = 0x05;
156-
const uint8_t UBX_NMEA_ZDA = 0x08;
149+
//The following are used to enable NMEA messages. Descriptions come from the NMEA messages overview in the ZED-F9P Interface Description
150+
const uint8_t UBX_NMEA_MSB = 0xF0; //All NMEA enable commands have 0xF0 as MSB
151+
const uint8_t UBX_NMEA_DTM = 0x0A; //GxDTM (datum reference)
152+
const uint8_t UBX_NMEA_GAQ = 0x45; //GxGAQ (poll a standard message (if the current talker ID is GA))
153+
const uint8_t UBX_NMEA_GBQ = 0x44; //GxGBQ (poll a standard message (if the current Talker ID is GB))
154+
const uint8_t UBX_NMEA_GBS = 0x09; //GxGBS (GNSS satellite fault detection)
155+
const uint8_t UBX_NMEA_GGA = 0x00; //GxGGA (Global positioning system fix data)
156+
const uint8_t UBX_NMEA_GLL = 0x01; //GxGLL (latitude and long, whith time of position fix and status)
157+
const uint8_t UBX_NMEA_GLQ = 0x43; //GxGLQ (poll a standard message (if the current Talker ID is GL))
158+
const uint8_t UBX_NMEA_GNQ = 0x42; //GxGNQ (poll a standard message (if the current Talker ID is GN))
159+
const uint8_t UBX_NMEA_GNS = 0x0D; //GxGNS (GNSS fix data)
160+
const uint8_t UBX_NMEA_GPQ = 0x040; //GxGPQ (poll a standard message (if the current Talker ID is GP))
161+
const uint8_t UBX_NMEA_GRS = 0x06; //GxGRS (GNSS range residuals)
162+
const uint8_t UBX_NMEA_GSA = 0x02; //GxGSA (GNSS DOP and Active satellites)
163+
const uint8_t UBX_NMEA_GST = 0x07; //GxGST (GNSS Pseudo Range Error Statistics)
164+
const uint8_t UBX_NMEA_GSV = 0x03; //GxGSV (GNSS satellites in view)
165+
const uint8_t UBX_NMEA_RMC = 0x04; //GxRMC (Recommended minimum data)
166+
const uint8_t UBX_NMEA_TXT = 0x41; //GxTXT (text transmission)
167+
const uint8_t UBX_NMEA_VLW = 0x0F; //GxVLW (dual ground/water distance)
168+
const uint8_t UBX_NMEA_VTG = 0x05; //GxVTG (course over ground and Ground speed)
169+
const uint8_t UBX_NMEA_ZDA = 0x08; //GxZDA (Time and Date)
157170

158171
const uint8_t UBX_MON_VER = 0x04; //Used for obtaining Protocol Version
159172
const uint8_t UBX_MON_TXBUF = 0x08; //Used for query tx buffer size/state
160173

174+
//The following are used to configure the NMEA protocol main talker ID and GSV talker ID
175+
const uint8_t UBX_NMEA_MAINTALKERID_NOTOVERRIDDEN = 0x00; //main talker ID is system dependent
176+
const uint8_t UBX_NMEA_MAINTALKERID_GP = 0x01; //main talker ID is GPS
177+
const uint8_t UBX_NMEA_MAINTALKERID_GL = 0x02; //main talker ID is GLONASS
178+
const uint8_t UBX_NMEA_MAINTALKERID_GN = 0x03; //main talker ID is combined receiver
179+
const uint8_t UBX_NMEA_MAINTALKERID_GA = 0x04; //main talker ID is Galileo
180+
const uint8_t UBX_NMEA_MAINTALKERID_GB = 0x05; //main talker ID is BeiDou
181+
const uint8_t UBX_NMEA_GSVTALKERID_GNSS = 0x00; //GNSS specific Talker ID (as defined by NMEA)
182+
const uint8_t UBX_NMEA_GSVTALKERID_MAIN = 0x01; //use the main Talker ID
183+
184+
//The following are used to configure INF UBX messages (information messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34)
185+
const uint8_t UBX_INF_CLASS = 0x04; //All INF messages have 0x04 as the class
186+
const uint8_t UBX_INF_DEBUG = 0x04; //ASCII output with debug contents
187+
const uint8_t UBX_INF_ERROR = 0x00; //ASCII output with error contents
188+
const uint8_t UBX_INF_NOTICE = 0x02; //ASCII output with informational contents
189+
const uint8_t UBX_INF_TEST = 0x03; //ASCII output with test contents
190+
const uint8_t UBX_INF_WARNING = 0x01; //ASCII output with warning contents
191+
192+
//The following are used to configure LOG UBX messages (loggings messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34)
193+
const uint8_t UBX_LOG_CREATE = 0x07; //Create Log File
194+
const uint8_t UBX_LOG_ERASE = 0x03; //Erase Logged Data
195+
const uint8_t UBX_LOG_FINDTIME = 0x0E; //Depending on packet length, either: Find index of a log entry based on a..., or response to FINDTIME requested
196+
const uint8_t UBX_LOG_INFO = 0x08; //Depending on packet length, either: Poll for log information, or Log information
197+
const uint8_t UBX_LOG_RETRIEVEPOSEXTRA = 0x0F; //Odometer log entry
198+
const uint8_t UBX_LOG_RETRIEVEPOS = 0x0B; //Position fix log entry
199+
const uint8_t UBX_LOG_RETRIEVESTRING = 0x0D; //Byte string log entry
200+
const uint8_t UBX_LOG_RETRIEVE = 0x09; //Request log data
201+
const uint8_t UBX_LOG_STRING = 0x04; //Store arbitrary string on on-board flash
202+
203+
//The following are used to configure MGA UBX messages (Multiple GNSS Assistance Messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 34)
204+
const uint8_t UBX_MGA_ACK_DATA0 = 0x60; //Multiple GNSS Acknowledge message
205+
const uint8_t UBX_MGA_BDS_EPH = 0x03; //BDS Ephemeris Assistance
206+
const uint8_t UBX_MGA_BDS_ALM = 0x03; //BDS Almanac Assistance
207+
const uint8_t UBX_MGA_BDS_HEALTH = 0x03; //BDS Health Assistance
208+
const uint8_t UBX_MGA_BDS_UTC = 0x03; //BDS UTC Assistance
209+
const uint8_t UBX_MGA_BDS_IONO = 0x03; //BDS Ionospheric Assistance
210+
const uint8_t UBX_MGA_DBD = 0x80; //Depending on packet length, either: Poll the Navigation Database, or Navigation Database Dump Entry
211+
const uint8_t UBX_MGA_GAL_EPH = 0x02; //Galileo Ephemeris Assistance
212+
const uint8_t UBX_MGA_GAL_ALM = 0x02; //Galileo Almanac Assitance
213+
const uint8_t UBX_MGA_GAL_TIMOFFSET = 0x02; //Galileo GPS time offset assistance
214+
const uint8_t UBX_MGA_GAL_UTC = 0x02; //Galileo UTC Assistance
215+
const uint8_t UBX_MGA_GLO_EPH = 0x06; //GLONASS Ephemeris Assistance
216+
const uint8_t UBX_MGA_GLO_ALM = 0x06; //GLONASS Almanac Assistance
217+
const uint8_t UBX_MGA_GLO_TIMEOFFSET = 0x06; //GLONASS Auxiliary Time Offset Assistance
218+
const uint8_t UBX_MGA_GPS_EPH = 0x00; //GPS Ephemeris Assistance
219+
const uint8_t UBX_MGA_GPS_ALM = 0x00; //GPS Almanac Assistance
220+
const uint8_t UBX_MGA_GPS_HEALTH = 0x00; //GPS Health Assistance
221+
const uint8_t UBX_MGA_GPS_UTC = 0x00; //GPS UTC Assistance
222+
const uint8_t UBX_MGA_GPS_IONO = 0x00; //GPS Ionosphere Assistance
223+
const uint8_t UBX_MGA_INI_POS_XYZ = 0x40; //Initial Position Assistance
224+
const uint8_t UBX_MGA_INI_POS_LLH = 0x40; //Initial Position Assitance
225+
const uint8_t UBX_MGA_INI_TIME_UTC = 0x40; //Initial Time Assistance
226+
const uint8_t UBX_MGA_INI_TIME_GNSS = 0x40; //Initial Time Assistance
227+
const uint8_t UBX_MGA_INI_CLKD = 0x40; //Initial Clock Drift Assitance
228+
const uint8_t UBX_MGA_INI_FREQ = 0x40; //Initial Frequency Assistance
229+
const uint8_t UBX_MGA_INI_EOP = 0x40; //Earth Orientation Parameters Assistance
230+
const uint8_t UBX_MGA_QZSS_EPH = 0x05; //QZSS Ephemeris Assistance
231+
const uint8_t UBX_MGA_QZSS_ALM = 0x05; //QZSS Almanac Assistance
232+
const uint8_t UBX_MGA_QZAA_HEALTH = 0x05; //QZSS Health Assistance
233+
234+
//The following are used to configure the MON UBX messages (monitoring messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 35)
235+
const uint8_t UBX_MON_COMMS = 0x36; //Comm port information
236+
const uint8_t UBX_MON_GNSS = 0x28; //Information message major GNSS selection
237+
const uint8_t UBX_MON_HW2 = 0x0B; //Extended Hardware Status
238+
const uint8_t UBX_MON_HW3 = 0x37; //HW I/O pin information
239+
const uint8_t UBX_MON_HW = 0x09; //Hardware Status
240+
const uint8_t UBX_MON_IO = 0x02; //I/O Subsystem Status
241+
const uint8_t UBX_MON_MSGPP = 0x06; //Message Parse and Process Status
242+
const uint8_t UBX_MON_PATCH = 0x27; //Output information about installed patches
243+
const uint8_t UBX_MON_RF = 0x38; //RF information
244+
const uint8_t UBX_MON_RXBUF = 0x07; //Receiver Buffer Status
245+
const uint8_t UBX_MON_RXR = 0x21; //Receiver Status Information
246+
const uint8_t UBX_MON_TXBUF = 0x08; //Transmitter Buffer Status
247+
const uint8_t UBX_MON_VER = 0x04; //Receiver/Software Version
248+
249+
//The following are used to configure the NAV UBX messages (navigation results messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 35-36)
250+
const uint8_t UBX_NAV_CLOCK = 0x22; //Clock Solution
251+
const uint8_t UBX_NAV_DOP = 0x04; //Dilution of precision
252+
const uint8_t UBX_NAV_EOE = 0x61; //End of Epoch
253+
const uint8_t UBX_NAV_GEOFENCE = 0x39; //Geofencing status
254+
const uint8_t UBX_NAV_HPPOSECEF = 0x13; //High Precision Position Solution in ECEF
255+
const uint8_t UBX_NAV_HPPOSLLH = 0x14; //High Precision Geodetic Position Solution
256+
const uint8_t UBX_NAV_ODO = 0x09; //Odometer Solution
257+
const uint8_t UBX_NAV_ORB = 0x34; //GNSS Orbit Database Info
258+
const uint8_t UBX_NAV_POSECEF = 0x01; //Position Solution in ECEF
259+
const uint8_t UBX_NAV_POSLLH = 0x02; //Geodetic Position Solution
260+
const uint8_t UBX_NAV_PVT = 0x07; //Navigation Position Velocity Time Solution
261+
const uint8_t UBX_NAV_RELPOSNED = 0x3C; //Relative Positioning Information in NED frame
262+
const uint8_t UBX_NAV_RESETODO = 0x10; //Reset odometer
263+
const uint8_t UBX_NAV_SAT = 0x35; //Satellite Information
264+
const uint8_t UBX_NAV_SIG = 0x43; //Signal Information
265+
const uint8_t UBX_NAV_STATUS = 0x03; //Receiver Navigation Status
266+
const uint8_t UBX_NAV_SVIN = 0x3B; //Survey-in data
267+
const uint8_t UBX_NAV_TIMEBDS = 0x24; //BDS Time Solution
268+
const uint8_t UBX_NAV_TIMEGAL = 0x25; //Galileo Time Solution
269+
const uint8_t UBX_NAV_TIMEGLO = 0x23; //GLO Time Solution
270+
const uint8_t UBX_NAV_TIMEGPS = 0x20; //GPS Time Solution
271+
const uint8_t UBX_NAV_TIMELS = 0x26; //Leap second event information
272+
const uint8_t UBX_NAV_TIMEUTC = 0x21; //UTC Time Solution
273+
const uint8_t UBX_NAV_VELECEF = 0x11; //Velocity Solution in ECEF
274+
const uint8_t UBX_NAV_VELNED = 0x12; //Velocity Solution in NED
275+
276+
//The following are used to configure the RXM UBX messages (receiver manager messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36)
277+
const uint8_t UBX_RXM_MEASX = 0x14; //Satellite Measurements for RRLP
278+
const uint8_t UBX_RXM_PMREQ = 0x41; //Requests a Power Management task (two differenent packet sizes)
279+
const uint8_t UBX_RXM_RAWX = 0x15; //Multi-GNSS Raw Measurement Data
280+
const uint8_t UBX_RXM_RLM = 0x59; //Galileo SAR Short-RLM report (two different packet sizes)
281+
const uint8_t UBX_RXM_RTCM = 0x32; //RTCM input status
282+
const uint8_t UBX_RXM_SFRBX = 0x13; //Boradcast Navigation Data Subframe
283+
284+
//The following are used to configure the SEC UBX messages (security feature messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36)
285+
const uint8_t UBX_SEC_UNIQID = 0x03; //Unique chip ID
286+
287+
//The following are used to configure the TIM UBX messages (timing messages). Descriptions from UBX messages overview (ZED_F9P Interface Description Document page 36)
288+
const uint8_t UBX_TIM_TM2 = 0x03; //Time mark data
289+
const uint8_t UBX_TIM_TP = 0x01; //Time Pulse Timedata
290+
const uint8_t UBX_TIM_VRFY = 0x06; //Sourced Time Verification
291+
292+
//The following are used to configure the UPD UBX messages (firmware update messages). Descriptions from UBX messages overview (ZED-F9P Interface Description Document page 36)
293+
const uint8_t UBX_UPD_SOS = 0x14; //Different based on message size (Poll Backup Fil Restore Status, Create Backup File in Flash, Clear Backup File in Flash, Backup File Creation Acknowledge, System Restored from Backup
294+
295+
296+
161297
//The following are used to enable RTCM messages
162298
const uint8_t UBX_CFG_MSG = 0x01;
163299
const uint8_t UBX_RTCM_MSB = 0xF5; //All RTCM enable commands have 0xF5 as MSB
@@ -211,18 +347,18 @@ const uint8_t VAL_GROUP_I2C_SIZE = VAL_SIZE_8; //All fields in I2C group are cur
211347

212348
const uint8_t VAL_ID_I2C_ADDRESS = 0x01;
213349

214-
enum dynModel // Possible values for the dynamic platform model
350+
enum dynModel // Possible values for the dynamic platform model, which provide more accuract position output for the situation. Description extracted from ZED-F9P Integration Manual
215351
{
216-
DYN_MODEL_PORTABLE = 0,
352+
DYN_MODEL_PORTABLE = 0, //Applications with low acceleration, e.g. portable devices. Suitable for most situations.
217353
// 1 is not defined
218-
DYN_MODEL_STATIONARY = 2,
219-
DYN_MODEL_PEDESTRIAN,
220-
DYN_MODEL_AUTOMOTIVE,
221-
DYN_MODEL_SEA,
222-
DYN_MODEL_AIRBORNE1g,
223-
DYN_MODEL_AIRBORNE2g,
224-
DYN_MODEL_AIRBORNE4g,
225-
DYN_MODEL_WRIST, // Not supported in protocol versions less than 18
354+
DYN_MODEL_STATIONARY = 2, //Used in timing applications (antenna must be stationary) or other stationary applications. Velocity restricted to 0 m/s. Zero dynamics assumed.
355+
DYN_MODEL_PEDESTRIAN, //Applications with low acceleration and speed, e.g. how a pedestrian would move. Low acceleration assumed.
356+
DYN_MODEL_AUTOMOTIVE, //Used for applications with equivalent dynamics to those of a passenger car. Low vertical acceleration assumed
357+
DYN_MODEL_SEA, //Recommended for applications at sea, with zero vertical velocity. Zero vertical velocity assumed. Sea level assumed.
358+
DYN_MODEL_AIRBORNE1g, //Airborne <1g acceleration. Used for applications with a higher dynamic range and greater vertical acceleration than a passenger car. No 2D position fixes supported.
359+
DYN_MODEL_AIRBORNE2g, //Airborne <2g acceleration. Recommended for typical airborne environments. No 2D position fixes supported.
360+
DYN_MODEL_AIRBORNE4g, //Airborne <4g acceleration. Only recommended for extremely dynamic environments. No 2D position fixes supported.
361+
DYN_MODEL_WRIST, // Not supported in protocol versions less than 18. Only recommended for wrist worn applications. Receiver will filter out arm motion.
226362
DYN_MODEL_BIKE, // Supported in protocol versions 19.2
227363
};
228364

0 commit comments

Comments
 (0)