20 void Message_NV_OEM6_GENERIC_FRAME::dumpToStream(std::ostream&
out)
const 23 "[Novatel OEM6 GENERIC FRAME]\n" 27 void Message_NV_OEM6_GENERIC_FRAME::internal_writeToStream(
31 out << static_cast<uint32_t>(msg_body.size());
32 if (!msg_body.empty())
out.WriteBuffer(&msg_body[0], msg_body.size());
34 void Message_NV_OEM6_GENERIC_FRAME::internal_readFromStream(
38 uint32_t nBytesInStream;
40 msg_body.resize(nBytesInStream);
41 if (nBytesInStream)
in.ReadBuffer(&msg_body[0],
sizeof(nBytesInStream));
45 void Message_NV_OEM6_GENERIC_SHORT_FRAME::dumpToStream(std::ostream&
out)
const 47 out <<
"[Novatel OEM6 GENERIC SHORT FRAME]\n";
50 void Message_NV_OEM6_GENERIC_SHORT_FRAME::internal_writeToStream(
54 out << static_cast<uint32_t>(msg_body.size());
55 if (!msg_body.empty())
out.WriteBuffer(&msg_body[0], msg_body.size());
57 void Message_NV_OEM6_GENERIC_SHORT_FRAME::internal_readFromStream(
61 uint32_t nBytesInStream;
63 msg_body.resize(nBytesInStream);
64 if (nBytesInStream)
in.ReadBuffer(&msg_body[0],
sizeof(nBytesInStream));
71 static bool init_map =
false;
72 static std::map<int, std::string> val2str;
76 #define DEF_TYPESTR(_NAME) val2str[nv_oem6_solution_status::_NAME] = #_NAME; 98 auto it = val2str.find(
val);
100 return (it == val2str.end()) ? nullstr : it->second;
105 static bool init_map =
false;
106 static std::map<int, std::string> val2str;
110 #define DEF_TYPESTR(_NAME) val2str[nv_oem6_position_type::_NAME] = #_NAME; 141 auto it = val2str.find(
val);
143 return (it == val2str.end()) ? nullstr : it->second;
148 static bool init_map =
false;
149 static std::map<int, std::string> val2str;
153 #define DEF_TYPESTR(_NAME) val2str[nv_oem6_ins_status_type::_NAME] = #_NAME; 164 auto it = val2str.find(
val);
166 return (it == val2str.end()) ? nullstr : it->second;
170 const Message_NV_OEM6_BESTPOS::content_t& fields, std::ostream&
out)
173 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
174 (
unsigned)(fields.header.ms_in_week));
176 " Solution status: `%s`\n",
179 " Position type : `%s`\n",
182 " Longitude: %.09f deg (std dev: %.06f m) Latitude: %.09f deg (std " 184 fields.lon, fields.lon_sigma, fields.lat, fields.lat_sigma);
186 " Height (sea level): %.06f m (std dev: %.06f m) Undulation: %.04f m " 188 fields.hgt, fields.hgt_sigma, fields.undulation,
189 fields.hgt + fields.undulation);
191 " Diff age: %.03f Solution age: %.03f\n", fields.diff_age,
194 " Base station ID: `%.*s`\n", 4, fields.base_station_id);
196 " Num sat tracked: %u Num sat in solution: %u\n",
197 (
unsigned)fields.num_sats_tracked, (
unsigned)fields.num_sats_sol);
200 void Message_NV_OEM6_BESTPOS::dumpToStream(std::ostream&
out)
const 202 out <<
"[Novatel OEM6 BESTPOS]\n";
208 o <<
"gps_week.gps_ms solution_stat position_type lon_deg lat_deg hgt_m " 209 "undulation_m lon_sigma_m lat_sigma_m hgt_sigma_m diff_age sol_age " 210 "num_sats_tracked num_sats_sol";
216 "%u.%08u %u %u %.09f %.09f %.06f %.04f %.06f %.06f %.06f %.03f %.03f " 218 (
unsigned)fields.header.week, (
unsigned)(fields.header.ms_in_week),
219 (
unsigned)fields.solution_stat, (
unsigned)fields.position_type,
220 fields.lon, fields.lat, fields.hgt, fields.undulation, fields.lon_sigma,
221 fields.lat_sigma, fields.hgt_sigma, fields.diff_age, fields.sol_age,
222 (
unsigned)fields.num_sats_tracked, (
unsigned)fields.num_sats_sol);
227 void Message_NV_OEM6_INSPVAS::dumpToStream(std::ostream&
out)
const 229 out <<
"[Novatel OEM6 INSPVAS]\n";
231 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
232 (
unsigned)(fields.header.ms_in_week));
234 " INS status: `%s`\n",
237 " Longitude: %.09f deg Latitude: %.09f deg Height: %.03f m\n",
238 fields.lon, fields.lat, fields.hgt);
240 " Velocities: North: %.05f East: %.05f Up: %.05f\n", fields.vel_north,
241 fields.vel_east, fields.vel_up);
243 " Attitude: Roll: %.05f Pitch: %.05f Azimuth: %.05f\n", fields.roll,
244 fields.pitch, fields.azimuth);
249 o <<
"gps_week.gps_ms ins_status lon_deg lat_deg ellip_height_WGS84 " 250 "vel_north vel_east vel_up roll_deg pitch_deg azimuth_deg";
256 "%u.%08u %u %.09f %.09f %.06f %.05f %.05f %.05f %.05f %.05f %.05f",
257 (
unsigned)fields.header.week, (
unsigned)(fields.header.ms_in_week),
258 (
unsigned)fields.ins_status, fields.lon, fields.lat, fields.hgt,
259 fields.vel_north, fields.vel_east, fields.vel_up, fields.roll,
260 fields.pitch, fields.azimuth);
265 void Message_NV_OEM6_INSCOVS::dumpToStream(std::ostream&
out)
const 267 out <<
"[Novatel OEM6 INSCOVS]\n";
269 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
270 (
unsigned)(fields.header.ms_in_week));
272 " Position cov: %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f " 274 fields.pos_cov[0], fields.pos_cov[1], fields.pos_cov[2],
275 fields.pos_cov[3], fields.pos_cov[4], fields.pos_cov[5],
276 fields.pos_cov[6], fields.pos_cov[7], fields.pos_cov[8]);
278 " Attitude cov: %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f " 280 fields.att_cov[0], fields.att_cov[1], fields.att_cov[2],
281 fields.att_cov[3], fields.att_cov[4], fields.att_cov[5],
282 fields.att_cov[6], fields.att_cov[7], fields.att_cov[8]);
284 " Velocity cov: %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f " 286 fields.vel_cov[0], fields.vel_cov[1], fields.vel_cov[2],
287 fields.vel_cov[3], fields.vel_cov[4], fields.vel_cov[5],
288 fields.vel_cov[6], fields.vel_cov[7], fields.vel_cov[8]);
293 o <<
"gps_week.gps_ms pos_cov(*9) att-cov(*9) vel_cov(*9)";
300 "%9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f " 301 "%9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f " 302 "%9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f %9.03f ",
303 (
unsigned)fields.header.week, (
unsigned)(fields.header.ms_in_week),
304 fields.pos_cov[0], fields.pos_cov[1], fields.pos_cov[2],
305 fields.pos_cov[3], fields.pos_cov[4], fields.pos_cov[5],
306 fields.pos_cov[6], fields.pos_cov[7], fields.pos_cov[8],
307 fields.att_cov[0], fields.att_cov[1], fields.att_cov[2],
308 fields.att_cov[3], fields.att_cov[4], fields.att_cov[5],
309 fields.att_cov[6], fields.att_cov[7], fields.att_cov[8],
310 fields.vel_cov[0], fields.vel_cov[1], fields.vel_cov[2],
311 fields.vel_cov[3], fields.vel_cov[4], fields.vel_cov[5],
312 fields.vel_cov[6], fields.vel_cov[7], fields.vel_cov[8]);
317 void Message_NV_OEM6_RANGECMP::dumpToStream(std::ostream&
out)
const 319 out <<
"[Novatel OEM6 RANGECMP]\n";
321 " Number of SAT observations: %u\n",
322 static_cast<unsigned int>(this->num_obs));
325 void Message_NV_OEM6_RANGECMP::internal_writeToStream(
334 out.WriteBuffer(&obs_data[0],
sizeof(obs_data[0]) * obs_data.size());
337 void Message_NV_OEM6_RANGECMP::internal_readFromStream(
340 uint32_t expected_msg_len;
341 in >> expected_msg_len;
345 obs_data.resize(num_obs);
347 in.ReadBuffer(&obs_data[0],
sizeof(obs_data[0]) * obs_data.size());
352 void Message_NV_OEM6_RXSTATUS::dumpToStream(std::ostream&
out)
const 354 out <<
"[Novatel OEM6 RXSTATUS]\n";
356 " Error code: 0x%04X\n", static_cast<unsigned int>(this->fields.error));
360 void Message_NV_OEM6_RAWEPHEM::dumpToStream(std::ostream&
out)
const 362 out <<
"[Novatel OEM6 RAWEPHEM]\n";
364 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
365 (
unsigned)(fields.header.ms_in_week));
369 void Message_NV_OEM6_VERSION::dumpToStream(std::ostream&
out)
const 371 out <<
"[Novatel OEM6 VERSION]\n";
373 " Number of components: %u\n",
374 static_cast<unsigned int>(this->num_comps));
375 for (
size_t i = 0; i <
components.size(); i++)
378 " Component #%u:\n Model: `%.*s`\n Serial: `%.*s`\n SW " 380 (
unsigned int)i, (
int)
sizeof(
components[i].model),
387 void Message_NV_OEM6_VERSION::internal_writeToStream(
400 void Message_NV_OEM6_VERSION::internal_readFromStream(
403 uint32_t expected_msg_len;
404 in >> expected_msg_len;
416 void Message_NV_OEM6_RAWIMUS::dumpToStream(std::ostream&
out)
const 418 out <<
"[Novatel OEM6 RAWIMUS]\n";
420 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
421 (
unsigned)(fields.header.ms_in_week));
424 " Acel: X=%li Y=%li Z=%li\n", (
long)fields.accel_x,
425 -(
long)fields.accel_y_neg, (
long)fields.accel_z);
427 " Gyro: X=%li Y=%li Z=%li\n", (
long)fields.gyro_x,
428 -(
long)fields.gyro_y_neg, (
long)fields.gyro_z);
433 o <<
"gps_week.gps_ms imu_status acc_x acc_y acc_z gyro_x gyro_y gyro_z";
439 "%u.%08u %u %li %li %li %li %li %li", (
unsigned)fields.header.week,
440 (
unsigned)(fields.header.ms_in_week), (
unsigned)fields.imu_status,
441 (
long)fields.accel_x, -(
long)fields.accel_y_neg, (
long)fields.accel_z,
442 (
long)fields.gyro_x, -(
long)fields.gyro_y_neg, (
long)fields.gyro_z);
448 const Message_NV_OEM6_MARKTIME::content_t& fields, std::ostream&
out)
450 out <<
mrpt::format(
" Clock status: 0x%08lu\n", (
long)fields.clock_status);
452 " GPS week: %lu Seconds: %f\n", (
long)fields.week, fields.week_seconds);
454 " Clock offset: %f (std dev = %e)\n", fields.clock_offset,
455 fields.clock_offset_std);
459 void Message_NV_OEM6_MARKTIME::dumpToStream(std::ostream&
out)
const 461 out <<
"[Novatel OEM6 MARKTIME]\n";
467 o <<
"gps_week.gps_ms clock_status week week_seconds utc_offset";
471 const Message_NV_OEM6_MARKTIME::content_t& fields, std::ostream& o)
474 "%u.%08u %u %lu %f %f", (
unsigned)fields.header.week,
475 (
unsigned)(fields.header.ms_in_week), (
unsigned)fields.clock_status,
476 (
long unsigned)fields.week, fields.week_seconds, fields.utc_offset);
484 void Message_NV_OEM6_MARK2TIME::dumpToStream(std::ostream&
out)
const 486 out <<
"[Novatel OEM6 MARK2TIME]\n";
488 *reinterpret_cast<const Message_NV_OEM6_MARKTIME::content_t*>(&fields),
493 o <<
"gps_week.gps_ms clock_status week week_seconds utc_offset";
499 *reinterpret_cast<const Message_NV_OEM6_MARKTIME::content_t*>(&fields),
505 void Message_NV_OEM6_MARKPOS::dumpToStream(std::ostream&
out)
const 507 out <<
"[Novatel OEM6 MARKPOSE]\n";
509 *reinterpret_cast<const Message_NV_OEM6_BESTPOS::content_t*>(&fields),
514 void Message_NV_OEM6_IONUTC::dumpToStream(std::ostream&
out)
const 516 out <<
"[Novatel NV_OEM6_IONUTC]\n";
518 " GPS week: %u ms in week: %u\n", (
unsigned)fields.header.week,
519 (
unsigned)(fields.header.ms_in_week));
521 " UTC ref week: %u Tot: %u\n", (
unsigned)fields.utc_wn,
522 (
unsigned)fields.tot);
524 " Leap seconds delta_t: %u future: %u\n", (
unsigned)fields.deltat_ls,
525 (
unsigned)fields.deltat_lsf);
insufficient observations
test distance exceeded (max of 3 rejections if distance > 10km)
not yet converged from cold start
std::string std::string format(std::string_view fmt, ARGS &&... args)
#define ASSERT_BELOW_(__A, __B)
when a fix position command is entered, the receiver computes its own position and determines if the ...
large residuals make position unreliable
const std::string & enum2str(int val)
for nv_position_type_t
GLenum GLenum GLuint components
ins doing its coarse alignment
void fixEndianness() override
height or velocity limits exceeded
#define ASSERT_EQUAL_(__A, __B)
Assert comparing two values, reporting their actual values upon failure.
nv_oem6_header_t header
Novatel frame: NV_OEM6_BESTPOS.
void generic_dump_BESTPOS(const Message_NV_OEM6_BESTPOS::content_t &fields, std::ostream &out)
singularity at parameters matrix
void generic_dump_MARKTIME(const Message_NV_OEM6_MARKTIME::content_t &fields, std::ostream &out)
GLsizei const GLchar ** string
GNSS (GPS) data structures, mainly for use within mrpt::obs::CObservationGPS.
bool getAllFieldDescriptions(std::ostream &o) const override
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::vision::TStereoCalibResults out
void generic_getFieldValues_MARKTIME(const Message_NV_OEM6_MARKTIME::content_t &fields, std::ostream &o)
covariance trace exceeds maximum (trace>1000m)
the fixed position entered using the fix position command is not valid
#define DEF_TYPESTR(_NAME)
bool getAllFieldValues(std::ostream &o) const override
delta position is too large