MRPT  1.9.9
gnss_messages_novatel.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 #include "gnss_messages_common.h"
12 
13 namespace mrpt
14 {
15 namespace obs
16 {
17 namespace gnss
18 {
19 // Pragma to ensure we can safely serialize some of these structures
20 #pragma pack(push, 1)
21 
22 /** Novatel OEM6 regular header structure \sa mrpt::obs::CObservationGPS */
24 {
25  enum : uint8_t
26  {
27  SYNCH0 = 0xAA,
28  SYNCH1 = 0X44,
29  SYNCH2 = 0x12
30  };
31 
32  uint8_t synch[3]{0, 0, 0};
46 };
47 
48 /** Novatel OEM6 short header structure \sa mrpt::obs::CObservationGPS */
50 {
51  enum : uint8_t
52  {
53  SYNCH0 = 0xAA,
54  SYNCH1 = 0X44,
55  SYNCH2 = 0x13
56  };
57  uint8_t synch[3]{0, 0, 0};
62 };
63 
64 namespace nv_oem6_position_type
65 {
66 /** Novatel OEM6 firmware reference, table 84; Novatel SPAN on OEM6 firmware
67  * manual, table 26. */
69 {
70  NONE = 0,
71  FIXEDPOS = 1,
73  Reserved = 3,
74  FLOATCONV = 4,
75  WIDELANE = 5,
78  SINGLE = 16,
79  PSRDIFF = 17,
80  WAAS = 18,
81  PROPAGATED = 19,
82  OMNISTAR = 20,
83  L1_FLOAT = 32,
86  L1_INT = 48,
87  WIDE_INT = 49,
88  NARROW_INT = 50,
90  INS = 52,
91  INS_PSRSP = 53,
97  CDGPS = 66
98 };
99 /** for nv_position_type_t */
100 const std::string& enum2str(int val);
101 } // namespace nv_oem6_position_type
102 
103 namespace nv_oem6_solution_status
104 {
105 /** Novatel OEM6 firmware reference, table 85 */
107 {
108  /** solution computed */
110  /** insufficient observations */
112  /** noconvergence */
114  /** singularity at parameters matrix */
116  /** covariance trace exceeds maximum (trace>1000m) */
118  /** test distance exceeded (max of 3 rejections if distance > 10km) */
120  /** not yet converged from cold start */
122  /** height or velocity limits exceeded */
124  /** variance exceeds limits */
126  /** residuals are too large */
128  /** delta position is too large */
130  /** negative variance */
132  /** large residuals make position unreliable */
134  /** ins has not started yet */
136  /** ins doing its coarse alignment */
138  /** ins position is bad */
140  /** no imu detected */
142  /** when a fix position command is entered, the receiver computes its own
143  position and determines if the fixed position is valid */
144  PENDING = 18,
145  /** the fixed position entered using the fix position command is not valid
146  */
148 };
149 /** for nv_solution_status_t */
150 const std::string& enum2str(int val);
151 } // namespace nv_oem6_solution_status
152 namespace nv_oem6_ins_status_type
153 {
154 /** Novatel SPAN on OEM6 firmware reference, table 33 */
156 {
157  INS_INACTIVE = 0, // IMU logs are present, but the alignment routine has
158  // not started; INS is inactive.
159  INS_ALIGNING = 1, // INS is in alignment mode.
160  INS_HIGH_VARIANCE = 2, // The INS solution is in navigation mode but the
161  // azimuth solution uncertainty has exceeded the
162  // threshold.
163  INS_SOLUTION_GOOD = 3, // The INS filter is in navigation mode and the INS
164  // solution is good.
165  INS_SOLUTION_FREE = 6, // The INS filter is in navigation mode and the GNSS
166  // solution is suspected to be in error.
167  INS_ALIGNMENT_COMPLETE = 7, // The INS filter is in navigation mode, but
168  // not enough vehicle dynamics have been
169  // experienced for the system to be within
170  // specifications.
172  8, // INS is determining the IMU axis aligned with gravity.
173  WAITING_INITIALPOS = 9 // The INS filter has determined the IMU orientation
174  // and is awaiting an initial position estimate to
175  // begin the alignment process.
176 };
177 /** for nv_ins_status_type_t */
178 const std::string& enum2str(int val);
179 } // namespace nv_oem6_ins_status_type
180 
181 /** Novatel generic frame (to store frames without a parser at the present
182  * time). \sa mrpt::obs::CObservationGPS */
184 {
187  {
188  }
189  /** Frame header */
191  std::vector<uint8_t> msg_body;
192 
193  void dumpToStream(std::ostream& out) const override; // See docs in base
194  protected:
196  mrpt::serialization::CArchive& out) const override;
198 };
199 
200 /** Novatel generic short-header frame (to store frames without a parser at the
201  * present time). \sa mrpt::obs::CObservationGPS */
203 {
206  {
207  }
208  /** Frame header */
210  std::vector<uint8_t> msg_body;
211 
212  void dumpToStream(std::ostream& out) const override; // See docs in base
213  protected:
215  mrpt::serialization::CArchive& out) const override;
217 };
218 
219 /** Novatel frame: NV_OEM6_BESTPOS. \sa mrpt::obs::CObservationGPS */
221 /** Frame header */
223 nv_oem6_solution_status::nv_solution_status_t solution_stat;
224 nv_oem6_position_type::nv_position_type_t position_type;
225 /** [deg], [deg], hgt over sea level[m] */
226 double lat, lon, hgt;
229 /** Uncertainties (all in [m]) */
240 /** Return the geodetic coords as a mrpt::topography::TGeodeticCoords structure
241  * (requires linking against mrpt-topography)
242  * Call as: getAsStruct<TGeodeticCoords>(); */
243 template <class TGEODETICCOORDS>
244 inline TGEODETICCOORDS getAsStruct() const
245 {
246  return TGEODETICCOORDS(fields.lat, fields.lon, fields.hgt);
247 }
248 bool getAllFieldDescriptions(std::ostream& o) const override;
249 bool getAllFieldValues(std::ostream& o) const override;
251 
252 /** Novatel frame: NV_OEM6_INSPVAS. \sa mrpt::obs::CObservationGPS */
254 /** Frame header */
255 nv_oem6_short_header_t header;
258 double lat, lon, hgt;
260 double roll, pitch, azimuth;
262 uint32_t crc;
264 /** Return the geodetic coords as a mrpt::topography::TGeodeticCoords structure
265  * (requires linking against mrpt-topography)
266  * Call as: getAsStruct<TGeodeticCoords>(); */
267 template <class TGEODETICCOORDS>
268 inline TGEODETICCOORDS getAsStruct() const
269 {
270  return TGEODETICCOORDS(fields.lat, fields.lon, fields.hgt);
271 }
272 bool getAllFieldDescriptions(std::ostream& o) const override;
273 bool getAllFieldValues(std::ostream& o) const override;
275 
276 /** Novatel frame: NV_OEM6_INSCOVS. \sa mrpt::obs::CObservationGPS */
278 /** Frame header */
279 nv_oem6_short_header_t header;
280 uint32_t week;
281 double seconds_in_week;
282 /** Position covariance matrix in local level frame (metres squared)
283  * xx,xy,xz,yx,yy,yz,zx,zy,zz */
284 double pos_cov[9];
285 /** Attitude covariance matrix of the SPAN frame to the local level frame. (deg
286  * sq) xx,xy,xz,yx,yy,yz,zx,zy,zz */
287 double att_cov[9];
288 /** Velocity covariance matrix in local level frame. (metres/second squared)
289  * xx,xy,xz,yx,yy,yz,zx,zy,zz */
290 double vel_cov[9];
291 uint32_t crc;
293 bool getAllFieldDescriptions(std::ostream& o) const override;
294 bool getAllFieldValues(std::ostream& o) const override;
296 
297 /** Novatel frame: NV_OEM6_RANGECMP. \sa mrpt::obs::CObservationGPS */
299 {
302  {
303  }
305  {
307  };
308 
309  /** Frame header */
312  std::vector<TCompressedRangeLog> obs_data;
314 
315  void dumpToStream(std::ostream& out) const override; // See docs in base
316  protected:
318  mrpt::serialization::CArchive& out) const override;
320 };
321 
322 /** Novatel frame: NV_OEM6_RXSTATUS. \sa mrpt::obs::CObservationGPS */
324 /** Frame header */
331 uint32_t crc;
333 
334 /** Novatel frame: NV_OEM6_RAWEPHEM. \sa mrpt::obs::CObservationGPS */
336 /** Frame header */
340 uint32_t crc;
342 
343 /** Novatel frame: NV_OEM6_VERSION. \sa mrpt::obs::CObservationGPS */
345 {
348  {
349  }
351  {
353  char model[16], serial[16];
354  char hwversion[16], swversion[16], bootversion[16];
355  char compdate[12], comptime[12];
356  };
357 
358  /** Frame header */
361  std::vector<TComponentVersion> components;
363 
364  void dumpToStream(std::ostream& out) const override; // See docs in base
365  protected:
367  mrpt::serialization::CArchive& out) const override;
369 };
370 
371 /** Novatel frame: NV_OEM6_RAWIMUS. \sa mrpt::obs::CObservationGPS */
373 /** Frame header */
375 uint32_t week;
380 uint32_t crc;
382 bool getAllFieldDescriptions(std::ostream& o) const override;
383 bool getAllFieldValues(std::ostream& o) const override;
385 
386 /** Novatel frame: NV_OEM6_MARKPOS. \sa mrpt::obs::CObservationGPS */
388 /** Frame header */
392 /** [deg], [deg], hgt over sea level[m] */
393 double lat, lon, hgt;
394 float undulation;
397 char base_station_id[4];
398 float diff_age, sol_age;
404 uint32_t crc;
406 /** Return the geodetic coords as a mrpt::topography::TGeodeticCoords structure
407  * (requires linking against mrpt-topography)
408  * Call as: getAsStruct<TGeodeticCoords>(); */
409 template <class TGEODETICCOORDS>
410 inline TGEODETICCOORDS getAsStruct() const
411 {
412  return TGEODETICCOORDS(fields.lat, fields.lon, fields.hgt);
413 }
415 
416 /** Novatel frame: NV_OEM6_MARKTIME. \sa mrpt::obs::CObservationGPS */
418 /** Frame header */
419 nv_oem6_header_t header;
420 uint32_t week;
421 double week_seconds;
423 double utc_offset;
425 uint32_t crc;
427 bool getAllFieldDescriptions(std::ostream& o) const override;
428 bool getAllFieldValues(std::ostream& o) const override;
430 
431 /** Novatel frame: NV_OEM6_MARK2TIME. \sa mrpt::obs::CObservationGPS */
433 /** Frame header */
435 uint32_t week;
436 double week_seconds;
438 double utc_offset;
440 uint32_t crc;
442 bool getAllFieldDescriptions(std::ostream& o) const override;
443 bool getAllFieldValues(std::ostream& o) const override;
445 
446 /** Novatel frame: NV_OEM6_IONUTC. \sa mrpt::obs::CObservationGPS */
448 /** Frame header */
450 double a0, a1, a2, a3, b0, b1, b2,
451  b3; // Ionospheric alpha and beta constant terms parameters
452 /** UTC reference week number */
454 /** Reference time of UTC params */
456 /** UTC constant and 1st order terms */
457 double A0, A1;
458 /** Future week number */
460 /** Day number (1=sunday, 7=saturday) */
462 /** Delta time due to leap seconds */
464 /** Delta time due to leap seconds (future) */
467 uint32_t crc;
469 
470 #pragma pack(pop) // End of pack = 1
471 } // namespace gnss
472 } // namespace obs
473 } // namespace mrpt
void internal_readFromStream(mrpt::serialization::CArchive &in) override
Save to binary stream.
const std::string & enum2str(int val)
for nv_ins_status_type_t
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
unsigned __int16 uint16_t
Definition: rptypes.h:47
#define GNSS_BINARY_MSG_DEFINITION_START(_MSG_ID)
uint32_t wn_lsf
Future week number.
test distance exceeded (max of 3 rejections if distance > 10km)
Novatel generic frame (to store frames without a parser at the present time).
uint32_t utc_wn
UTC reference week number.
#define GNSS_BINARY_MSG_DEFINITION_MID_END
uint32_t dn
Day number (1=sunday, 7=saturday)
when a fix position command is entered, the receiver computes its own position and determines if the ...
gnss_message_type_t
List of all known GNSS message types.
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
double vel_cov[9]
Velocity covariance matrix in local level frame.
uint32_t tot
Reference time of UTC params.
const std::string & enum2str(int val)
for nv_position_type_t
Novatel OEM6 regular header structure.
void internal_writeToStream(mrpt::serialization::CArchive &out) const override
Save to binary stream.
GNSS_BINARY_MSG_DEFINITION_MID TGEODETICCOORDS getAsStruct() const
Return the geodetic coords as a mrpt::topography::TGeodeticCoords structure (requires linking against...
nv_oem6_solution_status::nv_solution_status_t solution_stat
const std::string & enum2str(int val)
for nv_solution_status_t
unsigned char uint8_t
Definition: rptypes.h:44
void internal_readFromStream(mrpt::serialization::CArchive &in) override
Save to binary stream.
#define GNSS_BINARY_MSG_DEFINITION_MID
void internal_writeToStream(mrpt::serialization::CArchive &out) const override
Save to binary stream.
nv_oem6_position_type::nv_position_type_t position_type
void internal_writeToStream(mrpt::serialization::CArchive &out) const override
Save to binary stream.
nv_oem6_header_t header
Novatel frame: NV_OEM6_BESTPOS.
nv_solution_status_t
Novatel OEM6 firmware reference, table 85.
uint32_t deltat_lsf
Delta time due to leap seconds (future)
Novatel generic short-header frame (to store frames without a parser at the present time)...
double att_cov[9]
Attitude covariance matrix of the SPAN frame to the local level frame.
int val
Definition: mrpt_jpeglib.h:957
double lat
[deg], [deg], hgt over sea level[m]
void internal_readFromStream(mrpt::serialization::CArchive &in) override
Save to binary stream.
GLsizei const GLchar ** string
Definition: glext.h:4116
Novatel OEM6 short header structure.
uint32_t deltat_ls
Delta time due to leap seconds.
std::vector< TCompressedRangeLog > obs_data
__int32 int32_t
Definition: rptypes.h:49
bool getAllFieldDescriptions(std::ostream &o) const override
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
double pos_cov[9]
Position covariance matrix in local level frame (metres squared) xx,xy,xz,yx,yy,yz,zx,zy,zz.
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:53
nv_oem6_ins_status_type::nv_ins_status_type_t ins_status
Pure virtual base for all message types.
#define GNSS_BINARY_MSG_DEFINITION_END
GLuint in
Definition: glext.h:7391
float lat_sigma
Uncertainties (all in [m])
nv_position_type_t
Novatel OEM6 firmware reference, table 84; Novatel SPAN on OEM6 firmware manual, table 26...
covariance trace exceeds maximum (trace>1000m)
the fixed position entered using the fix position command is not valid
double A0
UTC constant and 1st order terms.
void internal_writeToStream(mrpt::serialization::CArchive &out) const override
Save to binary stream.
unsigned __int32 uint32_t
Definition: rptypes.h:50
bool getAllFieldValues(std::ostream &o) const override
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:3550
std::vector< TComponentVersion > components
void internal_readFromStream(mrpt::serialization::CArchive &in) override
Save to binary stream.
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
nv_ins_status_type_t
Novatel SPAN on OEM6 firmware reference, table 33.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019