46 return "VectorNavBinaryConverter";
92 if (
auto* connectedPin = link.getConnectedPin())
94 outputPins.front().recreateLink(*connectedPin);
102 if (ImGui::Checkbox(fmt::format(
"Use compensated data##{}",
size_t(
id)).c_str(), &
_useCompensatedData))
111 ImGui::Combo(fmt::format(
"Data Source##{}",
size_t(
id)).c_str(), &posVelSource,
"Best\0INS\0GNSS 1\0GNSS 2\0\0"))
117 if (ImGui::Checkbox(fmt::format(
"Force static##{}",
size_t(
id)).c_str(), &
_forceStatic))
143 if (j.contains(
"outputType"))
176 if (j.contains(
"posVelSource"))
180 if (j.contains(
"forceStatic"))
184 if (j.contains(
"useCompensatedData"))
201 auto vnObs = std::static_pointer_cast<const VectorNavBinaryOutput>(queue.
extract_front());
203 std::shared_ptr<const NodeData> convertedData =
nullptr;
234 auto imuObs = std::make_shared<ImuObsWDelta>(vnObs->imuPos);
236 if (vnObs->gnss1Outputs || vnObs->gnss2Outputs)
238 if (!vnObs->timeOutputs
239 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)
240 || !vnObs->timeOutputs->timeStatus.dateOk()
241 || !vnObs->timeOutputs->timeStatus.timeOk()
242 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW)
243 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK))
247 imuObs->insTime =
InsTime(
InsTime_GPSweekTow(0,
static_cast<int32_t
>(vnObs->timeOutputs->gpsWeek),
static_cast<double>(vnObs->timeOutputs->gpsTow) * 1e-9L));
254 imuObs->insTime = vnObs->insTime;
257 bool accelFound =
false;
258 bool gyroFound =
false;
259 bool dThetaFound =
false;
260 bool dVelFound =
false;
261 if (vnObs->imuOutputs)
265 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG)
267 imuObs->p_magneticField = vnObs->imuOutputs->uncompMag.cast<
double>();
269 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL)
271 imuObs->p_acceleration = vnObs->imuOutputs->uncompAccel.cast<
double>();
274 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO)
276 imuObs->p_angularRate = vnObs->imuOutputs->uncompGyro.cast<
double>();
282 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_MAG)
284 imuObs->p_magneticField = vnObs->imuOutputs->mag.cast<
double>();
286 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL)
288 imuObs->p_acceleration = vnObs->imuOutputs->accel.cast<
double>();
291 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE)
293 imuObs->p_angularRate = vnObs->imuOutputs->angularRate.cast<
double>();
297 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_TEMP)
299 imuObs->temperature = vnObs->imuOutputs->temp;
301 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTATHETA)
303 imuObs->dtime = vnObs->imuOutputs->deltaTime;
304 imuObs->dtheta =
deg2rad(vnObs->imuOutputs->deltaTheta.cast<
double>());
307 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_DELTAVEL)
309 imuObs->dvel = vnObs->imuOutputs->deltaV.cast<
double>();
314 if (accelFound && gyroFound && dThetaFound && dVelFound)
319 LOG_ERROR(
"{}: Conversion failed. Need {} acceleration and gyroscope measurements and deltaTheta and deltaVel in the input data.",
326 auto imuObs = std::make_shared<ImuObs>(vnObs->imuPos);
328 if (vnObs->gnss1Outputs || vnObs->gnss2Outputs)
330 if (!vnObs->timeOutputs
331 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)
332 || !vnObs->timeOutputs->timeStatus.dateOk()
333 || !vnObs->timeOutputs->timeStatus.timeOk()
334 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW)
335 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK))
339 imuObs->insTime =
InsTime(
InsTime_GPSweekTow(0,
static_cast<int32_t
>(vnObs->timeOutputs->gpsWeek),
static_cast<double>(vnObs->timeOutputs->gpsTow) * 1e-9L));
346 imuObs->insTime = vnObs->insTime;
349 bool accelFound =
false;
350 bool gyroFound =
false;
351 if (vnObs->imuOutputs)
355 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPMAG)
357 imuObs->p_magneticField = vnObs->imuOutputs->uncompMag.cast<
double>();
359 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPACCEL)
361 imuObs->p_acceleration = vnObs->imuOutputs->uncompAccel.cast<
double>();
364 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_UNCOMPGYRO)
366 imuObs->p_angularRate = vnObs->imuOutputs->uncompGyro.cast<
double>();
372 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_MAG)
374 imuObs->p_magneticField = vnObs->imuOutputs->mag.cast<
double>();
376 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ACCEL)
378 imuObs->p_acceleration = vnObs->imuOutputs->accel.cast<
double>();
381 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_ANGULARRATE)
383 imuObs->p_angularRate = vnObs->imuOutputs->angularRate.cast<
double>();
387 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_TEMP)
389 imuObs->temperature = vnObs->imuOutputs->temp;
393 if (accelFound && gyroFound)
398 LOG_ERROR(
"{}: Conversion failed. Need {} acceleration and gyroscope measurements in the input data.",
nameId(),
_useCompensatedData ?
"compensated" :
"uncompensated");
404 auto baroPressObs = std::make_shared<BaroPressObs>();
406 if (vnObs->gnss1Outputs || vnObs->gnss2Outputs)
408 if (!vnObs->timeOutputs
409 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)
410 || !vnObs->timeOutputs->timeStatus.dateOk()
411 || !vnObs->timeOutputs->timeStatus.timeOk()
412 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW)
413 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK))
417 baroPressObs->insTime =
InsTime(
InsTime_GPSweekTow(0,
static_cast<int32_t
>(vnObs->timeOutputs->gpsWeek),
static_cast<double>(vnObs->timeOutputs->gpsTow) * 1e-9L));
424 baroPressObs->insTime = vnObs->insTime;
427 bool baroFound =
false;
428 if (vnObs->imuOutputs)
430 if (vnObs->imuOutputs->imuField & vn::protocol::uart::ImuGroup::IMUGROUP_PRES)
447 LOG_ERROR(
"{}: Conversion failed. No barometer pressure data found in the input data.",
nameId());
453 std::optional<Eigen::Quaterniond> n_Quat_b;
454 std::optional<Eigen::Vector3d> e_position;
455 std::optional<Eigen::Vector3d> lla_position;
456 std::optional<Eigen::Vector3d> n_velocity;
458 if (vnObs->attitudeOutputs)
460 if (vnObs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_QUATERNION)
462 n_Quat_b = vnObs->attitudeOutputs->qtn.cast<
double>();
464 else if (vnObs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_YAWPITCHROLL)
466 Eigen::Vector3d ypr =
deg2rad(vnObs->attitudeOutputs->ypr.cast<
double>());
469 else if (vnObs->attitudeOutputs->attitudeField & vn::protocol::uart::AttitudeGroup::ATTITUDEGROUP_DCM)
471 n_Quat_b = vnObs->attitudeOutputs->dcm.cast<
double>();
475 auto posVelAttObs = std::make_shared<PosVelAtt>();
482 if (!vnObs->timeOutputs
483 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_TIMESTATUS)
484 || !vnObs->timeOutputs->timeStatus.dateOk()
485 || !vnObs->timeOutputs->timeStatus.timeOk()
486 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSTOW)
487 || !(vnObs->timeOutputs->timeField & vn::protocol::uart::TimeGroup::TIMEGROUP_GPSWEEK))
492 posVelAttObs->insTime =
InsTime(
InsTime_GPSweekTow(0,
static_cast<int32_t
>(vnObs->timeOutputs->gpsWeek),
static_cast<double>(vnObs->timeOutputs->gpsTow) * 1e-9L));
494 if (vnObs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSLLA)
496 lla_position = {
deg2rad(vnObs->insOutputs->posLla(0)),
497 deg2rad(vnObs->insOutputs->posLla(1)),
498 vnObs->insOutputs->posLla(2) };
500 if (vnObs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_POSECEF)
502 e_position = vnObs->insOutputs->posEcef;
505 if (vnObs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELNED)
507 n_velocity = vnObs->insOutputs->velNed.cast<
double>();
509 else if ((vnObs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELECEF)
510 && (e_position.has_value() || lla_position.has_value()))
512 Eigen::Vector3d lla = lla_position.has_value() ? lla_position.value() :
trafo::ecef2lla_WGS84(e_position.value());
513 n_velocity =
trafo::n_Quat_e(lla(0), lla(1)) * vnObs->insOutputs->velEcef.cast<
double>();
515 else if ((vnObs->insOutputs->insField & vn::protocol::uart::InsGroup::INSGROUP_VELBODY)
516 && n_Quat_b.has_value())
518 n_velocity = n_Quat_b.value() * vnObs->insOutputs->velBody.cast<
double>();
523 && vnObs->gnss1Outputs && vnObs->gnss1Outputs->fix >= 2)
525 if (!vnObs->gnss1Outputs
526 || !vnObs->gnss1Outputs->timeInfo.status.timeOk()
527 || !vnObs->gnss1Outputs->timeInfo.status.dateOk())
532 posVelAttObs->insTime =
InsTime(
InsTime_GPSweekTow(0,
static_cast<int32_t
>(vnObs->gnss1Outputs->week),
static_cast<double>(vnObs->gnss1Outputs->tow) * 1e-9L));
534 if (!e_position.has_value() && !lla_position.has_value())
536 if (vnObs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)
538 lla_position = {
deg2rad(vnObs->gnss1Outputs->posLla(0)),
539 deg2rad(vnObs->gnss1Outputs->posLla(1)),
540 vnObs->gnss1Outputs->posLla(2) };
542 if (vnObs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)
544 e_position = vnObs->gnss1Outputs->posEcef;
548 if (!n_velocity.has_value())
550 if (vnObs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)
552 n_velocity = vnObs->gnss1Outputs->velNed.cast<
double>();
554 else if ((vnObs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)
555 && (e_position.has_value() || lla_position.has_value()))
557 Eigen::Vector3d lla = lla_position.has_value() ? lla_position.value() :
trafo::ecef2lla_WGS84(e_position.value());
558 n_velocity =
trafo::n_Quat_e(lla(0), lla(1)) * vnObs->gnss1Outputs->velEcef.cast<
double>();
563 && vnObs->gnss2Outputs && vnObs->gnss2Outputs->fix >= 2)
565 if (!vnObs->gnss2Outputs
566 || !vnObs->gnss2Outputs->timeInfo.status.timeOk()
567 || !vnObs->gnss2Outputs->timeInfo.status.dateOk())
572 posVelAttObs->insTime =
InsTime(
InsTime_GPSweekTow(0,
static_cast<int32_t
>(vnObs->gnss2Outputs->week),
static_cast<double>(vnObs->gnss2Outputs->tow) * 1e-9L));
574 if (!e_position.has_value() && !lla_position.has_value())
576 if (vnObs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSLLA)
578 lla_position = {
deg2rad(vnObs->gnss2Outputs->posLla(0)),
579 deg2rad(vnObs->gnss2Outputs->posLla(1)),
580 vnObs->gnss2Outputs->posLla(2) };
582 if (vnObs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_POSECEF)
584 e_position = vnObs->gnss2Outputs->posEcef;
588 if (!n_velocity.has_value())
590 if (vnObs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELNED)
592 n_velocity = vnObs->gnss2Outputs->velNed.cast<
double>();
594 else if ((vnObs->gnss2Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_VELECEF)
595 && (e_position.has_value() || lla_position.has_value()))
597 Eigen::Vector3d lla = lla_position.has_value() ? lla_position.value() :
trafo::ecef2lla_WGS84(e_position.value());
598 n_velocity =
trafo::n_Quat_e(lla(0), lla(1)) * vnObs->gnss2Outputs->velEcef.cast<
double>();
603 if ((e_position.has_value() || lla_position.has_value()) && n_velocity.has_value())
605 if (e_position.has_value())
607 posVelAttObs->setPosition_e(e_position.value());
611 posVelAttObs->setPosition_lla(lla_position.value());
613 posVelAttObs->setVelocity_n(n_velocity.value());
615 if (!n_Quat_b.has_value())
617 LOG_DEBUG(
"{}: Conversion succeeded but has no attitude info.",
nameId());
621 posVelAttObs->setAttitude_n_Quat_b(n_Quat_b.value());
632 posVelAttObs->setVelocity_n(Eigen::Vector3d::Zero());
639 LOG_ERROR(
"{}: Conversion failed. No position or velocity data found in the input data.",
nameId());
645 auto gnssObs = std::make_shared<GnssObs>();
647 if (!vnObs->gnss1Outputs
648 || !vnObs->gnss1Outputs->timeInfo.status.timeOk()
649 || !vnObs->gnss1Outputs->timeInfo.status.dateOk())
654 gnssObs->insTime =
InsTime(
InsTime_GPSweekTow(0,
static_cast<int32_t
>(vnObs->gnss1Outputs->raw.week), vnObs->gnss1Outputs->raw.tow));
656 if (vnObs->gnss1Outputs)
658 if (vnObs->gnss1Outputs->gnssField & vn::protocol::uart::GpsGroup::GPSGROUP_RAWMEAS)
660 for (
const auto& satRaw : vnObs->gnss1Outputs->raw.satellites)
662 bool skipMeasurement =
false;
679 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' is not supported yet. Skipping measurement.", satRaw.sys);
680 skipMeasurement =
true;
689 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' is not supported yet. Skipping measurement.", satRaw.sys);
690 skipMeasurement =
true;
733 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
734 skipMeasurement =
true;
773 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
774 skipMeasurement =
true;
792 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
793 skipMeasurement =
true;
798 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq);
799 skipMeasurement =
true;
814 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
815 skipMeasurement =
true;
833 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
834 skipMeasurement =
true;
839 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq);
840 skipMeasurement =
true;
867 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
868 skipMeasurement =
true;
886 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
887 skipMeasurement =
true;
905 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
906 skipMeasurement =
true;
924 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
925 skipMeasurement =
true;
943 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
944 skipMeasurement =
true;
949 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq);
950 skipMeasurement =
true;
971 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
972 skipMeasurement =
true;
993 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
994 skipMeasurement =
true;
1000 switch (satRaw.chan)
1012 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
1013 skipMeasurement =
true;
1018 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq);
1019 skipMeasurement =
true;
1024 switch (satRaw.freq)
1028 switch (satRaw.chan)
1043 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
1044 skipMeasurement =
true;
1050 switch (satRaw.chan)
1062 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
1063 skipMeasurement =
true;
1069 switch (satRaw.chan)
1081 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
1082 skipMeasurement =
true;
1088 switch (satRaw.chan)
1100 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
1101 skipMeasurement =
true;
1106 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq);
1107 skipMeasurement =
true;
1112 switch (satRaw.freq)
1116 switch (satRaw.chan)
1125 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
1126 skipMeasurement =
true;
1132 switch (satRaw.chan)
1141 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' channel '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq, satRaw.chan);
1142 skipMeasurement =
true;
1147 LOG_TRACE(
"VectorNav SatRawElement satellite system '{}' frequency '{}' is not supported yet. Skipping measurement.", satRaw.sys, satRaw.freq);
1148 skipMeasurement =
true;
1154 skipMeasurement =
true;
1158 if (skipMeasurement)
1163 (*gnssObs)(
SatSigId(code, satRaw.svId)).pseudorange = { .value = satRaw.pr };
1164 (*gnssObs)(
SatSigId(code, satRaw.svId)).carrierPhase = { .value = satRaw.cp };
1165 (*gnssObs)(
SatSigId(code, satRaw.svId)).doppler = satRaw.dp;
1166 (*gnssObs)(
SatSigId(code, satRaw.svId)).CN0 = satRaw.cno;
1184 return "ImuObsWDelta";
1186 return "BaroPressObs";
Barometric Pressure Storage Class.
Transformation collection.
Combo representing an enumeration.
nlohmann::json json
json namespace
The class is responsible for all time-related tasks.
Utility class for logging to console and file.
#define LOG_DEBUG
Debug information. Should not be called on functions which receive observations (spamming)
#define LOG_ERROR
Error occurred, which stops part of the program to work, but not everything.
#define LOG_TRACE
Detailled info to trace the execution of the program. Should not be called on functions which receive...
constexpr double SCALE_FACTOR_KILO2HECTOPASCAL
Scale factor to kPa to hPa.
Converts VectorNavBinaryOutput.
static std::string type()
Returns the type of the data class.
Enumerate for GNSS Codes.
@ G2P
GPS L2 - P-code (unencrypted)
@ B7I
BeiDou B2b (BDS-2) - B2I(OS)
@ J2L
QZSS L2 - L2C-code (long)
@ G1L
GPS L1 - L1C-P (pilot)
@ G2D
GPS L2 - Semi-codeless P(Y) tracking (L1 C/A + (P2-P1))
@ J6L
QZSS L6 - L6P LEX signal (long)
@ G1Y
GPS L1 - Y-code (with decryption)
@ G1X
GPS L1 - L1C-(D+P) (combined)
@ G2X
GPS L2 - L2C(M+L) (combined)
@ J6X
QZSS L6 - L6(D+P) LEX signal (combined)
@ E6X
GAL E6 - Combined (B+C)
@ J1L
QZSS L1 - L1C (pilot)
@ J1S
QZSS L1 - L1C (data)
@ J1X
QZSS L1 - L1C (combined)
@ E8X
GAL E5(a+b) - AltBOC (combined)
@ G2Y
GPS L2 - Y-code (with decryption)
@ E1Z
GAL E1 - PRS + OS (data + pilot)
@ G1P
GPS L1 - P-code (unencrypted)
@ J2X
QZSS L2 - L2C-code (combined)
@ G1W
GPS L1 - Semicodeless P(Y) tracking (Z-tracking)
@ G2L
GPS L2 - L2C(L) (long)
@ E8I
GAL E5(a+b) - AltBOC (data)
@ G2W
GPS L2 - Semicodeless P(Y) tracking (Z-tracking)
@ E1A
GAL E1 - PRS signal.
@ E8Q
GAL E5(a+b) - AltBOC (pilot)
@ J6S
QZSS L6 - L6D LEX signal (short)
@ B6X
BeiDou B3 - B3I, B3Q, combined.
@ B7X
BeiDou B2b (BDS-2) - B2I(OS), B2Q, combined.
@ E1X
GAL E1 - OS(B+C) (combined)
@ B2I
BeiDou B1-2 - B1I(OS)
@ B7Q
BeiDou B2b (BDS-2) - B2Q.
@ G1S
GPS L1 - L1C-D (data)
@ B2X
BeiDou B1-2 - B1I(OS), B1Q, combined.
@ G2S
GPS L2 - L2C(M) (medium)
@ J2S
QZSS L2 - L2C-code (medium)
Frequency definition for different satellite systems.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
The class is responsible for all time-related tasks.
ImVec2 _guiConfigDefaultWindowSize
std::vector< OutputPin > outputPins
List of output pins.
Node(std::string name)
Constructor.
OutputPin * CreateOutputPin(const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier, OutputPin::PinData data=static_cast< void * >(nullptr), int idx=-1)
Create an Output Pin object.
std::string nameId() const
Node name and id.
std::string name
Name of the Node.
InputPin * CreateInputPin(const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier={}, InputPin::Callback callback=static_cast< InputPin::FlowFirableCallbackFunc >(nullptr), InputPin::FlowFirableCheckFunc firable=nullptr, int priority=0, int idx=-1)
Create an Input Pin object.
void invokeCallbacks(size_t portIndex, const std::shared_ptr< const NodeData > &data)
Calls all registered callbacks on the specified output port.
bool _hasConfig
Flag if the config window should be shown.
static std::string type()
Returns the type of the data class.
auto extract_front()
Returns a copy of the first element in the container and removes it from the container.
VectorNavBinaryConverter()
Default constructor.
static std::shared_ptr< const GnssObs > convert2GnssObs(const std::shared_ptr< const VectorNavBinaryOutput > &vnObs)
Converts the VectorNavBinaryOutput to a GnssObs observation.
std::shared_ptr< const ImuObs > convert2ImuObs(const std::shared_ptr< const VectorNavBinaryOutput > &vnObs) const
Converts the VectorNavBinaryOutput to a ImuObs observation.
OutputType _outputType
The selected output type in the GUI.
std::shared_ptr< const PosVelAtt > convert2PosVelAtt(const std::shared_ptr< const VectorNavBinaryOutput > &vnObs)
Converts the VectorNavBinaryOutput to a PosVelAtt observation.
OutputType
Enum specifying the type of the output message.
@ ImuObsWDelta
Extract ImuObsWDelta data.
@ GnssObs
Extract GnssObs data.
@ COUNT
Number of items in the enum.
@ PosVelAtt
Extract PosVelAtt data.
@ BaroPressObs
Extract BaroPressObs data.
@ ImuObs
Extract ImuObs data.
void receiveObs(InputPin::NodeDataQueue &queue, size_t pinIdx)
Converts the VectorNavBinaryOutput observation to the selected message type.
static constexpr size_t OUTPUT_PORT_INDEX_CONVERTED
Flow.
static std::string category()
String representation of the Class Category.
std::shared_ptr< const PosVelAtt > _posVelAtt__init
Position, Velocity and Attitude at initialization (needed for static data)
void restore(const json &j) override
Restores the node from a json object.
static std::string typeStatic()
String representation of the Class Type.
std::shared_ptr< const ImuObsWDelta > convert2ImuObsWDelta(const std::shared_ptr< const VectorNavBinaryOutput > &vnObs) const
Converts the VectorNavBinaryOutput to a ImuObsWDelta observation.
json save() const override
Saves the node into a json object.
std::shared_ptr< const BaroPressObs > convert2BaroPressObs(const std::shared_ptr< const VectorNavBinaryOutput > &vnObs) const
Converts the VectorNavBinaryOutput to a BaroPressObs observation.
~VectorNavBinaryConverter() override
Destructor.
PosVelSource _posVelSource
The selected PosVel source in the GUI.
std::string type() const override
String representation of the Class Type.
bool _forceStatic
GUI option. If checked forces position to a static value and velocity to 0.
bool _useCompensatedData
Whether to extract the compensated data or the uncompensated.
bool initialize() override
Initialize the node.
void guiConfig() override
ImGui config window which is shown on double click.
@ PosVelSource_Best
INS > GNSS1 > GNSS2.
@ PosVelSource_Gnss2
Take only GNSS2 values into account.
@ PosVelSource_Gnss1
Take only GNSS1 values into account.
@ PosVelSource_Ins
Take only INS values into account.
static std::string type()
Returns the type of the data class.
@ Aligning
INS Filter is dynamically aligning.
void ApplyChanges()
Signals that there have been changes to the flow.
Eigen::Vector3< typename Derived::Scalar > ecef2lla_WGS84(const Eigen::MatrixBase< Derived > &e_position)
Converts Earth-centered-Earth-fixed coordinates into latitude, longitude and altitude using WGS84.
Eigen::Quaternion< Scalar > n_Quat_e(const Scalar &latitude, const Scalar &longitude)
Quaternion for rotations from Earth-fixed to navigation frame.
Eigen::Quaternion< Scalar > n_Quat_b(Scalar roll, Scalar pitch, Scalar yaw)
Quaternion for rotations from body to navigation frame.
@ E07
Galileo E5b (1207.14 MHz).
@ J01
QZSS L1 (1575.42 MHz).
@ S01
SBAS L1 (1575.42 MHz).
@ E06
Galileo E6 (1278.75 MHz).
@ R02
GLONASS, "G2" (1246 MHz).
@ B08
Beidou B2 (B2a + B2b) (1191.795MHz).
@ E01
Galileo, "E1" (1575.42 MHz).
@ B06
Beidou B3 (1268.52 MHz).
@ E05
Galileo E5a (1176.45 MHz).
@ S05
SBAS L5 (1176.45 MHz).
@ G02
GPS L2 (1227.6 MHz).
@ R01
GLONASS, "G1" (1602 MHZ).
@ G01
GPS L1 (1575.42 MHz).
@ B01
Beidou B1 (1575.42 MHz).
@ J05
QZSS L5 (1176.45 MHz).
@ J02
QZSS L2 (1227.6 MHz).
@ E08
Galileo E5 (E5a + E5b) (1191.795MHz).
@ J06
QZSS L6 / LEX (1278.75 MHz).
@ G05
GPS L5 (1176.45 MHz).
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
constexpr auto deg2rad(const T °)
Convert Degree to Radians.
SatelliteSystem_
Satellite System enumeration.
@ GPS
Global Positioning System.
@ QZSS
Quasi-Zenith Satellite System.
@ GLO
Globalnaja nawigazionnaja sputnikowaja sistema (GLONASS)
@ SBAS
Satellite Based Augmentation System.
@ SatSys_None
No Satellite system.
@ IRNSS
Indian Regional Navigation Satellite System.
GPS week and time of week in GPS standard time [GPST].
Identifies a satellite signal (satellite frequency and number)
@ E6
E6(GAL), LEX(QZSS), B3(BDS)
@ L5
L5(GPS,QZSS,SBAS), E5a(GAL)
@ L2
L2(GPS,QZSS), G2(GLO)
@ L1
L1(GPS,QZSS,SBAS), G1(GLO), E2-L1-E1(GAL), B1(BDS)
@ Q_Chan
Q chan (GPS,GAL,QZSS,BDS)
@ SemiCodeless
semi-codeless (GPS)
@ I_Chan
I chan (GPS,GAL,QZSS,BDS)
@ L_Chan
L chan (L2CGPS, L2CQZSS), P chan (GPS,QZSS)
@ BC_Chan
B+C chan (GAL), I+Q chan (GPS,GAL,QZSS,BDS), M+L chan (GPS,QZSS), D+P chan (GPS,QZSS)
@ CA_Code
C/A-code (GPS,GLO,SBAS,QZSS), C chan (GAL)
@ M_Chan
M chan (L2CGPS, L2CQZSS), D chan (GPS,QZSS)
@ Z_Tracking
based on Z-tracking (GPS)