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.
#define INS_ASSERT_USER_ERROR(_EXP, _MSG)
Assert function with message.
Position and Velocity Storage Class.
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
const Eigen::Vector3d & n_velocity() const
Returns the velocity in [m/s], in navigation coordinates.
bool setValueAt(size_t idx, double value) override
Set the value at the index.
std::string getType() const override
Returns the type of the data class.
std::optional< Eigen::Vector3d > e_velocityStdev() const
Returns the standard deviation of the velocity in [m/s], in earth coordinates.
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.
static std::string type()
Returns the type of the data class.
void setPosVel_e(const Eigen::MatrixBase< DerivedP > &e_position, const Eigen::MatrixBase< DerivedV > &e_velocity)
Set the position and velocity.
size_t staticDescriptorCount() const override
Get the amount of descriptors.
void setPosVelCovarianceMatrix_e(const Eigen::MatrixBase< Derived > &e_covarianceMatrix)
Set the Covariance matrix in ECEF coordinates.
Eigen::Vector3d _e_velocity
Velocity in earth coordinates [m/s].
Eigen::Vector3d _n_velocity
Velocity in navigation coordinates [m/s].
const Eigen::Vector3d & e_velocity() const
Returns the velocity in [m/s], in earth coordinates.
std::optional< Eigen::Vector3d > n_velocityStdev() const
Returns the standard deviation of the velocity in [m/s], in navigation coordinates.
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
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.
void setVelocity_n(const Eigen::MatrixBase< Derived > &n_velocity)
Set the Velocity in the NED frame.
void setPosVel_n(const Eigen::MatrixBase< DerivedP > &lla_position, const Eigen::MatrixBase< DerivedV > &n_velocity)
Set the position and velocity.
void setVelocity_e(const Eigen::MatrixBase< Derived > &e_velocity)
Set the Velocity in the earth frame.
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.
void setPosVelCovarianceMatrix_n(const Eigen::MatrixBase< Derived > &n_covarianceMatrix)
Set the Covariance matrix in NED coordinates.
std::optional< double > getValueAt(size_t idx) const override
Get the value at the index.
static std::vector< std::string > GetStaticDataDescriptors()
Returns a vector of data descriptors.
static constexpr size_t GetStaticDescriptorCount()
Get the amount of descriptors.
bool setValueAt(size_t idx, double value) override
Set the value at the index.
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Eigen::Quaterniond e_Quat_n() const
Returns the Quaternion from navigation to Earth-fixed frame.
static std::string type()
Returns the type of the data class.
std::optional< KeyedMatrixXd< Keys::MotionModelKey, Keys::MotionModelKey > > _e_covarianceMatrix
Covariance matrix in ECEF coordinates.
std::optional< KeyedMatrixXd< Keys::MotionModelKey, Keys::MotionModelKey > > _n_covarianceMatrix
Covariance matrix in local navigation coordinates.
Eigen::Quaterniond n_Quat_e() const
Returns the Quaternion from Earth-fixed frame to navigation.
const Eigen::Vector3d & e_position() const
Returns the coordinates in [m].
void setPosition_e(const Eigen::MatrixBase< Derived > &e_position)
Set the Position in coordinates.
const Eigen::Vector3d & lla_position() const
Returns the latitude 𝜙, longitude λ and altitude (height above ground) in [rad, rad,...
void setPosition_lla(const Eigen::MatrixBase< Derived > &lla_position)
Set the Position lla object.
@ VelZ
Velocity ECEF_Z [m/s].
@ VelY
Velocity ECEF_Y [m/s].
@ VelX
Velocity ECEF_X [m/s].
constexpr std::array< StateKeyType, 6 > PosVel
Vector with all position and velocity keys.
constexpr std::array< StateKeyType, 3 > Vel
All velocity keys.
KeyedMatrixX< double, RowKeyType, ColKeyType > KeyedMatrixXd
Dynamic size KeyedMatrix with double types.