oem7_messages.h
Go to the documentation of this file.
1 //
3 // Copyright (c) 2020 NovAtel Inc.
4 //
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
6 // of this software and associated documentation files (the "Software"), to deal
7 // in the Software without restriction, including without limitation the rights
8 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 // copies of the Software, and to permit persons to whom the Software is
10 // furnished to do so, subject to the following conditions:
11 //
12 // The above copyright notice and this permission notice shall be included in all
13 // copies or substantial portions of the Software.
14 //
15 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 // SOFTWARE.
22 //
24 
32 #ifndef __OEM7_MESSAGES_H_
33 #define __OEM7_MESSAGES_H_
34 
35 #include <stdint.h>
36 
37 
38 #define ASSERT_MSG "Consult Oem7 manual"
39 
40 namespace novatel_oem7_driver
41 {
42  typedef uint32_t oem7_enum_t;
43  typedef uint32_t oem7_bool_t;
44  typedef uint8_t oem7_hex_t;
45  typedef char oem7_char_t;
46 
47  static_assert(sizeof(oem7_char_t) == 1, ASSERT_MSG);
48  static_assert(sizeof(double) == 8, ASSERT_MSG);
49  static_assert(sizeof(float) == 4, ASSERT_MSG);
50 
51  struct __attribute__((packed))
52  Oem7MessageCommonHeaderMem
53  {
54  char sync1;
55  char sync2;
56  char sync3;
57 
58  uint8_t message_length;
59  uint16_t message_id;
60  };
61 
62  struct __attribute__((packed))
63  Oem7MessageHeaderMem
64  {
65  char sync1;
66  char sync2;
67  char sync3;
68 
69  uint8_t header_length;
70  uint16_t message_id;
71  char message_type;
72  uint8_t port_address;
73  uint16_t message_length;
74  uint16_t sequence;
75  uint8_t idle_time;
76  uint8_t time_status;
77  uint16_t gps_week;
78  int32_t gps_milliseconds;
79  uint32_t recevier_status;
80  uint16_t reserved;
81  uint16_t recevier_version;
82  };
83 
84  struct __attribute__((packed))
85  Oem7MessgeShortHeaderMem
86  {
87  char sync1;
88  char sync2;
89  char sync3;
90 
91  uint8_t message_length;
92  uint16_t message_id;
93  uint16_t gps_week;
94  int32_t gps_milliseconds;
95  };
96 
97 
98  struct __attribute__((packed))
99  BESTGNSSPOSMem
100  {
101  oem7_enum_t sol_stat;
102  oem7_enum_t pos_type;
103  double lat;
104  double lon;
105  double hgt;
106  float undulation;
107  oem7_enum_t datum_id;
108  float lat_stdev;
109  float lon_stdev;
110  float hgt_stdev;
111  oem7_char_t stn_id[4];
112  float diff_age;
113  float sol_age;
114  uint8_t num_svs;
115  uint8_t num_sol_svs;
116  uint8_t num_sol_l1_svs;
117  uint8_t num_sol_multi_svs;
118  oem7_hex_t reserved;
119  oem7_hex_t ext_sol_stat;
120  uint8_t galileo_beidou_sig_mask;
121  uint8_t gps_glonass_sig_mask;
122  };
123  static_assert(sizeof(BESTGNSSPOSMem) == 72, ASSERT_MSG);
124 
125 
126  struct __attribute__((packed))
127  BESTPOSMem
128  {
129  oem7_enum_t sol_stat;
130  oem7_enum_t pos_type;
131  double lat;
132  double lon;
133  double hgt;
134  float undulation;
135  oem7_enum_t datum_id;
136  float lat_stdev;
137  float lon_stdev;
138  float hgt_stdev;
139  oem7_char_t stn_id[4];
140  float diff_age;
141  float sol_age;
142  uint8_t num_svs;
143  uint8_t num_sol_svs;
144  uint8_t num_sol_l1_svs;
145  uint8_t num_sol_multi_svs;
146  oem7_hex_t reserved;
147  oem7_hex_t ext_sol_stat;
148  uint8_t galileo_beidou_sig_mask;
149  uint8_t gps_glonass_sig_mask;
150  };
151  static_assert(sizeof(BESTPOSMem) == 72, ASSERT_MSG);
152 
153 
154  struct __attribute__((packed))
155  BESTVELMem
156  {
157  uint32_t sol_stat;
158  uint32_t vel_type;
159  float latency;
160  float diff_age;
161  double hor_speed;
162  double track_gnd;
163  double ver_speed;
164  float reserved;
165  };
166  static_assert(sizeof(BESTVELMem) == 44, ASSERT_MSG);
167 
168 
169  struct __attribute__((packed))
170  PPPPOSMem
171  {
172  oem7_enum_t sol_stat;
173  oem7_enum_t pos_type;
174  double lat;
175  double lon;
176  double hgt;
177  float undulation;
178  oem7_enum_t datum_id;
179  float lat_stdev;
180  float lon_stdev;
181  float hgt_stdev;
182  oem7_char_t stn_id[4];
183  float diff_age;
184  float sol_age;
185  uint8_t num_svs;
186  uint8_t num_sol_svs;
187  uint8_t num_sol_l1_svs;
188  uint8_t num_sol_multi_svs;
189  oem7_hex_t reserved;
190  oem7_hex_t ext_sol_stat;
191  uint8_t reserved2;
192  uint8_t gps_glonass_sig_mask;
193  };
194  static_assert(sizeof(PPPPOSMem) == 72, ASSERT_MSG);
195 
196 
197  struct __attribute__((packed))
198  TERRASTARINFOMem
199  {
200  oem7_char_t product_activation_code[16];
201  oem7_enum_t sub_type;
202  uint32_t sub_permission;
203  uint32_t service_end_day_of_year;
204  uint32_t service_end_year;
205  uint32_t reserved;
206  oem7_enum_t region_restriction;
207  float center_point_latitude;
208  float center_point_longitude;
209  uint32_t radius;
210  };
211  static_assert(sizeof(TERRASTARINFOMem) == 52, ASSERT_MSG);
212 
213 
214  struct __attribute__((packed))
215  TERRASTARSTATUSMem
216  {
217  oem7_enum_t access_status;
218  oem7_enum_t sync_state;
219  uint32_t reserved;
220  oem7_enum_t local_area_status;
221  oem7_enum_t geo_status;
222  };
223  static_assert(sizeof(TERRASTARSTATUSMem) == 20, ASSERT_MSG);
224 
225 
226  struct __attribute__((packed))
227  INSPVASmem
228  {
229  uint32_t gnss_week;
230  double seconds;
231  double latitude;
232  double longitude;
233  double height;
234  double north_velocity;
235  double east_velocity;
236  double up_velocity;
237  double roll;
238  double pitch;
239  double azimuth;
240  oem7_enum_t status;
241  };
242  static_assert(sizeof(INSPVASmem) == 88, ASSERT_MSG);
243 
244  struct __attribute__((packed))
245  CORRIMUSMem
246  {
247  uint32_t imu_data_count;
248  double pitch_rate;
249  double roll_rate;
250  double yaw_rate;
251  double lateral_acc;
252  double longitudinal_acc;
253  double vertical_acc;
254  uint32_t reserved1;
255  uint32_t reserved2;
256  };
257  static_assert(sizeof(CORRIMUSMem) == 60, ASSERT_MSG);
258 
259  struct __attribute__((packed))
260  IMURATECORRIMUSMem
261  {
262  uint32_t week;
263  double seconds;
264  double pitch_rate;
265  double roll_rate;
266  double yaw_rate;
267  double lateral_acc;
268  double longitudinal_acc;
269  double vertical_acc;
270  };
271  static_assert(sizeof(IMURATECORRIMUSMem) == 60, ASSERT_MSG);
272 
273  struct __attribute__((packed))
274  INSSTDEVMem
275  {
276  float latitude_stdev;
277  float longitude_stdev;
278  float height_stdev;
279  float north_velocity_stdev;
280  float east_velocity_stdev;
281  float up_velocity_stdev;
282  float roll_stdev;
283  float pitch_stdev;
284  float azimuth_stdev;
285  uint32_t ext_sol_status;
286  uint16_t time_since_last_update;
287  uint16_t reserved1;
288  uint32_t reserved2;
289  uint32_t reserved3;
290  };
291  static_assert(sizeof(INSSTDEVMem) == 52, ASSERT_MSG);
292 
293 
294  struct __attribute__((packed))
295  INSCONFIG_FixedMem
296  {
297  oem7_enum_t imu_type;
298  uint8_t mapping;
299  uint8_t initial_alignment_velocity;
300  uint16_t heave_window;
301  oem7_enum_t profile;
302  oem7_hex_t enabled_updates[4];
303  oem7_enum_t alignment_mode;
304  oem7_enum_t relative_ins_output_frame;
305  oem7_bool_t relative_ins_output_direction;
306  oem7_hex_t ins_receiver_status[4];
307  uint8_t ins_seed_enabled;
308  uint8_t ins_seed_validation;
309  uint16_t reserved_1;
310  uint32_t reserved_2;
311  uint32_t reserved_3;
312  uint32_t reserved_4;
313  uint32_t reserved_5;
314  uint32_t reserved_6;
315  uint32_t reserved_7;
316  };
317  static_assert(sizeof(INSCONFIG_FixedMem) == 60, ASSERT_MSG);
318 
319  struct __attribute__((packed))
320  INSCONFIG_TranslationMem
321  {
322  uint32_t translation;
323  uint32_t frame;
324  float x_offset;
325  float y_offset;
326  float z_offset;
327  float x_uncertainty;
328  float y_uncertainty;
329  float z_uncertainty;
330  uint32_t translation_source;
331  };
332 
333 
334  struct __attribute__((packed))
335  INSCONFIG_RotationMem
336  {
337  uint32_t rotation;
338  uint32_t frame;
339  float x_rotation;
340  float y_rotation;
341  float z_rotation;
342  float x_rotation_stdev;
343  float y_rotation_stdev;
344  float z_rotation_stdev;
345  uint32_t rotation_source;
346  };
347 
348 
349  struct __attribute__((packed))
350  INSPVAXMem
351  {
352  oem7_enum_t ins_status;
353  oem7_enum_t pos_type;
354  double latitude;
355  double longitude;
356  double height;
357  float undulation;
358  double north_velocity;
359  double east_velocity;
360  double up_velocity;
361  double roll;
362  double pitch;
363  double azimuth;
364  float latitude_stdev;
365  float longitude_stdev;
366  float height_stdev;
367  float north_velocity_stdev;
368  float east_velocity_stdev;
369  float up_velocity_stdev;
370  float roll_stdev;
371  float pitch_stdev;
372  float azimuth_stdev;
373  uint32_t extended_status;
374  uint16_t time_since_update;
375  };
376  static_assert(sizeof(INSPVAXMem) == 126, ASSERT_MSG);
377 
378  struct __attribute__((packed))
379  HEADING2Mem
380  {
381  oem7_enum_t sol_status;
382  oem7_enum_t pos_type;
383  float length;
384  float heading;
385  float pitch;
386  float reserved;
387  float heading_stdev;
388  float pitch_stdev;
389  oem7_char_t rover_stn_id[4];
390  oem7_char_t master_stn_id[4];
391  uint8_t num_sv_tracked;
392  uint8_t num_sv_in_sol;
393  uint8_t num_sv_obs;
394  uint8_t num_sv_multi;
395  uint8_t sol_source;
396  uint8_t ext_sol_status;
397  uint8_t galileo_beidou_sig_mask;
398  uint8_t gps_glonass_sig_mask;
399  };
400  static_assert(sizeof(HEADING2Mem) == 48, ASSERT_MSG);
401 
402  struct __attribute__((packed))
403  BESTUTMMem
404  {
405  oem7_enum_t sol_stat;
406  oem7_enum_t pos_type;
407  uint32_t lon_zone_number;
408  uint32_t lat_zone_letter;
409  double northing;
410  double easting;
411  double height;
412  float undulation;
413  uint32_t datum_id;
414  float northing_stddev;
415  float easting_stddev;
416  float height_stddev;
417  char stn_id[4];
418  float diff_age;
419  float sol_age;
420  uint8_t num_svs;
421  uint8_t num_sol_svs;
422  uint8_t num_sol_ggl1_svs;
423  uint8_t num_sol_multi_svs;
424  uint8_t reserved;
425  uint8_t ext_sol_stat;
426  uint8_t galileo_beidou_sig_mask;
427  uint8_t gps_glonass_sig_mask;
428  };
429  static_assert(sizeof(BESTUTMMem) == 80, ASSERT_MSG);
430 
431  struct __attribute__((packed))
432  RXSTATUSMem
433  {
434  uint32_t error;
435  uint32_t num_status_codes;
436  uint32_t rxstat;
437  uint32_t rxstat_pri_mask;
438  uint32_t rxstat_set_mask;
439  uint32_t rxstat_clr_mask;
440  uint32_t aux1_stat;
441  uint32_t aux1_stat_pri;
442  uint32_t aux1_stat_set;
443  uint32_t aux1_stat_clr;
444  uint32_t aux2_stat;
445  uint32_t aux2_stat_pri;
446  uint32_t aux2_stat_set;
447  uint32_t aux2_stat_clr;
448  uint32_t aux3_stat;
449  uint32_t aux3_stat_pri;
450  uint32_t aux3_stat_set;
451  uint32_t aux3_stat_clr;
452  uint32_t aux4_stat;
453  uint32_t aux4_stat_pri;
454  uint32_t aux4_stat_set;
455  uint32_t aux4_stat_clr;
456  };
457  static_assert(sizeof(RXSTATUSMem) == 88, ASSERT_MSG);
458 
459 
460  struct __attribute__((packed))
461  TIMEMem
462  {
463  uint32_t clock_status;
464  double offset;
465  double offset_std;
466  double utc_offset;
467  uint32_t utc_year;
468  uint8_t utc_month;
469  uint8_t utc_day;
470  uint8_t utc_hour;
471  uint8_t utc_min;
472  uint32_t utc_msec;
473  uint32_t utc_status;
474  };
475  static_assert(sizeof(TIMEMem) == 44, ASSERT_MSG);
476 
477 
478  struct __attribute__((packed))
479  PSRDOP2_FixedMem
480  {
481  float gdop;
482  float pdop;
483  float hdop;
484  float vdop;
485  };
486  static_assert(sizeof(PSRDOP2_FixedMem) == 16, ASSERT_MSG);
487 
488  struct __attribute__((packed))
489  PSRDOP2_SystemMem
490  {
491  uint32_t system;
492  float tdop;
493  };
494 
495  struct __attribute__((packed))
496  RAWIMUSXMem
497  {
498  oem7_hex_t imu_info;
499  uint8_t imu_type;
500  uint16_t gnss_week;
501  double gnss_week_seconds;
502  oem7_hex_t imu_status[4];
503  int32_t z_acc;
504  int32_t y_acc;
505  int32_t x_acc;
506  int32_t z_gyro;
507  int32_t y_gyro;
508  int32_t x_gyro;
509  };
510  static_assert(sizeof(RAWIMUSXMem) == 40, ASSERT_MSG);
511 
512  const std::size_t OEM7_BINARY_MSG_HDR_LEN = sizeof(Oem7MessageHeaderMem);
513  const std::size_t OEM7_BINARY_MSG_SHORT_HDR_LEN = sizeof(Oem7MessgeShortHeaderMem);
514 
515 
516 
517 }
518 #endif
const std::size_t OEM7_BINARY_MSG_SHORT_HDR_LEN
struct __attribute__((packed)) Oem7MessageCommonHeaderMem
Definition: oem7_messages.h:51
TF2SIMD_FORCE_INLINE tf2Scalar length(const Quaternion &q)
const std::size_t OEM7_BINARY_MSG_HDR_LEN
#define ASSERT_MSG
Definition: oem7_messages.h:38


novatel_oem7_driver
Author(s):
autogenerated on Sun Mar 19 2023 02:17:37