source: pacpusframework/branches/0.2.x/include/Pacpus/structures/structure_gps.h@ 367

Last change on this file since 367 was 362, checked in by DHERBOMEZ Gérald, 9 years ago

add data structures

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