50template<
typename DerivedA,
typename DerivedB>
52 const Eigen::MatrixBase<DerivedB>& e_Quat_b_coeffs)
55 Eigen::Matrix4<typename DerivedA::Scalar> A;
58 A << 0.0 , -b_omega_eb(0), -b_omega_eb(1), -b_omega_eb(2),
59 b_omega_eb(0), 0.0 , b_omega_eb(2), -b_omega_eb(1),
60 b_omega_eb(1), -b_omega_eb(2), 0.0 , b_omega_eb(0),
61 b_omega_eb(2), b_omega_eb(1), -b_omega_eb(0), 0.0 ;
65 return 0.5 * A * e_Quat_b_coeffs;
85template<
typename DerivedA,
typename DerivedB,
typename DerivedC,
typename DerivedD>
87 const Eigen::MatrixBase<DerivedB>& e_coriolisAcceleration,
88 const Eigen::MatrixBase<DerivedC>& e_gravitation,
89 const Eigen::MatrixBase<DerivedD>& e_centrifugalAcceleration)
91 return e_measuredForce
92 - e_coriolisAcceleration
94 - e_centrifugalAcceleration;
107template<
typename Derived>
118template<
typename Scalar,
typename = std::enable_if_t<std::is_
floating_po
int_v<Scalar>>>
123 Eigen::Vector<Scalar, 10> y_dot = Eigen::Vector<Scalar, 10>::Zero();
125 Eigen::Vector3<Scalar> lla_position = trafo::ecef2lla_WGS84(y.template segment<3>(7));
127 Eigen::Quaternion<Scalar> e_Quat_b{ y(0), y(1), y(2), y(3) };
128 e_Quat_b.normalize();
129 Eigen::Quaternion<Scalar> n_Quat_e = trafo::n_Quat_e(lla_position(0), lla_position(1));
131 Eigen::Quaternion<Scalar> b_Quat_e = e_Quat_b.conjugate();
132 Eigen::Quaternion<Scalar> e_Quat_n = n_Quat_e.conjugate();
134 LOG_DATA(
"e_velocity = {} [m/s]", y.template segment<3>(4).transpose());
135 LOG_DATA(
"e_position = {} [m]", y.template segment<3>(7).transpose());
138 Eigen::Vector3<Scalar> b_omega_eb = z.template segment<3>(3)
140 LOG_DATA(
"b_omega_eb = {} [rad/s]", b_omega_eb.transpose());
145 : Eigen::Vector3<Scalar>::Zero();
146 LOG_DATA(
"e_coriolisAcceleration = {} [m/s^2]", e_coriolisAcceleration.transpose());
150 : Eigen::Vector3<Scalar>::Zero();
151 LOG_DATA(
"e_centrifugalAcceleration = {} [m/s^2]", e_centrifugalAcceleration.transpose());
157 y.template segment<4>(0));
160 e_coriolisAcceleration,
162 e_centrifugalAcceleration);
166 LOG_DATA(
"e_Quat_b_dot = {} ", y_dot.template segment<4>(0).transpose());
167 LOG_DATA(
"e_velocity_dot = {} [m/s^2]", y_dot.template segment<3>(4).transpose());
168 LOG_DATA(
"e_position_dot = {} [m/s]", y_dot.template segment<3>(7).transpose());
Transformation collection.
Eigen::Vector4< typename DerivedA::Scalar > calcTimeDerivativeFor_e_Quat_b(const Eigen::MatrixBase< DerivedA > &b_omega_eb, const Eigen::MatrixBase< DerivedB > &e_Quat_b_coeffs)
Calculates the time derivative of the quaternion e_Quat_b.
Definition Mechanization.hpp:51
Eigen::Vector< Scalar, 10 > e_calcPosVelAttDerivative(const Eigen::Vector< Scalar, 10 > &y, const Eigen::Vector< Scalar, 6 > &z, const PosVelAttDerivativeConstants< Scalar > &c, Scalar=0.0)
Calculates the derivative of the quaternion, velocity and position in ECEF coordinates.
Definition Mechanization.hpp:119
Eigen::Vector3< typename DerivedA::Scalar > e_calcTimeDerivativeForVelocity(const Eigen::MatrixBase< DerivedA > &e_measuredForce, const Eigen::MatrixBase< DerivedB > &e_coriolisAcceleration, const Eigen::MatrixBase< DerivedC > &e_gravitation, const Eigen::MatrixBase< DerivedD > &e_centrifugalAcceleration)
Calculates the time derivative of the velocity in ECEF frame coordinates.
Definition Mechanization.hpp:86
Eigen::Vector3< typename Derived::Scalar > e_calcTimeDerivativeForPosition(const Eigen::MatrixBase< Derived > &e_velocity)
Calculates the time derivative of the ECEF position.
Definition Mechanization.hpp:108
Functions concerning the ellipsoid model.
Different Gravity Models.
Eigen::Vector3< typename Derived::Scalar > n_calcGravitation(const Eigen::MatrixBase< Derived > &lla_position, GravitationModel gravitationModel=GravitationModel::EGM96)
Calculates the gravitation (acceleration due to mass attraction of the Earth)
Definition Gravity.hpp:193
Inertial Navigation Helper Functions.
Eigen::Vector3< typename DerivedA::Scalar > e_calcCoriolisAcceleration(const Eigen::MatrixBase< DerivedA > &e_omega_ie, const Eigen::MatrixBase< DerivedB > &e_velocity)
Calculates the coriolis acceleration in [m/s^2] (acceleration due to motion in rotating reference fra...
Definition Functions.hpp:107
Eigen::Vector3< typename DerivedA::Scalar > e_calcCentrifugalAcceleration(const Eigen::MatrixBase< DerivedA > &e_position, const Eigen::MatrixBase< DerivedB > &e_omega_ie=InsConst< typename DerivedB::Scalar >::e_omega_ie)
Calculates the centrifugal acceleration in [m/s^2] (acceleration that makes a body follow a curved pa...
Definition Functions.hpp:72
Utility class for logging to console and file.
#define LOG_DATA
All output which occurs repeatedly every time observations are received.
Definition Logger.hpp:29
Inertial Navigation Mechanization Functions.
Constants.
Definition Constants.hpp:26
Values needed to calculate the PosVelAttDerivative for the local-navigation frame.
Definition Mechanization.hpp:27
bool centrifgalAccelerationCompensationEnabled
Apply the centrifugal acceleration compensation to the measured accelerations.
Definition Mechanization.hpp:30
bool angularRateEarthRotationCompensationEnabled
Apply the Earth rotation rate compensation to the measured angular rates.
Definition Mechanization.hpp:31
GravitationModel gravitationModel
Gravity Model to use.
Definition Mechanization.hpp:28
bool coriolisAccelerationCompensationEnabled
Apply the Coriolis acceleration compensation to the measured accelerations.
Definition Mechanization.hpp:29