19 nv_oem6_header_t::nv_oem6_header_t()
32 receiver_sw_version(0)
38 : msg_len(), msg_id(),
week(), ms_in_week()
47 "[Novatel OEM6 GENERIC FRAME]\n"
55 out << static_cast<uint32_t>(
msg_body.size());
65 if (nBytesInStream)
in.ReadBuffer(&
msg_body[0],
sizeof(nBytesInStream));
70 out <<
mrpt::format(
"[Novatel OEM6 GENERIC SHORT FRAME]\n");
77 out << static_cast<uint32_t>(
msg_body.size());
87 if (nBytesInStream)
in.ReadBuffer(&
msg_body[0],
sizeof(nBytesInStream));
93 static bool init_map =
false;
94 static std::map<int, std::string> val2str;
98 #define DEF_TYPESTR(_NAME) val2str[nv_oem6_solution_status::_NAME] = #_NAME;
122 return (it == val2str.end()) ? nullstr : it->second;
127 static bool init_map =
false;
128 static std::map<int, std::string> val2str;
132 #define DEF_TYPESTR(_NAME) val2str[nv_oem6_position_type::_NAME] = #_NAME;
165 return (it == val2str.end()) ? nullstr : it->second;
170 static bool init_map =
false;
171 static std::map<int, std::string> val2str;
175 #define DEF_TYPESTR(_NAME) val2str[nv_oem6_ins_status_type::_NAME] = #_NAME;
188 return (it == val2str.end()) ? nullstr : it->second;
192 const Message_NV_OEM6_BESTPOS::content_t& fields, std::ostream& out)
195 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
196 (
unsigned)(fields.header.ms_in_week));
198 " Solution status: `%s`\n",
201 " Position type : `%s`\n",
204 " Longitude: %.09f deg (std dev: %.06f m) Latitude: %.09f deg (std "
206 fields.lon, fields.lon_sigma, fields.lat, fields.lat_sigma);
208 " Height (sea level): %.06f m (std dev: %.06f m) Undulation: %.04f m "
210 fields.hgt, fields.hgt_sigma, fields.undulation,
211 fields.hgt + fields.undulation);
213 " Diff age: %.03f Solution age: %.03f\n", fields.diff_age,
216 " Base station ID: `%.*s`\n", 4, fields.base_station_id);
218 " Num sat tracked: %u Num sat in solution: %u\n",
219 (
unsigned)fields.num_sats_tracked, (
unsigned)fields.num_sats_sol);
222 void Message_NV_OEM6_BESTPOS::dumpToStream(std::ostream& out)
const
224 out <<
"[Novatel OEM6 BESTPOS]\n";
230 o <<
"gps_week.gps_ms solution_stat position_type lon_deg lat_deg hgt_m "
231 "undulation_m lon_sigma_m lat_sigma_m hgt_sigma_m diff_age sol_age "
232 "num_sats_tracked num_sats_sol";
238 "%u.%08u %u %u %.09f %.09f %.06f %.04f %.06f %.06f %.06f %.03f %.03f "
240 (
unsigned)fields.header.week, (
unsigned)(fields.header.ms_in_week),
241 (
unsigned)fields.solution_stat, (
unsigned)fields.position_type,
242 fields.lon, fields.lat, fields.hgt, fields.undulation, fields.lon_sigma,
243 fields.lat_sigma, fields.hgt_sigma, fields.diff_age, fields.sol_age,
244 (
unsigned)fields.num_sats_tracked, (
unsigned)fields.num_sats_sol);
249 void Message_NV_OEM6_INSPVAS::dumpToStream(std::ostream& out)
const
253 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
254 (
unsigned)(fields.header.ms_in_week));
256 " INS status: `%s`\n",
259 " Longitude: %.09f deg Latitude: %.09f deg Height: %.03f m\n",
260 fields.lon, fields.lat, fields.hgt);
262 " Velocities: North: %.05f East: %.05f Up: %.05f\n", fields.vel_north,
263 fields.vel_east, fields.vel_up);
265 " Attitude: Roll: %.05f Pitch: %.05f Azimuth: %.05f\n", fields.roll,
266 fields.pitch, fields.azimuth);
271 o <<
"gps_week.gps_ms ins_status lon_deg lat_deg ellip_height_WGS84 "
272 "vel_north vel_east vel_up roll_deg pitch_deg azimuth_deg";
278 "%u.%08u %u %.09f %.09f %.06f %.05f %.05f %.05f %.05f %.05f %.05f",
279 (
unsigned)fields.header.week, (
unsigned)(fields.header.ms_in_week),
280 (
unsigned)fields.ins_status, fields.lon, fields.lat, fields.hgt,
281 fields.vel_north, fields.vel_east, fields.vel_up, fields.roll,
282 fields.pitch, fields.azimuth);
287 void Message_NV_OEM6_INSCOVS::dumpToStream(std::ostream& out)
const
291 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
292 (
unsigned)(fields.header.ms_in_week));
294 " Position cov: %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f "
296 fields.pos_cov[0], fields.pos_cov[1], fields.pos_cov[2],
297 fields.pos_cov[3], fields.pos_cov[4], fields.pos_cov[5],
298 fields.pos_cov[6], fields.pos_cov[7], fields.pos_cov[8]);
300 " Attitude cov: %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f "
302 fields.att_cov[0], fields.att_cov[1], fields.att_cov[2],
303 fields.att_cov[3], fields.att_cov[4], fields.att_cov[5],
304 fields.att_cov[6], fields.att_cov[7], fields.att_cov[8]);
306 " Velocity cov: %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f "
308 fields.vel_cov[0], fields.vel_cov[1], fields.vel_cov[2],
309 fields.vel_cov[3], fields.vel_cov[4], fields.vel_cov[5],
310 fields.vel_cov[6], fields.vel_cov[7], fields.vel_cov[8]);
315 o <<
"gps_week.gps_ms pos_cov(*9) att-cov(*9) vel_cov(*9)";
322 "%9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f "
323 "%9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f "
324 "%9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f ",
325 (
unsigned)fields.header.week, (
unsigned)(fields.header.ms_in_week),
326 fields.pos_cov[0], fields.pos_cov[1], fields.pos_cov[2],
327 fields.pos_cov[3], fields.pos_cov[4], fields.pos_cov[5],
328 fields.pos_cov[6], fields.pos_cov[7], fields.pos_cov[8],
329 fields.att_cov[0], fields.att_cov[1], fields.att_cov[2],
330 fields.att_cov[3], fields.att_cov[4], fields.att_cov[5],
331 fields.att_cov[6], fields.att_cov[7], fields.att_cov[8],
332 fields.vel_cov[0], fields.vel_cov[1], fields.vel_cov[2],
333 fields.vel_cov[3], fields.vel_cov[4], fields.vel_cov[5],
334 fields.vel_cov[6], fields.vel_cov[7], fields.vel_cov[8]);
343 " Number of SAT observations: %u\n",
344 static_cast<unsigned int>(this->
num_obs));
363 in >> expected_msg_len;
373 void Message_NV_OEM6_RXSTATUS::dumpToStream(std::ostream& out)
const
377 " Error code: 0x%04X\n",
static_cast<unsigned int>(this->fields.error));
381 void Message_NV_OEM6_RAWEPHEM::dumpToStream(std::ostream& out)
const
385 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
386 (
unsigned)(fields.header.ms_in_week));
394 " Number of components: %u\n",
395 static_cast<unsigned int>(this->
num_comps));
396 for (
unsigned i = 0; i <
components.size(); i++)
399 " Component #%u:\n Model: `%.*s`\n Serial: `%.*s`\n SW "
424 in >> expected_msg_len;
435 void Message_NV_OEM6_RAWIMUS::dumpToStream(std::ostream& out)
const
439 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
440 (
unsigned)(fields.header.ms_in_week));
441 out <<
mrpt::format(
" Status: 0x%08lu\n", (
long)fields.imu_status);
443 " Acel: X=%li Y=%li Z=%li\n", (
long)fields.accel_x,
444 -(
long)fields.accel_y_neg, (
long)fields.accel_z);
446 " Gyro: X=%li Y=%li Z=%li\n", (
long)fields.gyro_x,
447 -(
long)fields.gyro_y_neg, (
long)fields.gyro_z);
452 o <<
"gps_week.gps_ms imu_status acc_x acc_y acc_z gyro_x gyro_y gyro_z";
458 "%u.%08u %u %li %li %li %li %li %li", (
unsigned)fields.header.week,
459 (
unsigned)(fields.header.ms_in_week), (
unsigned)fields.imu_status,
460 (
long)fields.accel_x, -(
long)fields.accel_y_neg, (
long)fields.accel_z,
461 (
long)fields.gyro_x, -(
long)fields.gyro_y_neg, (
long)fields.gyro_z);
467 const Message_NV_OEM6_MARKTIME::content_t& fields, std::ostream& out)
469 out <<
mrpt::format(
" Clock status: 0x%08lu\n", (
long)fields.clock_status);
471 " GPS week: %lu Seconds: %f\n", (
long)fields.week, fields.week_seconds);
473 " Clock offset: %f (std dev = %e)\n", fields.clock_offset,
474 fields.clock_offset_std);
475 out <<
mrpt::format(
" UTC offset: %f\n", fields.utc_offset);
478 void Message_NV_OEM6_MARKTIME::dumpToStream(std::ostream& out)
const
486 o <<
"gps_week.gps_ms clock_status week week_seconds utc_offset";
490 const Message_NV_OEM6_MARKTIME::content_t& fields, std::ostream& o)
493 "%u.%08u %u %lu %f %f", (
unsigned)fields.header.week,
494 (
unsigned)(fields.header.ms_in_week), (
unsigned)fields.clock_status,
495 (
long unsigned)fields.week, fields.week_seconds, fields.utc_offset);
503 void Message_NV_OEM6_MARK2TIME::dumpToStream(std::ostream& out)
const
507 *
reinterpret_cast<const Message_NV_OEM6_MARKTIME::content_t*
>(&fields),
512 o <<
"gps_week.gps_ms clock_status week week_seconds utc_offset";
518 *
reinterpret_cast<const Message_NV_OEM6_MARKTIME::content_t*
>(&fields),
524 void Message_NV_OEM6_MARKPOS::dumpToStream(std::ostream& out)
const
528 *
reinterpret_cast<const Message_NV_OEM6_BESTPOS::content_t*
>(&fields),
533 void Message_NV_OEM6_IONUTC::dumpToStream(std::ostream& out)
const
537 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
538 (
unsigned)(fields.header.ms_in_week));
540 " UTC ref week: %u Tot: %u\n", (
unsigned)fields.utc_wn,
541 (
unsigned)fields.tot);
543 " Leap seconds delta_t: %u future: %u\n", (
unsigned)fields.deltat_ls,
544 (
unsigned)fields.deltat_lsf);