38template<
typename DerivedA,
typename DerivedB>
39[[nodiscard]] Eigen::Vector3<typename DerivedA::Scalar>
n_calcTransportRate(
const Eigen::MatrixBase<DerivedA>& lla_position,
40 const Eigen::MatrixBase<DerivedB>& n_velocity,
41 const typename DerivedA::Scalar& R_N,
42 const typename DerivedA::Scalar& R_E)
45 const auto& latitude = lla_position(0);
47 const auto& altitude = lla_position(2);
50 const auto& v_N = n_velocity(0);
52 const auto& v_E = n_velocity(1);
54 Eigen::Vector3<typename DerivedA::Scalar> n_omega_en__t1;
55 n_omega_en__t1(0) = v_E / (R_E + altitude);
56 n_omega_en__t1(1) = -v_N / (R_N + altitude);
57 n_omega_en__t1(2) = -n_omega_en__t1(0) * std::tan(latitude);
59 return n_omega_en__t1;
71template<
typename DerivedA,
typename DerivedB = DerivedA>
76 return e_omega_ie.cross(e_omega_ie.cross(e_position));
89template<
typename DerivedA,
typename DerivedB,
typename DerivedC>
91 const Eigen::MatrixBase<DerivedB>& n_omega_en,
92 const Eigen::MatrixBase<DerivedC>& n_velocity)
94 return (2 * n_omega_ie + n_omega_en).cross(n_velocity);
106template<
typename DerivedA,
typename DerivedB>
107[[nodiscard]] Eigen::Vector3<typename DerivedA::Scalar>
e_calcCoriolisAcceleration(
const Eigen::MatrixBase<DerivedA>& e_omega_ie,
const Eigen::MatrixBase<DerivedB>& e_velocity)
109 return (2 * e_omega_ie).cross(e_velocity);
117template<
typename Derived>
121 return math::sgn(b_accel.z()) * std::asin(b_accel.y() / b_accel.norm());
132template<
typename Derived>
136 return -math::sgn(b_accel.z()) * std::asin(b_accel.x() / b_accel.norm());
152template<
typename Derived>
155 return std::atan2(n_velocity(1), n_velocity(0));
168template<
typename Derived>
171 return std::atan(-n_velocity(2) / std::sqrt(std::pow(n_velocity(0), 2) + std::pow(n_velocity(1), 2)));
Eigen::Vector3< typename DerivedA::Scalar > n_calcCoriolisAcceleration(const Eigen::MatrixBase< DerivedA > &n_omega_ie, const Eigen::MatrixBase< DerivedB > &n_omega_en, const Eigen::MatrixBase< DerivedC > &n_velocity)
Calculates the coriolis acceleration in [m/s^2] (acceleration due to motion in rotating reference fra...
Definition Functions.hpp:90
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
Derived::Scalar calcRollFromStaticAcceleration(const Eigen::MatrixBase< Derived > &b_accel)
Calculates the roll angle from a static acceleration measurement.
Definition Functions.hpp:118
Derived::Scalar calcPitchFromVelocity(const Eigen::MatrixBase< Derived > &n_velocity)
Calculates the Pitch angle from the trajectory defined by the given velocity.
Definition Functions.hpp:169
Derived::Scalar calcYawFromVelocity(const Eigen::MatrixBase< Derived > &n_velocity)
Calculates the Yaw angle from the trajectory defined by the given velocity.
Definition Functions.hpp:153
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
Derived::Scalar calcPitchFromStaticAcceleration(const Eigen::MatrixBase< Derived > &b_accel)
Calculates the pitch angle from a static acceleration measurement.
Definition Functions.hpp:133
Eigen::Vector3< typename DerivedA::Scalar > n_calcTransportRate(const Eigen::MatrixBase< DerivedA > &lla_position, const Eigen::MatrixBase< DerivedB > &n_velocity, const typename DerivedA::Scalar &R_N, const typename DerivedA::Scalar &R_E)
Calculates the transport rate ω_en_n (rotation rate of the Earth frame relative to the navigation fra...
Definition Functions.hpp:39
Constants.
Definition Constants.hpp:26