source: pacpusframework/tags/0.2.3/include/Pacpus/structures/structure_gps.h@ 374

Last change on this file since 374 was 374, checked in by xuphilip, 8 years ago

Structure GPS

File size: 11.9 KB
Line 
1
2
3// donnees NMEA emises par l'ag132 sur la liaison serie
4// revision le 23/08/2004 PhB et GD : trame_gga_dbl
5// revision le 20/05/2005 Maria Alwan et Gerald Dherbomez : 5700
6
7#ifndef STRUCTURE_GPS_H
8#define STRUCTURE_GPS_H
9
10#include "Pacpus/kernel/road_time.h"
11
12//#define TRAME_CORRIMUDATAA 625 // TODO : Add in kernel enum SpanCptType
13//#define TRAME_INSPVAXA 626 // TODO : Add in kernel enum SpanCptType
14
15/// POSITION WGS84
16typedef struct
17{
18 double lat; // radians
19 double lon; // radians
20 double altitude; // meters
21 float sigma_lat; // meters
22 float sigma_lon; // meters
23 float sigma_alt; // meters
24 int32_t gps_week; // GPS week number
25 double gps_time; // seconds
26 int32_t quality; // quality indicator of the position, referred to NMEA standard
27 int32_t nb_sats; // number of satellites used to compute the solution
28} wgs84_position;
29
30typedef struct
31{
32 wgs84_position position;
33 road_time_t time;
34 road_timerange_t timerange;
35} TimestampedWgs84Position;
36
37/// TRAME AVR
38typedef struct
39{
40 int32_t H,Mi,S,Ms;
41 float Yaw,Tilt,Range;
42 int32_t ind_qualite;
43 float pdop;
44 int32_t nb_sat;
45} trame_avr;
46
47/// TRAME GGA, PRECISION FLOAT (30 cm en Lambert93)
48typedef struct{
49 int32_t H ,Mi,S;
50 int32_t nb_sat,ind_qualite;
51 float lon,age,lat,alt_msl,hdop,d_geoidal;
52 int32_t Ms;//modif du 20040121 pour recupere les millisecondes
53} trame_gga;
54
55/// TRAME GGA, A UTILISER
56typedef struct
57{
58 int32_t H,Mi,S,Ms;
59 int32_t nb_sat,ind_qualite;
60 float age,hdop;
61 double lon,lat,alt_msl,d_geoidal;
62 int8_t dir_lat,dir_lon;
63 int32_t ref_station_ID;
64} trame_gga_dbl;
65
66typedef struct DONNEES_GGA_
67{
68 trame_gga_dbl tramegga;
69 road_time_t t;
70 DONNEES_GGA_()
71 {
72 t = 0;
73 tramegga.alt_msl = 0;
74 tramegga.d_geoidal = 0;
75 tramegga.H = 0;
76 tramegga.Mi = 0;
77 tramegga.S = 0;
78 tramegga.Ms = 0;
79 tramegga.lat = 0;
80 tramegga.lon = 0;
81 }
82} DONNEES_GGA;
83
84/// TRAME GLL
85typedef struct
86{
87 int32_t H,Mi,S,Ms;
88 double lat,lon;
89 int8_t dir_lat,dir_lon;
90 int32_t valid_data;
91} trame_gll;
92
93/// TRAME GRS
94typedef struct
95{
96 int32_t H,Mi,S,Ms;
97 int32_t residus_status;
98 float residus[12];
99} trame_grs;
100
101/// TRAME GSA
102typedef struct
103{
104 int32_t mode_select, mode_result;
105 int32_t SV_PRN[12];
106 float pdop,hdop,vdop;
107} trame_gsa;
108
109/// TRAME GST
110typedef struct
111{
112 float a,b,rms,phi,sigma_lat,sigma_lon,sigma_alt;
113 int32_t H,Mi,S,Ms;
114} trame_gst;
115
116/// TRAME GSV
117// Matrice SatellitesInView (36 satellites max) contient :
118// en ligne : les 4 caracteristiques d'un satellite
119// en colonne : SatelliteNumber, ElevationDegrees, AzimuthDegreesTrue, SignalToNoiseRatio
120typedef struct{
121 int32_t NumberOfSatellites;
122 int32_t Totalmessages;
123 int32_t SatellitesInView[36][4];
124} trame_gsv;
125
126/// TRAME HDT
127typedef struct
128{
129 /// in degrees
130 double DegreesTrue;
131} trame_hdt;
132
133/// TRAME MSS
134typedef struct
135{
136 float SS,SNR;
137 float beacon_freq;
138 int32_t beacon_bitrate;
139 int32_t channel;
140} trame_mss;
141
142/// TRAME RMC
143typedef struct
144{
145 int32_t H,Mi,S,Ms,JJ,MM,AA;
146 int32_t valid_data;
147 double lat,lon;
148 int8_t dir_lat, dir_lon;
149 float vitesse;
150 float track_true_north;
151 float magnet_var;
152 int8_t dir_magnet_var;
153 int32_t mode;
154} trame_rmc;
155
156/// TRAME ROT
157typedef struct
158{
159 double RateOfTurn;
160 int32_t valid_data;
161} trame_rot;
162
163/// TRAME VTG
164typedef struct
165{
166 /// meters per second [km/h]
167 float v;
168 float track_true_north, track_magnet_north;
169} trame_vtg;
170
171/// TRAME XTE
172typedef struct
173{
174 int32_t valid_LCBlink;
175 int32_t valid_LCCycleLock;
176 float error;
177 int32_t dir_to_steer;
178} trame_xte;
179
180/// TRAME_ZDA
181typedef struct
182{
183 int32_t H,Mi,S,Ms,JJ,MM,AA;
184 int32_t H_offset,Mi_offset;
185} trame_zda;
186
187/// GPS SYNCHRO FRAME
188typedef struct
189{
190 trame_zda zda; // Data containing GPS time
191 road_timerange_t timeOffset; // Time elapsed between PPS and ZDA
192 road_time_t ppsTime; // timestamp of the last PPS received on the computer
193 road_time_t zdaTime; // timestamp of the ZDA frame
194} GpsSynchroFrame;
195
196
197/// TRAME PTNLEV
198typedef struct
199{
200 int32_t H,Mi,S,Ms;
201 int32_t evt_nb;
202} trame_ptnlev;
203
204/// TRAME PTNLID
205typedef struct
206{
207 int32_t machineID,productID;
208 int32_t maj_FW_nb,min_FW_nb;
209 int32_t JJ_FW,MM_FW,AA_FW;
210} trame_ptnlid;
211
212/// TRAME PTNLDG
213typedef struct
214{
215 float SS,SNR,freq;
216 int32_t bitrate,number,tracking;
217 int32_t rtcm,ind_perf;
218} trame_ptnldg;
219
220/// TRAME PTNLSM
221typedef struct
222{
223 int32_t ref_station_ID;
224 int8_t message[30];
225} trame_ptnlsm;
226
227/// TRAME PTNL,GGK
228typedef struct
229{
230 int32_t H,Mi,S,Ms,JJ,MM,AA;
231 double lat,lon;
232 int8_t dir_lat, dir_lon;
233 int32_t ind_qualite,nb_sat;
234 float dop;
235 /// ellipsoidal height
236 float eht;
237} trame_ptnl_ggk;
238
239/// TRAME PTNL,GGK_SYNC
240typedef struct
241{
242 int32_t H,Mi,S,Ms,JJ,MM,AA;
243 double lat,lon;
244 int8_t dir_lat, dir_lon;
245 int32_t ind_qualite,nb_sat;
246 float dop;
247 /// ellipsoidal height
248 float eht;
249} trame_ptnl_ggk_sync;
250
251/// TRAME PTNL,PJK
252typedef struct
253{
254 int32_t H,Mi,S,Ms,JJ,MM,AA;
255 double northing,easting;
256 int32_t ind_qualite,nb_sat;
257 float dop;
258 /// ellipsoidal height
259 float eht;
260} trame_ptnl_pjk;
261
262/// TRAME PTNL,PJT
263typedef struct
264{
265 int8_t coord_syst_name[30];
266 int8_t projection_name[30];
267} trame_ptnl_pjt;
268
269/// TRAME PTNL,VGK
270typedef struct
271{
272 int32_t H,Mi,S,Ms,JJ,MM,AA;
273 double east_vect,north_vect,up_vect;
274 int32_t ind_qualite,nb_sat;
275 float dop;
276} trame_ptnl_vgk;
277
278/// TRAME PTNL,VHD
279typedef struct
280{
281 int32_t H,Mi,S,Ms,JJ,MM,AA;
282 float azimuth,delta_azimuth;
283 float vert_angle,delta_vert_angle;
284 float range,delta_range;
285 int32_t ind_qualite,nb_sat;
286 float pdop;
287} trame_ptnl_vhd;
288
289/// SPAN CPT SOLUTION STATUS
290enum SolStatus
291{
292 SOL_COMPUTED = 0,
293 INSUFFICIENT_OBS = 1,
294 NO_CONVERGENCE = 2,
295 SINGULARITY = 3,
296 COV_TRACE = 4,
297 TEST_DIST = 5,
298 COLD_START = 6,
299 V_H_LIMIT = 7,
300 VARIANCE = 8,
301 RESIDUALS = 9,
302 DELTA_POS = 10,
303 NEGATIVE_VAR = 11,
304 INTEGRITY_WARNING = 13,
305 IMU_UNPLUGGED = 17,
306 PENDING = 18
307};
308
309/// SPAN CPT POSITION TYPE
310enum PosType
311{
312 NONE = 0,
313 FIXEDPOS = 1,
314 FIXEDHEIGHT = 2,
315 FLOATCONV = 4,
316 WIDELANE = 5,
317 NARROWLANE = 6,
318 DOPPLER_VELOCITY = 8,
319 SINGLE = 16,
320 PSRDIFF = 17,
321 WAAS = 18,
322 PROPAGATED = 19,
323 OMNISTAR = 20,
324 L1_FLOAT = 32,
325 IONOFREE_FLOAT = 33,
326 NARROW_FLOAT = 34,
327 L1_INT = 48,
328 WIDE_INT = 49,
329 NARROW_INT = 50,
330 RTK_DIRECT_INS = 51,
331 INS_SBAS = 52,
332 INS_PSRSP = 53,
333 INS_PSRDIFF = 54,
334 INS_RTKFLOAT = 55,
335 INS_RTKFIXED = 56,
336 INS_OMNISTAR = 57,
337 INS_OMNISTAR_HP = 58,
338 INS_OMNISTAR_XP = 59,
339 OMNISTAR_HP = 64,
340 OMNISTAR_XP = 65,
341 PPP_CONVERGING = 68,
342 PPP = 69,
343 INS_PPP_Converging = 73,
344 INS_PPP = 74
345};
346
347/// SPAN CPT Inertial Solution Status
348enum INSStatus
349{
350 INS_INACTIVE = 0,
351 INS_ALIGNING =1,
352 INS_SOLUTION_NOT_GOOD = 2,
353 INS_SOLUTION_GOOD = 3,
354 INS_BAD_GPS_AGREEMENT = 4,
355 INS_ALIGNMENT_COMPLETE = 5
356};
357
358/// TRAME BESTGPSPOSA
359typedef struct
360{
361 SolStatus Status;
362 PosType posType;
363 double Lat;
364 double Lon;
365 double Hgt;
366 float Undulation;
367 float LatStd;
368 float LonStd;
369 float HgtStd;
370 double e;
371 double n;
372 double u;
373} trame_bestgpsposa;
374
375/// TRAME RAWIMUSA
376typedef struct
377{
378 uint32_t Week;
379 int32_t reserved;
380 double Seconds;
381 // FIXME: use a portable type instead of long double (which is 128-bit on Linux and 64-bit on Windows)
382 /*long */double ZAccel;
383 /*long */double YAccel;
384 /*long */double XAccel;
385 /*long */double ZGyro;
386 /*long */double YGyro;
387 /*long */double XGyro;
388} trame_rawimusa;
389
390/// TRAME INSPVAA
391typedef struct
392{
393 uint32_t Week;
394 int32_t reserved;
395 double Seconds;
396 double Lat;
397 double Lon;
398 double Hgt;
399 double NorthVel;
400 double EastVel;
401 double UpVel;
402 double Roll;
403 double Pitch;
404 double Azimuth;
405 INSStatus Status;
406 int32_t reserved1;
407 double e;
408 double n;
409 double u;
410} trame_inspvaa;
411
412/// TRAME INSCOV
413typedef struct
414{
415 uint32_t Week;
416 int32_t reserved;
417 double Seconds;
418 double PosCov[3][3];
419 double AttCov[3][3];
420 double VelCov[3][3];
421} trame_inscov;
422
423/// TRAME CORRIMUDATAA
424typedef struct
425{
426 uint32_t Week;
427 double Seconds;
428 double PitchRate;
429 double RollRate;
430 double YawRate;
431 double LateralAcc;
432 double LongitudinalAcc;
433 double VerticalAcc;
434} trame_corrimudataa;
435
436/// TRAME INSPVAXA
437typedef struct
438{
439 INSStatus Status;
440 PosType posType;
441 double Lat;
442 double Lon;
443 double Hgt;
444 float Undulation;
445 double NorthVel;
446 double EastVel;
447 double UpVel;
448 double Roll;
449 double Pitch;
450 double Azimuth;
451 float LatSd;
452 float LonSd;
453 float HgtSd;
454 float NorthVelSd;
455 float EastVelSd;
456 float UpVelSd;
457 float RollSd;
458 float PitchSd;
459 float AzimuthSd;
460} trame_inspvaxa;
461
462/// GROUND TRUTH
463typedef struct
464{
465 double Lat;
466 double Lon;
467 double Hgt;
468 double EastVel;
469 double NorthVel;
470 double UpVel;
471 double EastAcc;
472 double NorthAcc;
473 double UpAcc;
474 double Roll;
475 double Pitch;
476 double Azimuth;
477 float GPSCOG;
478 double AccBiasX;
479 double AccBiasY;
480 double AccBiasZ;
481 double GyroDriftX;
482 double GyroDriftY;
483 double GyroDriftZ;
484} ground_truth;
485
486/// trame_bestgpsposa structure with timestamping
487struct TimestampedBestgpsposaFrame
488{
489 trame_bestgpsposa frame;
490 road_time_t time;
491 road_timerange_t timerange;
492};
493
494/// trame_rawimusa structure with timestamping
495struct TimestampedRawimusaFrame
496{
497 trame_rawimusa frame;
498 road_time_t time;
499 road_timerange_t timerange;
500};
501
502/// trame_inspvaa structure with timestamping
503struct TimestampedInspvaaFrame
504{
505 trame_inspvaa frame;
506 road_time_t time;
507 road_timerange_t timerange;
508};
509
510/// trame_inscov structure with timestamping
511struct TimestampedInscovFrame
512{
513 trame_inscov frame;
514 road_time_t time;
515 road_timerange_t timerange;
516};
517
518/// trame_corrimudataa structure with timestamping
519struct TimestampedCorrimudataaFrame
520{
521 trame_corrimudataa frame;
522 road_time_t time;
523 road_timerange_t timerange;
524};
525
526/// trame_inspvaxa structure with timestamping
527struct TimestampedInspvaxaFrame
528{
529 trame_inspvaxa frame;
530 road_time_t time;
531 road_timerange_t timerange;
532};
533
534/// trame_gga structure with timestamping
535struct TimestampedGgaFrame
536{
537 trame_gga_dbl frame;
538 road_time_t time;
539 road_timerange_t timerange;
540};
541
542/// trame_gst structure with timestamping
543struct TimestampedGstFrame
544{
545 trame_gst frame;
546 road_time_t time;
547 road_timerange_t timerange;
548};
549
550/// trame_vtg structure with timestamping
551struct TimestampedVtgFrame
552{
553 trame_vtg frame;
554 road_time_t time;
555 road_timerange_t timerange;
556};
557
558/// ground_truth structure with timestamping
559struct TimestampedGroundTruth
560{
561 ground_truth frame;
562 road_time_t time;
563 road_timerange_t timerange;
564};
565
566
567#endif // STRUCTURE_GPS_H
Note: See TracBrowser for help on using the repository browser.