17#include <Eigen/src/Core/MatrixBase.h>
22#include "Navigation/Transformations/Units.hpp"
36 [[nodiscard]]
static std::string
type()
43 [[nodiscard]] std::string
getType()
const override {
return type(); }
91 [[nodiscard]] std::optional<double>
getValueAt(
size_t idx)
const override
158 [[nodiscard]]
bool setValueAt(
size_t idx,
double value)
override
283 template<
typename Derived>
292 template<
typename Derived>
302 template<
typename DerivedP,
typename Derived>
312 template<
typename DerivedP,
typename Derived>
322 template<
typename Derived>
331 Eigen::Matrix3d J =
n_Quat_e().toRotationMatrix();
340 template<
typename Derived>
349 Eigen::Matrix3d J =
e_Quat_n().toRotationMatrix();
368 Eigen::Vector3d
_e_position{ 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
Common logging variables like time into run and local positions.
Transformation collection.
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.
Definition CoordinateFrames.hpp:420
Eigen::Quaternion< Scalar > e_Quat_n(const Scalar &latitude, const Scalar &longitude)
Quaternion for rotations from navigation to Earth-fixed frame.
Definition CoordinateFrames.hpp:305
Eigen::Vector3< typename Derived::Scalar > lla2ecef_WGS84(const Eigen::MatrixBase< Derived > &lla_position)
Converts latitude, longitude and altitude into Earth-centered-Earth-fixed coordinates using WGS84.
Definition CoordinateFrames.hpp:402
constexpr std::array< StateKeyType, 3 > Pos
All position keys.
Definition MotionModel.hpp:56
@ PosY
Position ECEF_Y [m].
Definition MotionModel.hpp:42
@ PosX
Position ECEF_X [m].
Definition MotionModel.hpp:41
@ PosZ
Position ECEF_Z [m].
Definition MotionModel.hpp:43
static LocalPosition calcLocalPosition(const Eigen::Vector3d &lla_position)
Calculate the local position offset from a reference point.
NodeData()=default
Default constructor.
static std::string type()
Returns the type of the data class.
Definition NodeData.hpp:45
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
Eigen::Vector3d _e_position
Position in ECEF coordinates [m].
Definition Pos.hpp:368
std::optional< std::reference_wrapper< const KeyedMatrixXd< Keys::MotionModelKey, Keys::MotionModelKey > > > e_CovarianceMatrix() const
Returns the Covariance matrix in ECEF frame.
Definition Pos.hpp:272
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
const double & latitude() const
Returns the latitude 𝜙 in [rad].
Definition Pos.hpp:240
static std::vector< std::string > parentTypes()
Returns the parent types of the data class.
Definition Pos.hpp:47
std::optional< std::reference_wrapper< const KeyedMatrixXd< Keys::MotionModelKey, Keys::MotionModelKey > > > n_CovarianceMatrix() const
Returns the Covariance matrix in local navigation frame.
Definition Pos.hpp:275
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
void setPosCovarianceMatrix_n(const Eigen::MatrixBase< Derived > &n_covarianceMatrix)
Set the Covariance matrix in NED coordinates.
Definition Pos.hpp:341
void setPositionAndCov_n(const Eigen::MatrixBase< DerivedP > &lla_position, const Eigen::MatrixBase< Derived > &n_covarianceMatrix)
Set the position and the covariance matrix.
Definition Pos.hpp:313
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 setPositionAndCov_e(const Eigen::MatrixBase< DerivedP > &e_position, const Eigen::MatrixBase< Derived > &e_covarianceMatrix)
Set the position and the covariance matrix.
Definition Pos.hpp:303
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
size_t staticDescriptorCount() const override
Get the amount of descriptors.
Definition Pos.hpp:86
std::optional< Eigen::Vector3d > n_positionStdev() const
Returns the standard deviation of the position in local navigation frame coordinates in [m].
Definition Pos.hpp:262
std::string getType() const override
Returns the type of the data class.
Definition Pos.hpp:43
std::optional< Eigen::Vector3d > e_positionStdev() const
Returns the standard deviation of the position in ECEF frame coordinates in [m].
Definition Pos.hpp:252
Eigen::Vector3d _lla_position
Position in LatLonAlt coordinates [rad, rad, m].
Definition Pos.hpp:370
const double & altitude() const
Returns the altitude (height above ground) in [m].
Definition Pos.hpp:246
std::vector< std::string > staticDataDescriptors() const override
Returns a vector of data descriptors.
Definition Pos.hpp:83
void setPosition_lla(const Eigen::MatrixBase< Derived > &lla_position)
Set the Position lla object.
Definition Pos.hpp:293
const double & longitude() const
Returns the longitude λ in [rad].
Definition Pos.hpp:243
void setPosCovarianceMatrix_e(const Eigen::MatrixBase< Derived > &e_covarianceMatrix)
Set the Covariance matrix in ECEF coordinates.
Definition Pos.hpp:323
double northSouth
North/South deviation from the reference point [m].
Definition CommonLog.hpp:55
double eastWest
East/West deviation from the reference point [m].
Definition CommonLog.hpp:56
Matrix which can be accessed by keys.
KeyedMatrixX< double, RowKeyType, ColKeyType > KeyedMatrixXd
Dynamic size KeyedMatrix with double types.
Definition KeyedMatrix.hpp:2313