17#include <Eigen/src/Core/Matrix.h>
27 [[nodiscard]]
static std::string
type()
34 [[nodiscard]] std::string
getType()
const override {
return type(); }
50 desc.emplace_back(
"Velocity norm [m/s]");
51 desc.emplace_back(
"X velocity ECEF [m/s]");
52 desc.emplace_back(
"Y velocity ECEF [m/s]");
53 desc.emplace_back(
"Z velocity ECEF [m/s]");
54 desc.emplace_back(
"North velocity [m/s]");
55 desc.emplace_back(
"East velocity [m/s]");
56 desc.emplace_back(
"Down velocity [m/s]");
57 desc.emplace_back(
"X velocity ECEF StDev [m/s]");
58 desc.emplace_back(
"Y velocity ECEF StDev [m/s]");
59 desc.emplace_back(
"Z velocity ECEF StDev [m/s]");
60 desc.emplace_back(
"XY velocity StDev [m]");
61 desc.emplace_back(
"XZ velocity StDev [m]");
62 desc.emplace_back(
"YZ velocity StDev [m]");
63 desc.emplace_back(
"North velocity StDev [m/s]");
64 desc.emplace_back(
"East velocity StDev [m/s]");
65 desc.emplace_back(
"Down velocity StDev [m/s]");
66 desc.emplace_back(
"NE velocity StDev [m]");
67 desc.emplace_back(
"ND velocity StDev [m]");
68 desc.emplace_back(
"ED velocity StDev [m]");
84 [[nodiscard]] std::optional<double>
getValueAt(
size_t idx)
const override
150 [[nodiscard]]
bool setValueAt(
size_t idx,
double value)
override
239 template<
typename Derived>
248 template<
typename Derived>
258 template<
typename DerivedP,
typename DerivedV>
268 template<
typename DerivedP,
typename DerivedV>
279 template<
typename DerivedP,
typename DerivedV,
typename Derived>
281 const Eigen::MatrixBase<Derived>& e_covarianceMatrix)
292 template<
typename DerivedP,
typename DerivedV,
typename Derived>
294 const Eigen::MatrixBase<Derived>& n_covarianceMatrix)
304 template<
typename Derived>
313 Eigen::Quaterniond n_q_e =
n_Quat_e();
314 Eigen::Matrix<double, 6, 6> J = Eigen::Matrix<double, 6, 6>::Zero();
315 J.block<3, 3>(0, 0) = n_q_e.toRotationMatrix();
316 J.block<3, 3>(3, 3) = n_q_e.toRotationMatrix();
325 template<
typename Derived>
334 Eigen::Quaterniond e_q_n =
e_Quat_n();
335 Eigen::Matrix<double, 6, 6> J = Eigen::Matrix<double, 6, 6>::Zero();
336 J.block<3, 3>(0, 0) = e_q_n.toRotationMatrix();
337 J.block<3, 3>(3, 3) = e_q_n.toRotationMatrix();
349 Eigen::Vector3d
_e_velocity{ std::nan(
""), std::nan(
""), std::nan(
"") };
351 Eigen::Vector3d
_n_velocity{ std::nan(
""), std::nan(
""), std::nan(
"") };
#define INS_ASSERT(_EXPR)
Assert function wrapper.
Definition Assert.h:19
#define INS_ASSERT_USER_ERROR(_EXP, _MSG)
Assert function with message.
Definition Assert.h:21
@ VelZ
Velocity ECEF_Z [m/s].
Definition MotionModel.hpp:46
@ VelY
Velocity ECEF_Y [m/s].
Definition MotionModel.hpp:45
@ VelX
Velocity ECEF_X [m/s].
Definition MotionModel.hpp:44
constexpr std::array< StateKeyType, 6 > PosVel
Vector with all position and velocity keys.
Definition MotionModel.hpp:66
constexpr std::array< StateKeyType, 3 > Vel
All velocity keys.
Definition MotionModel.hpp:59
Position and Velocity Storage Class.
Definition PosVel.hpp:23
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition PosVel.hpp:73
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition PosVel.hpp:38
const Eigen::Vector3d & n_velocity() const
Returns the velocity in [m/s], in navigation coordinates.
Definition PosVel.hpp:211
bool setValueAt(size_t idx, double value) override
Set the value at the index.
Definition PosVel.hpp:150
std::string getType() const override
Returns the type of the data class.
Definition PosVel.hpp:34
std::optional< Eigen::Vector3d > e_velocityStdev() const
Returns the standard deviation of the velocity in [m/s], in earth coordinates.
Definition PosVel.hpp:214
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition PosVel.hpp:46
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.
Definition PosVel.hpp:76
static std::string type()
Returns the type of the data class.
Definition PosVel.hpp:27
void setPosVel_e(const Eigen::MatrixBase< DerivedP > &e_position, const Eigen::MatrixBase< DerivedV > &e_velocity)
Set the position and velocity.
Definition PosVel.hpp:259
size_t staticDescriptorCount() const override
Get the amount of descriptors.
Definition PosVel.hpp:79
void setPosVelCovarianceMatrix_e(const Eigen::MatrixBase< Derived > &e_covarianceMatrix)
Set the Covariance matrix in ECEF coordinates.
Definition PosVel.hpp:305
Eigen::Vector3d _e_velocity
Velocity in earth coordinates [m/s].
Definition PosVel.hpp:349
Eigen::Vector3d _n_velocity
Velocity in navigation coordinates [m/s].
Definition PosVel.hpp:351
const Eigen::Vector3d & e_velocity() const
Returns the velocity in [m/s], in earth coordinates.
Definition PosVel.hpp:208
std::optional< Eigen::Vector3d > n_velocityStdev() const
Returns the standard deviation of the velocity in [m/s], in navigation coordinates.
Definition PosVel.hpp:224
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition PosVel.hpp:84
void setPosVelAndCov_n(const Eigen::MatrixBase< DerivedP > &lla_position, const Eigen::MatrixBase< DerivedV > &n_velocity, const Eigen::MatrixBase< Derived > &n_covarianceMatrix)
Set the position, velocity and the covariance matrix.
Definition PosVel.hpp:293
void setVelocity_n(const Eigen::MatrixBase< Derived > &n_velocity)
Set the Velocity in the NED frame.
Definition PosVel.hpp:249
void setPosVel_n(const Eigen::MatrixBase< DerivedP > &lla_position, const Eigen::MatrixBase< DerivedV > &n_velocity)
Set the position and velocity.
Definition PosVel.hpp:269
void setVelocity_e(const Eigen::MatrixBase< Derived > &e_velocity)
Set the Velocity in the earth frame.
Definition PosVel.hpp:240
void setPosVelAndCov_e(const Eigen::MatrixBase< DerivedP > &e_position, const Eigen::MatrixBase< DerivedV > &e_velocity, const Eigen::MatrixBase< Derived > &e_covarianceMatrix)
Set the position, velocity and the covariance matrix.
Definition PosVel.hpp:280
void setPosVelCovarianceMatrix_n(const Eigen::MatrixBase< Derived > &n_covarianceMatrix)
Set the Covariance matrix in NED coordinates.
Definition PosVel.hpp:326
Position Storage Class.
Definition Pos.hpp:32
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
Definition Pos.hpp:91
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
Definition Pos.hpp:53
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
Definition Pos.hpp:80
bool setValueAt(size_t idx, double value) override
Set the value at the index.
Definition Pos.hpp:158
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition Pos.hpp:47
Eigen::Quaterniond e_Quat_n() const
Returns the Quaternion from navigation to Earth-fixed frame.
Definition Pos.hpp:220
static std::string type()
Returns the type of the data class.
Definition Pos.hpp:36
std::optional< KeyedMatrixXd< Keys::MotionModelKey, Keys::MotionModelKey > > _e_covarianceMatrix
Covariance matrix in ECEF coordinates.
Definition Pos.hpp:361
std::optional< KeyedMatrixXd< Keys::MotionModelKey, Keys::MotionModelKey > > _n_covarianceMatrix
Covariance matrix in local navigation coordinates.
Definition Pos.hpp:364
Eigen::Quaterniond n_Quat_e() const
Returns the Quaternion from Earth-fixed frame to navigation.
Definition Pos.hpp:227
const Eigen::Vector3d & e_position() const
Returns the coordinates in [m].
Definition Pos.hpp:249
void setPosition_e(const Eigen::MatrixBase< Derived > &e_position)
Set the Position in coordinates.
Definition Pos.hpp:284
const Eigen::Vector3d & lla_position() const
Returns the latitude 𝜙, longitude λ and altitude (height above ground) in [rad, rad,...
Definition Pos.hpp:237
void setPosition_lla(const Eigen::MatrixBase< Derived > &lla_position)
Set the Position lla object.
Definition Pos.hpp:293
KeyedMatrixX< double, RowKeyType, ColKeyType > KeyedMatrixXd
Dynamic size KeyedMatrix with double types.
Definition KeyedMatrix.hpp:2313