54 [[nodiscard]] std::string
type()
const override;
70 constexpr static size_t INPUT_PORT_INDEX_IMU = 0;
71 constexpr static size_t INPUT_PORT_INDEX_GNSS_OBS = 1;
72 constexpr static size_t INPUT_PORT_INDEX_POS_VEL_ATT_INIT = 2;
73 constexpr static size_t INPUT_PORT_INDEX_GNSS_NAV_INFO = 2;
74 constexpr static size_t OUTPUT_PORT_INDEX_SOLUTION = 0;
75 constexpr static size_t OUTPUT_PORT_INDEX_x = 1;
76 constexpr static size_t OUTPUT_PORT_INDEX_P = 2;
77 constexpr static size_t OUTPUT_PORT_INDEX_Phi = 3;
78 constexpr static size_t OUTPUT_PORT_INDEX_Q = 4;
79 constexpr static size_t OUTPUT_PORT_INDEX_z = 5;
80 constexpr static size_t OUTPUT_PORT_INDEX_H = 6;
81 constexpr static size_t OUTPUT_PORT_INDEX_R = 7;
82 constexpr static size_t OUTPUT_PORT_INDEX_K = 8;
85 bool initialize()
override;
88 void deinitialize()
override;
92 void invokeCallbackWithPosVelAtt(
const PosVelAtt& posVelAtt);
113 void tightlyCoupledPrediction(
const std::shared_ptr<const PosVelAtt>& inertialNavSol,
double tau_i,
const ImuPos& imuPos);
117 void tightlyCoupledUpdate(
const std::shared_ptr<const GnssObs>& gnssObservation);
120 void addKalmanMatricesPins();
123 void removeKalmanMatricesPins();
126 void updateExternalPvaInitPin();
129 int _dragAndDropPinIndex = -1;
131 size_t _nNavInfoPins = 1;
133 void updateNumberOfInputPins();
138 bool _preferAccelerationOverDeltaMeasurements =
false;
141 std::shared_ptr<const ImuObs> _lastImuObs =
nullptr;
144 std::array<double, 3> _initalRollPitchYaw{};
146 bool _initializeStateOverExternalPin{};
148 InsTime _externalInitTime;
151 ReceiverClock _recvClk;
154 Frequency _filterFreq = G01;
156 Code _filterCode = Code_Default;
158 std::vector<SatId> _excludedSatellites;
160 double _elevationMask =
static_cast<double>(15.0_deg);
163 IonosphereModel _ionosphereModel = IonosphereModel::Klobuchar;
166 TroposphereModelSelection _troposphereModels;
169 std::vector<SPP::States::StateKeyTypes> _interSysErrs{};
172 std::vector<SPP::States::StateKeyTypes> _interSysDrifts{};
175 InsTime _lastEpochTime;
178 KalmanFilter _kalmanFilter{ 17, 8 };
185 bool _showKalmanFilterOutputPins =
false;
188 bool _checkKalmanMatricesRanks =
true;
195 Eigen::Vector3d _b_leverArm_InsGnss{ 0.0, 0.0, 0.0 };
200 enum class StdevAccelNoiseUnits
206 StdevAccelNoiseUnits _stdevAccelNoiseUnits = StdevAccelNoiseUnits::mg_sqrtHz;
210 Eigen::Vector3d _stdev_ra = 0.04 * Eigen::Vector3d::Ones();
215 enum class StdevGyroNoiseUnits
221 StdevGyroNoiseUnits _stdevGyroNoiseUnits = StdevGyroNoiseUnits::deg_hr_sqrtHz;
225 Eigen::Vector3d _stdev_rg = 5 * Eigen::Vector3d::Ones();
230 enum class StdevAccelBiasUnits
236 StdevAccelBiasUnits _stdevAccelBiasUnits = StdevAccelBiasUnits::microg;
240 Eigen::Vector3d _stdev_bad = 10 * Eigen::Vector3d::Ones();
243 Eigen::Vector3d _tau_bad = 0.1 * Eigen::Vector3d::Ones();
248 enum class StdevGyroBiasUnits
254 StdevGyroBiasUnits _stdevGyroBiasUnits = StdevGyroBiasUnits::deg_h;
258 Eigen::Vector3d _stdev_bgd = 1 * Eigen::Vector3d::Ones();
261 Eigen::Vector3d _tau_bgd = 0.1 * Eigen::Vector3d::Ones();
266 enum class StdevClockPhaseUnits
271 StdevClockPhaseUnits _stdevClockPhaseUnits = StdevClockPhaseUnits::m_sqrtHz;
275 double _stdev_cp = 0 ;
280 enum class StdevClockFreqUnits
285 StdevClockFreqUnits _stdevClockFreqUnits = StdevClockFreqUnits::m_s_sqrtHz;
289 double _stdev_cf = 5 ;
323 enum class RandomProcess
336 RandomProcess _randomProcessAccel = RandomProcess::RandomWalk;
338 RandomProcess _randomProcessGyro = RandomProcess::RandomWalk;
343 enum class InitCovarianceClockPhaseUnit
351 InitCovarianceClockPhaseUnit _initCovariancePhaseUnit = InitCovarianceClockPhaseUnit::m;
354 double _initCovariancePhase{ 5 };
359 enum class InitCovarianceClockFreqUnit
365 InitCovarianceClockFreqUnit _initCovarianceFreqUnit = InitCovarianceClockFreqUnit::m_s;
368 double _initCovarianceFreq{ 5 };
373 enum class InitCovariancePositionUnit
381 InitCovariancePositionUnit _initCovariancePositionUnit = InitCovariancePositionUnit::meter;
384 Eigen::Vector3d _initCovariancePosition{ 100, 100, 100 };
389 enum class InitCovarianceVelocityUnit
395 InitCovarianceVelocityUnit _initCovarianceVelocityUnit = InitCovarianceVelocityUnit::m_s;
398 Eigen::Vector3d _initCovarianceVelocity{ 10, 10, 10 };
403 enum class InitCovarianceAttitudeAnglesUnit
411 InitCovarianceAttitudeAnglesUnit _initCovarianceAttitudeAnglesUnit = InitCovarianceAttitudeAnglesUnit::deg;
414 Eigen::Vector3d _initCovarianceAttitudeAngles{ 10, 10, 10 };
419 enum class InitCovarianceBiasAccelUnit
425 InitCovarianceBiasAccelUnit _initCovarianceBiasAccelUnit = InitCovarianceBiasAccelUnit::m_s2;
428 Eigen::Vector3d _initCovarianceBiasAccel{ 1, 1, 1 };
433 enum class InitCovarianceBiasGyroUnit
441 InitCovarianceBiasGyroUnit _initCovarianceBiasGyroUnit = InitCovarianceBiasGyroUnit::deg_s;
444 Eigen::Vector3d _initCovarianceBiasGyro{ 0.5, 0.5, 0.5 };
449 enum class PhiCalculationAlgorithm
455 PhiCalculationAlgorithm _phiCalculationAlgorithm = PhiCalculationAlgorithm::Taylor;
458 int _phiCalculationTaylorOrder = 2;
461 enum class QCalculationAlgorithm
467 QCalculationAlgorithm _qCalculationAlgorithm = QCalculationAlgorithm::Taylor1;
472 enum class InitBiasAccelUnit
477 InitBiasAccelUnit _initBiasAccelUnit = InitBiasAccelUnit::m_s2;
480 Eigen::Vector3d _initBiasAccel{ 0.0, 0.0, 0.0 };
485 enum class InitBiasGyroUnit
491 InitBiasGyroUnit _initBiasGyroUnit = InitBiasGyroUnit::deg_s;
494 Eigen::Vector3d _initBiasGyro{ 0.0, 0.0, 0.0 };
515 [[nodiscard]] Eigen::Matrix<double, 17, 17> n_systemMatrix_F(
const Eigen::Quaterniond& n_Quat_b,
516 const Eigen::Vector3d& b_specForce_ib,
517 const Eigen::Vector3d& n_omega_in,
518 const Eigen::Vector3d& n_velocity,
519 const Eigen::Vector3d& lla_position,
524 const Eigen::Vector3d& tau_bad,
525 const Eigen::Vector3d& tau_bgd)
const;
537 [[nodiscard]] Eigen::Matrix<double, 17, 17> e_systemMatrix_F(
const Eigen::Quaterniond& e_Quat_b,
538 const Eigen::Vector3d& b_specForce_ib,
539 const Eigen::Vector3d& e_position,
540 const Eigen::Vector3d& e_gravitation,
542 const Eigen::Vector3d& e_omega_ie,
543 const Eigen::Vector3d& tau_bad,
544 const Eigen::Vector3d& tau_bgd)
const;
552 [[nodiscard]]
static Eigen::Matrix<double, 17, 14> noiseInputMatrix_G(
const Eigen::Quaterniond& ien_Quat_b);
564 [[nodiscard]] Eigen::Matrix<double, 14, 14> noiseScaleMatrix_W(
const Eigen::Vector3d& sigma2_ra,
const Eigen::Vector3d& sigma2_rg,
565 const Eigen::Vector3d& sigma2_bad,
const Eigen::Vector3d& sigma2_bgd,
566 const Eigen::Vector3d& tau_bad,
const Eigen::Vector3d& tau_bgd,
567 const double& sigma2_cPhi,
const double& sigma2_cf);
583 [[nodiscard]]
static Eigen::Matrix<double, 17, 17> n_systemNoiseCovarianceMatrix_Q(
const Eigen::Vector3d& sigma2_ra,
const Eigen::Vector3d& sigma2_rg,
584 const Eigen::Vector3d& sigma2_bad,
const Eigen::Vector3d& sigma2_bgd,
585 const Eigen::Vector3d& tau_bad,
const Eigen::Vector3d& tau_bgd,
586 const double& sigma2_cPhi,
const double& sigma2_cf,
587 const Eigen::Matrix3d& n_F_21,
const Eigen::Matrix3d& T_rn_p,
588 const Eigen::Matrix3d& n_Dcm_b,
const double& tau_s);
603 [[nodiscard]]
static Eigen::Matrix<double, 17, 17> e_systemNoiseCovarianceMatrix_Q(
const Eigen::Vector3d& sigma2_ra,
const Eigen::Vector3d& sigma2_rg,
604 const Eigen::Vector3d& sigma2_bad,
const Eigen::Vector3d& sigma2_bgd,
605 const Eigen::Vector3d& tau_bad,
const Eigen::Vector3d& tau_bgd,
606 const double& sigma2_cPhi,
const double& sigma2_cf,
607 const Eigen::Matrix3d& e_F_21,
608 const Eigen::Matrix3d& e_Dcm_b,
const double& tau_s);
621 [[nodiscard]] Eigen::Matrix<double, 17, 17> initialErrorCovarianceMatrix_P0(
const Eigen::Vector3d& variance_angles,
622 const Eigen::Vector3d& variance_vel,
623 const Eigen::Vector3d& variance_pos,
624 const Eigen::Vector3d& variance_accelBias,
625 const Eigen::Vector3d& variance_gyroBias,
626 const double& variance_clkPhase,
627 const double& variance_clkFreq)
const;
640 [[nodiscard]]
static Eigen::MatrixXd n_measurementMatrix_H(
const double& R_N,
642 const Eigen::Vector3d& lla_position,
643 const std::vector<Eigen::Vector3d>& n_lineOfSightUnitVectors,
644 std::vector<double>& pseudoRangeRateObservations);
651 [[nodiscard]]
static Eigen::MatrixXd measurementNoiseCovariance_R(
const double& sigma_rhoZ,
652 const double& sigma_rZ,
653 const std::vector<double>& satElevation);
663 [[nodiscard]]
static double sigma2(
const double& satElevation,
664 const double& sigma_Z,
665 const double& sigma_C,
666 const double& sigma_A,
668 const double& rangeAccel);
676 [[nodiscard]]
static Eigen::MatrixXd measurementInnovation_dz(
const std::vector<double>& pseudoRangeObservations,
677 const std::vector<double>& pseudoRangeEstimates,
678 const std::vector<double>& pseudoRangeRateObservations,
679 const std::vector<double>& pseudoRangeRateEstimates);