53 [[nodiscard]] std::string
type()
const override;
70 constexpr static size_t OUTPUT_PORT_INDEX_POS_VEL_ATT = 0;
73 int _inputPinIdxIMU = -1;
75 int _inputPinIdxGNSS = -1;
78 bool initialize()
override;
81 void deinitialize()
override;
101 void receiveUbloxObs(
const std::shared_ptr<const UbloxObs>& obs);
105 void receivePosObs(
const std::shared_ptr<const Pos>& obs);
109 void receivePosVelObs(
const std::shared_ptr<const PosVel>& obs);
113 void receivePosVelAttObs(
const std::shared_ptr<const PosVelAtt>& obs);
117 [[nodiscard]] std::shared_ptr<const NodeData> pollPVASolution();
120 double _initDuration = 5.0;
123 uint64_t _startTime = 0;
126 enum class AttitudeMode
137 friend constexpr const char*
to_string(AttitudeMode attitudeMode);
140 AttitudeMode _attitudeMode = AttitudeMode::BOTH;
143 bool _overridePosition =
false;
148 double _positionAccuracyThreshold = 10;
150 std::array<double, 3> _lastPositionAccuracy = { std::numeric_limits<double>::infinity(),
151 std::numeric_limits<double>::infinity(),
152 std::numeric_limits<double>::infinity() };
155 enum class VelocityOverride
166 friend constexpr const char*
to_string(VelocityOverride velOverride);
169 VelocityOverride _overrideVelocity = VelocityOverride::OFF;
171 Eigen::Vector3d _overrideVelocityValues = Eigen::Vector3d::Zero();
173 double _velocityAccuracyThreshold = 10;
175 std::array<double, 3> _lastVelocityAccuracy = { std::numeric_limits<double>::infinity(),
176 std::numeric_limits<double>::infinity(),
177 std::numeric_limits<double>::infinity() };
180 double _countAveragedAttitude = 0.0;
182 std::array<double, 3> _averagedAttitude = { 0.0, 0.0, 0.0 };
184 std::array<bool, 3> _overrideRollPitchYaw = {
false,
false,
false };
186 std::array<double, 3> _overrideRollPitchYawValues = {};
189 std::array<bool, 4> _posVelAttInitialized = {
false,
false,
false,
false };
192 gui::widgets::TimeEditFormat _initTimeEditFormat;
195 InsTime _initTime = InsTime(InsTime_GPSweekTow(0, 0, 0));
197 Eigen::Quaterniond _n_Quat_b_init;
199 Eigen::Vector3d _e_initPosition;
201 Eigen::Vector3d _n_initVelocity;
207constexpr const char*
to_string(PosVelAttInitializer::AttitudeMode attitudeMode)
209 switch (attitudeMode)
211 case NAV::PosVelAttInitializer::AttitudeMode::BOTH:
213 case NAV::PosVelAttInitializer::AttitudeMode::IMU:
215 case NAV::PosVelAttInitializer::AttitudeMode::GNSS:
217 case NAV::PosVelAttInitializer::AttitudeMode::COUNT:
226constexpr const char*
to_string(PosVelAttInitializer::VelocityOverride velOverride)
230 case NAV::PosVelAttInitializer::VelocityOverride::OFF:
232 case NAV::PosVelAttInitializer::VelocityOverride::ECEF:
234 case NAV::PosVelAttInitializer::VelocityOverride::NED:
236 case NAV::PosVelAttInitializer::VelocityOverride::COUNT: