source: pacpusframework/branches/2.0-beta1/include/Pacpus/structure/structureUBX.h@ 89

Last change on this file since 89 was 89, checked in by morasjul, 11 years ago

PACPUS 2.0 Beta deployed in new branch

Major changes:
-Add communication interface between components
-Add examples for communications interface (TestComponents)
-Move to Qt5 support

  • Property svn:executable set to *
File size: 12.9 KB
Line 
1#ifndef _UBX_structures_Ublox_H
2#define _UBX_structures_Ublox_H
3
4#define MAX_SBAS_SV 24
5#define NB_CHANNEL 16
6
7#include "kernel/road_time.h"
8
9namespace Ublox {
10
11/*! \struct structRAW_SV
12 * \brief Structure containing measurement from the GPS receiver for each satellite
13 * \author "Olivier Le Marchand"
14 * \version 0.1
15 * \date February 2008
16 *
17 * Ublox receiver realize several measures for each satellite, and provide it
18 * through the RXM-RAW message. All the measures for one satellite are grouped
19 * in this structure\n
20 * Protocols definitions are available in the following document : \n
21 * Title: ANTARIS Positioning Engine \n
22 * Subtitle: NMEA and UBX Protocol Specification \n
23 * Doc Type: Specification \n
24 * Doc ID: GPS.G3-X-03002-D \n
25 * Firmware: Version 5.00
26 */
27struct structRAW_SV
28{
29 /// Carrier Phase measurement (L1 Cycles)
30 double CPMes;
31
32 /// Pseudorange measurement (m)
33 double PRMes;
34
35 /// Doppler Measurement (Hz)
36 float DOMes;
37
38 /// Satellite number
39 uint8_t SV;
40
41 /// Nav measurement Quality indicator
42 int8_t MesQI;
43
44 /// Signal Strength (dBHz)
45 int8_t CNO;
46
47 /// Loss of Lock indicator
48 uint8_t LLI;
49};
50
51/*! \struct structSBAS_SV
52 * \brief Structure containing the SBAS correction data for one satellite
53 * \author "Olivier Le Marchand"
54 * \version 0.1
55 * \date February 2008
56 *
57 * Protocols definitions are available in the following document : \n
58 * Title: ANTARIS Positioning Engine \n
59 * Subtitle: NMEA and UBX Protocol Specification \n
60 * Doc Type: Specification \n
61 * Doc ID: GPS.G3-X-03002-D \n
62 * Firmware: Version 5.00
63 */
64struct structSBAS_SV
65{
66 /// SV Id
67 uint8_t SVID;
68
69 /// Flags for this SV
70 uint8_t flags;
71
72 /// Monitoring status
73 uint8_t UDRE;
74
75 /// System (WAAS/EGNOS/...) same as sys
76 uint8_t SYSn;
77
78 /// Services available sames sevices
79 uint8_t serviceN;
80
81 /// reserved
82 uint8_t res0;
83
84 /// Pseudo Range correction in [cm]
85 int16_t PRC;
86
87 /// reserved
88 int16_t res1;
89
90 /// Ionosphere correction in [cm]
91 int16_t IC;
92};
93
94/*! \struct structRXM_RAW
95 * \brief Structure containing all the measurement from the GPS receiver at one epoch
96 * \author "Olivier Le Marchand"
97 * \version 0.1
98 * \date February 2008
99 *
100 * Ublox receiver realize several measures for each satellite, and provide it
101 * through the RXM-RAW message. All the measures for all satellites are grouped
102 * in this structure in order to pass all throw a RTMaps wire\n
103 * Protocols definitions are available in the following document : \n
104 * Title: ANTARIS Positioning Engine \n
105 * Subtitle: NMEA and UBX Protocol Specification \n
106 * Doc Type: Specification \n
107 * Doc ID: GPS.G3-X-03002-D
108 */
109struct structRXM_RAW
110{
111 /// Measurement in ms GPS time of Week
112 int32_t ITOW;
113
114 /// Measurement GPS Week numbers
115 int16_t Week;
116
117 /// number of Satellite in the frame
118 uint8_t NSV;
119
120 /*! \brief measurement for each satellite */
121 /*! the size of the array is 16, because hte ublox receiver we have can't track
122 more than 16 satellites*/
123 structRAW_SV tabRAW_SV[NB_CHANNEL];
124};
125
126/*! \struct Timestamped_RXM_RAW
127 * \brief Timestamped structure containing all the measurement at one epoch, for RT processing and fusion
128 * \author "Vincent Drevelle"
129 * \date June 2011
130 */
131struct Timestamped_RXM_RAW
132{
133 road_time_t time;
134 road_timerange_t timerange;
135 structRXM_RAW raw;
136};
137
138/*! \struct structRXM_SFRB
139 * \brief Structure containing of one single frame buffer
140 * \author "Olivier Le Marchand"
141 * \version 0.1
142 * \date February 2008
143 *
144 * \n
145 * Protocols definitions are available in the following document : \n
146 * Title: ANTARIS Positioning Engine \n
147 * Subtitle: NMEA and UBX Protocol Specification \n
148 * Doc Type: Specification \n
149 * Doc ID: GPS.G3-X-03002-D
150 */
151struct structRXM_SFRB
152{
153 /// Channel number
154 uint8_t CHN;
155
156 /// ID of the satellite transmitting the subframe
157 uint8_t SVID;
158
159 //array of ten words of data
160 uint32_t DWRD[10];
161};
162
163/*! \struct Timestamped_RXM_SFRB
164 * \brief Timestamped structure containing one single frame buffer, for RT processing and fusion
165 * \author "Vincent Drevelle"
166 * \date June 2011
167 */
168struct Timestamped_RXM_SFRB
169{
170 road_time_t time;
171 road_timerange_t timerange;
172 structRXM_SFRB sfrb;
173};
174
175/*! \struct structNAV_CLOCK
176 * \brief Structure containing the estimation of the clock bias and the clock drift
177 * \author "Olivier Le Marchand"
178 * \version 0.1
179 * \date February 2008
180 *
181 * \n
182 * Protocols definitions are available in the following document : \n
183 * Title: ANTARIS Positioning Engine \n
184 * Subtitle: NMEA and UBX Protocol Specification \n
185 * Doc Type: Specification \n
186 * Doc ID: GPS.G3-X-03002-D
187 */
188struct structNAV_CLOCK
189{
190 /// GPS Millisecond Time of week (ms)
191 uint32_t ITOW;
192
193 /// clock bias in nanoseconds
194 int32_t CLKB;
195
196 /// clock drift in nanoseconds per second
197 int32_t CLKD;
198
199 /// Time Accuracy Estimate
200 uint32_t TAcc;
201
202 /// Frequency Accuracy Estimate
203 uint32_t FAcc;
204
205};
206
207/*! \struct structNAV_SBAS
208 * \brief Structure containing the status of the SBAS system and corrections
209 * \author "Olivier Le Marchand"
210 * \version 0.1
211 * \date February 2008
212 *
213 * \n
214 * Protocols definitions are available in the following document : \n
215 * Title: ANTARIS Positioning Engine \n
216 * Subtitle: NMEA and UBX Protocol Specification \n
217 * Doc Type: Specification \n
218 * Doc ID: GPS.G3-X-03002-D
219 */
220struct structNAV_SBAS
221{
222 /// GPS Millisecond time of week
223 uint32_t ITOW;
224
225 /// PRN Number of the GEO where correction and integrity data is used from
226 uint8_t GEO;
227
228 /// SBAS Mode | 0 Disabled | 1 Enabled Integrity | 3 Enabled Testmode
229 uint8_t mode;
230
231 /// SBAS System (WAAS/EGNOS/...) | -1 Unknown | 0 WAAS | 1 EGNOS | 2 MSAS | 16 GPS
232 int8_t sys;
233
234 /// SBAS Services available | bit0 Ranging | bit1 Corrections | bit2 Integrity | bit3 Testmode |
235 uint8_t service;
236
237 /// Number of SV data following
238 uint8_t CNT;
239
240 /// Reserved
241 uint8_t res[3];
242
243 structSBAS_SV tabSBAS_SV[MAX_SBAS_SV];
244
245};
246
247/*! \struct structNAV_SOL
248 * \brief Structure containing the position and velocity estimation in the ECEF reference frame
249 * \author "Olivier Le Marchand"
250 * \version 0.1
251 * \date February 2008
252 *
253 * \n
254 * Protocols definitions are available in the following document : \n
255 * Title: ANTARIS Positioning Engine \n
256 * Subtitle: NMEA and UBX Protocol Specification \n
257 * Doc Type: Specification \n
258 * Doc ID: GPS.G3-X-03002-D
259 */
260struct structNAV_SOL
261{
262 /// GPS Millisecond Time of Week
263 uint32_t ITOW;
264
265 /// Nanoseconds remainder of rounded ms above, range -500000 .. 500000
266 int32_t Frac;
267
268 /// GPS week (GPS time)
269 int16_t week;
270
271 /// GPSfix Type, range 0..4 | 0x00 = No Fix | 0x01 = Dead Reckoning only | 0x02 = 2D-Fix | 0x03 = 3D-Fix | 0x04 = GPS + dead reckoning combined | 0x05 = Time only fix | 0x06..0xff: reserved |
272 uint8_t GPSfi;
273
274 /// 0x01=GPSfixOK (i.e. within DOP & ACC Masks) | 0x02=DiffSoln (is DGPS used) | 0x04=WKNSET (is Week Number valid) | 0x08=TOWSET (is Time of Week valid) | 0x?0=reserved
275 uint8_t Flags;
276
277 /// ECEF X coordinate (cm)
278 int32_t ECEF_X;
279
280 /// ECEF Y coordinate (cm)
281 int32_t ECEF_Y;
282
283 /// ECEF Z coordinate (cm)
284 int32_t ECEF_Z;
285
286 /// 3D Position Accuracy Estimate (cm)
287 uint32_t Pacc;
288
289 /// ECEF X velocity (cm/s)
290 int32_t ECEFVX;
291
292 /// ECEF Y velocity (cm/s)
293 int32_t ECEFVY;
294
295 /// ECEF Z velocity (cm/s)
296 int32_t ECEFVZ;
297
298 /// Speed Accuracy Estimate (cm/s)
299 uint32_t SAcc;
300
301 /// Position DOP
302 uint8_t PDOP;
303
304 /// reserved
305 uint8_t res1;
306
307 /// Number of SVs used in Nav Solution
308 uint8_t numSV;
309
310 /// reserved
311 uint32_t res2;
312};
313
314/*! \struct structSVINFO_SV
315 * \brief Structure containing the main information on one satellite
316 * \author "Olivier Le Marchand"
317 * \version 0.1
318 * \date February 2008
319 *
320 * \n
321 * Protocols definitions are available in the following document : \n
322 * Title: ANTARIS Positioning Engine \n
323 * Subtitle: NMEA and UBX Protocol Specification \n
324 * Doc Type: Specification \n
325 * Doc ID: GPS.G3-X-03002-D
326 */
327struct structSVINFO_SV
328{
329
330 /// channel number, range 0..NCH-1
331 uint8_t chn;
332
333 /// Satellite ID
334 uint8_t SVID;
335
336 /*! \brief Bitmask, made up of the following bit values
337 * 0x01 = SV is used for navigation
338 * 0x02 = Differential correction data is available for this SV
339 * 0x04 = Orbit information is available for this SV (Ephemeris or Almanach)
340 * 0x08 = Orbit information is Ephemeris
341 * 0x10 = SV is unhealthy / shall not be used*/
342 uint8_t Flags;
343
344 /*! \brief Signal Quality indicator (range 0..7). The following list shows the meaning of the different QI values:
345 * 0: This channel is idle
346 * 1, 2: Channel is searching
347 * 3: Signal detected but unusable
348 * 4: Code Lock on Signal
349 * 5, 6: Code and Carrier locked
350 * 7: Code and Carrier locked, receiving 50bps data */
351 int8_t QI;
352
353
354 /// Carrier to Noise Ratio (Signal Strength) (dbHz)
355 uint8_t CNO;
356
357 /// Elevation in integer degrees
358 int8_t Elev;
359
360 /// Azimuth in integer degrees
361 int16_t Azim;
362
363 /// Pseudo range residual in centimetres
364 int32_t PRRes;
365
366};
367
368/*! \struct structNAV_SVINFO
369 * \brief Structure containing the main information on all the visible satellites
370 * \author "Olivier Le Marchand"
371 * \version 0.1
372 * \date February 2008
373 *
374 * \n
375 * Protocols definitions are available in the following document : \n
376 * Title: ANTARIS Positioning Engine \n
377 * Subtitle: NMEA and UBX Protocol Specification \n
378 * Doc Type: Specification \n
379 * Doc ID: GPS.G3-X-03002-D
380 */
381struct structNAV_SVINFO
382{
383 /// GPS Millisecond time of week
384 uint32_t ITOW;
385
386 /// Number of channels range 0..16
387 uint8_t NCH;
388
389 /// Reserved
390 uint8_t RES1;
391
392 /// Reserved
393 uint16_t RES2;
394
395 /// information for each Satellite
396 structSVINFO_SV infoSV[NB_CHANNEL];
397
398};
399
400/*! \struct structNAV_VELNED
401 * \brief Structure containing the velocity and heading estimations in a local tangent reference frame
402 * \author "Olivier Le Marchand"
403 * \version 0.1
404 * \date February 2008
405 *
406 * \n
407 * Protocols definitions are available in the following document : \n
408 * Title: ANTARIS Positioning Engine \n
409 * Subtitle: NMEA and UBX Protocol Specification \n
410 * Doc Type: Specification \n
411 * Doc ID: GPS.G3-X-03002-D
412 */
413struct structNAV_VELNED
414{
415 /// GPS Millisecond Time of Week
416 uint32_t ITOW;
417
418 /// NED north velocity (cm/s)
419 int32_t VEL_N;
420
421 /// NED east velocity (cm/s)
422 int32_t VEL_E;
423
424 /// NED down velocity (cm/s)
425 int32_t VEL_D;
426
427 /// Speed (3-D) (cm/s)
428 uint32_t Speed;
429
430 /// Ground Speed (2-D)(cm/s)
431 uint32_t GSpeed;
432
433 /// Heading 2-D (deg)
434 int32_t Heading;
435
436 /// Speed Accuracy Estimate (cm/s)
437 uint32_t SAcc;
438
439 /// Course / Heading Accuracy Estimate (deg)
440 uint32_t CAcc;
441};
442
443/*! \struct structNAV_POSLLH
444 * \brief Structure containing the position estimation in the WGS84 coordinate system
445 * \author "Olivier Le Marchand"
446 * \version 0.1
447 * \date February 2008
448 *
449 * \n
450 * Protocols definitions are available in the following document : \n
451 * Title: ANTARIS Positioning Engine \n
452 * Subtitle: NMEA and UBX Protocol Specification \n
453 * Doc Type: Specification \n
454 * Doc ID: GPS.G3-X-03002-D
455 */
456struct structNAV_POSLLH
457{
458 /// GPS Millisecond Time of Week
459 uint32_t ITOW;
460
461 /// Longitude (deg)
462 int32_t LON;
463
464 /// Latitude (deg)
465 int32_t LAT;
466
467 /// Height above Ellipsoid (mm)
468 int32_t HEIGHT;
469
470 /// Height above mean sea level (mm)
471 int32_t HMSL;
472
473 /// Horizontal Accuracy Estimate (mm)
474 uint32_t Hacc;
475
476 /// Vertical Accuracy Estimate (mm)
477 uint32_t Vacc;
478};
479
480/*! \struct structNAV_POSUTM
481 * \brief Structure containing the position estimation in the UTM coordinate system
482 * \author "Olivier Le Marchand"
483 * \version 0.1
484 * \date February 2008
485 *
486 * \n
487 * Protocols definitions are available in the following document : \n
488 * Title: ANTARIS Positioning Engine \n
489 * Subtitle: NMEA and UBX Protocol Specification \n
490 * Doc Type: Specification \n
491 * Doc ID: GPS.G3-X-03002-D
492 */
493struct structNAV_POSUTM
494{
495 /// GPS Millisecond Time of Week
496 uint32_t ITOW;
497
498 /// UTM Easting (cm)
499 int32_t EAST;
500
501 /// UTM Northing (cm)
502 int32_t NORTH;
503
504 /// Altitude (cm)
505 int32_t ALT;
506
507 /// UTM Zone Number
508 int8_t ZONE;
509
510 /// Hemisphere Indicator (0=North, 1=South)
511 int8_t HEM;
512};
513
514} // namespace Ublox
515
516#endif // _UBX_structures_Ublox_H
Note: See TracBrowser for help on using the repository browser.