23 template <
typename Type>
26 template <
typename Type>
35 template<
typename Type>
36 class Euler :
public Vector<Type, 3>
94 Type phi_val = Type(
atan2(dcm(2, 1), dcm(2, 2)));
95 Type theta_val = Type(
asin(-dcm(2, 0)));
96 Type psi_val = Type(
atan2(dcm(1, 0), dcm(0, 0)));
99 if (Type(fabs(theta_val - pi / Type(2))) < Type(1.0e-3)) {
101 psi_val = Type(
atan2(dcm(1, 2), dcm(0, 2)));
103 }
else if (Type(fabs(theta_val + pi / Type(2))) < Type(1.0e-3)) {
105 psi_val = Type(
atan2(-dcm(1, 2), -dcm(0, 2)));
Euler(Type phi_, Type theta_, Type psi_)
Constructor from euler angles.
Direction cosine matrix class.
Dual< Scalar, N > asin(const Dual< Scalar, N > &a)
Euler(const Dcm< Type > &dcm)
Constructor from DCM matrix.
Euler(const Vector< Type, 3 > &other)
Copy constructor.
Euler()=default
Standard constructor.
Euler(const Quaternion< Type > &q)
Constructor from quaternion instance.
Euler(const Matrix< Type, 3, 1 > &other)
Constructor from Matrix31.
Dual< Scalar, N > atan2(const Dual< Scalar, N > &a, const Dual< Scalar, N > &b)