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  BESTPOSMem
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(BESTPOSMem) == 72, ASSERT_MSG);
124 
125 
126  struct __attribute__((packed))
127  BESTVELMem
128  {
129  uint32_t sol_stat;
130  uint32_t vel_type;
131  float latency;
132  float diff_age;
133  double hor_speed;
134  double track_gnd;
135  double ver_speed;
136  float reserved;
137  };
138  static_assert(sizeof(BESTVELMem) == 44, ASSERT_MSG);
139 
140 
141  struct __attribute__((packed))
142  INSPVASmem
143  {
144  uint32_t gnss_week;
145  double seconds;
146  double latitude;
147  double longitude;
148  double height;
149  double north_velocity;
150  double east_velocity;
151  double up_velocity;
152  double roll;
153  double pitch;
154  double azimuth;
155  oem7_enum_t status;
156  };
157  static_assert(sizeof(INSPVASmem) == 88, ASSERT_MSG);
158 
159  struct __attribute__((packed))
160  CORRIMUSMem
161  {
162  uint32_t imu_data_count;
163  double pitch_rate;
164  double roll_rate;
165  double yaw_rate;
166  double lateral_acc;
167  double longitudinal_acc;
168  double vertical_acc;
169  uint32_t reserved1;
170  uint32_t reserved2;
171  };
172  static_assert(sizeof(CORRIMUSMem) == 60, ASSERT_MSG);
173 
174  struct __attribute__((packed))
175  IMURATECORRIMUSMem
176  {
177  uint32_t week;
178  double seconds;
179  double pitch_rate;
180  double roll_rate;
181  double yaw_rate;
182  double lateral_acc;
183  double longitudinal_acc;
184  double vertical_acc;
185  };
186  static_assert(sizeof(IMURATECORRIMUSMem) == 60, ASSERT_MSG);
187 
188  struct __attribute__((packed))
189  INSSTDEVMem
190  {
191  float latitude_stdev;
192  float longitude_stdev;
193  float height_stdev;
194  float north_velocity_stdev;
195  float east_velocity_stdev;
196  float up_velocity_stdev;
197  float roll_stdev;
198  float pitch_stdev;
199  float azimuth_stdev;
200  uint32_t ext_sol_status;
201  uint16_t time_since_last_update;
202  uint16_t reserved1;
203  uint32_t reserved2;
204  uint32_t reserved3;
205  };
206  static_assert(sizeof(INSSTDEVMem) == 52, ASSERT_MSG);
207 
208 
209  struct __attribute__((packed))
210  INSCONFIG_FixedMem
211  {
212  oem7_enum_t imu_type;
213  uint8_t mapping;
214  uint8_t initial_alignment_velocity;
215  uint16_t heave_window;
216  oem7_enum_t profile;
217  oem7_hex_t enabled_updates[4];
218  oem7_enum_t alignment_mode;
219  oem7_enum_t relative_ins_output_frame;
220  oem7_bool_t relative_ins_output_direction;
221  oem7_hex_t ins_receiver_status[4];
222  uint8_t ins_seed_enabled;
223  uint8_t ins_seed_validation;
224  uint16_t reserved_1;
225  uint32_t reserved_2;
226  uint32_t reserved_3;
227  uint32_t reserved_4;
228  uint32_t reserved_5;
229  uint32_t reserved_6;
230  uint32_t reserved_7;
231  };
232  static_assert(sizeof(INSCONFIG_FixedMem) == 60, ASSERT_MSG);
233 
234  struct __attribute__((packed))
235  INSCONFIG_TranslationMem
236  {
237  uint32_t translation;
238  uint32_t frame;
239  float x_offset;
240  float y_offset;
241  float z_offset;
242  float x_uncertainty;
243  float y_uncertainty;
244  float z_uncertainty;
245  uint32_t translation_source;
246  };
247 
248 
249  struct __attribute__((packed))
250  INSCONFIG_RotationMem
251  {
252  uint32_t rotation;
253  uint32_t frame;
254  float x_rotation;
255  float y_rotation;
256  float z_rotation;
257  float x_rotation_stdev;
258  float y_rotation_stdev;
259  float z_rotation_stdev;
260  uint32_t rotation_source;
261  };
262 
263 
264  struct __attribute__((packed))
265  INSPVAXMem
266  {
267  oem7_enum_t ins_status;
268  oem7_enum_t pos_type;
269  double latitude;
270  double longitude;
271  double height;
272  float undulation;
273  double north_velocity;
274  double east_velocity;
275  double up_velocity;
276  double roll;
277  double pitch;
278  double azimuth;
279  float latitude_stdev;
280  float longitude_stdev;
281  float height_stdev;
282  float north_velocity_stdev;
283  float east_velocity_stdev;
284  float up_velocity_stdev;
285  float roll_stdev;
286  float pitch_stdev;
287  float azimuth_stdev;
288  uint32_t extended_status;
289  uint16_t time_since_update;
290  };
291  static_assert(sizeof(INSPVAXMem) == 126, ASSERT_MSG);
292 
293  struct __attribute__((packed))
294  HEADING2Mem
295  {
296  oem7_enum_t sol_status;
297  oem7_enum_t pos_type;
298  float length;
299  float heading;
300  float pitch;
301  float reserved;
302  float heading_stdev;
303  float pitch_stdev;
304  oem7_char_t rover_stn_id[4];
305  oem7_char_t master_stn_id[4];
306  uint8_t num_sv_tracked;
307  uint8_t num_sv_in_sol;
308  uint8_t num_sv_obs;
309  uint8_t num_sv_multi;
310  uint8_t sol_source;
311  uint8_t ext_sol_status;
312  uint8_t galileo_beidou_sig_mask;
313  uint8_t gps_glonass_sig_mask;
314  };
315  static_assert(sizeof(HEADING2Mem) == 48, ASSERT_MSG);
316 
317  struct __attribute__((packed))
318  BESTUTMMem
319  {
320  oem7_enum_t sol_stat;
321  oem7_enum_t pos_type;
322  uint32_t lon_zone_number;
323  uint32_t lat_zone_letter;
324  double northing;
325  double easting;
326  double height;
327  float undulation;
328  uint32_t datum_id;
329  float northing_stddev;
330  float easting_stddev;
331  float height_stddev;
332  char stn_id[4];
333  float diff_age;
334  float sol_age;
335  uint8_t num_svs;
336  uint8_t num_sol_svs;
337  uint8_t num_sol_ggl1_svs;
338  uint8_t num_sol_multi_svs;
339  uint8_t reserved;
340  uint8_t ext_sol_stat;
341  uint8_t galileo_beidou_sig_mask;
342  uint8_t gps_glonass_sig_mask;
343  };
344  static_assert(sizeof(BESTUTMMem) == 80, ASSERT_MSG);
345 
346  struct __attribute__((packed))
347  RXSTATUSMem
348  {
349  uint32_t error;
350  uint32_t num_status_codes;
351  uint32_t rxstat;
352  uint32_t rxstat_pri_mask;
353  uint32_t rxstat_set_mask;
354  uint32_t rxstat_clr_mask;
355  uint32_t aux1_stat;
356  uint32_t aux1_stat_pri;
357  uint32_t aux1_stat_set;
358  uint32_t aux1_stat_clr;
359  uint32_t aux2_stat;
360  uint32_t aux2_stat_pri;
361  uint32_t aux2_stat_set;
362  uint32_t aux2_stat_clr;
363  uint32_t aux3_stat;
364  uint32_t aux3_stat_pri;
365  uint32_t aux3_stat_set;
366  uint32_t aux3_stat_clr;
367  uint32_t aux4_stat;
368  uint32_t aux4_stat_pri;
369  uint32_t aux4_stat_set;
370  uint32_t aux4_stat_clr;
371  };
372  static_assert(sizeof(RXSTATUSMem) == 88, ASSERT_MSG);
373 
374 
375  struct __attribute__((packed))
376  TIMEMem
377  {
378  uint32_t clock_status;
379  double offset;
380  double offset_std;
381  double utc_offset;
382  uint32_t utc_year;
383  uint8_t utc_month;
384  uint8_t utc_day;
385  uint8_t utc_hour;
386  uint8_t utc_min;
387  uint32_t utc_msec;
388  uint32_t utc_status;
389  };
390  static_assert(sizeof(TIMEMem) == 44, ASSERT_MSG);
391 
392 
393  struct __attribute__((packed))
394  PSRDOP2_FixedMem
395  {
396  float gdop;
397  float pdop;
398  float hdop;
399  float vdop;
400  };
401  static_assert(sizeof(PSRDOP2_FixedMem) == 16, ASSERT_MSG);
402 
403  struct __attribute__((packed))
404  PSRDOP2_SystemMem
405  {
406  uint32_t system;
407  float tdop;
408  };
409 
410 
411  const std::size_t OEM7_BINARY_MSG_HDR_LEN = sizeof(Oem7MessageHeaderMem);
412  const std::size_t OEM7_BINARY_MSG_SHORT_HDR_LEN = sizeof(Oem7MessgeShortHeaderMem);
413 
414 
415 
416 }
417 #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 Tue Mar 9 2021 03:48:00