23#ifndef TAPROOT_DYNAMIC_ORIENTATION_HPP_
24#define TAPROOT_DYNAMIC_ORIENTATION_HPP_
44 angularVelocity(
AngularVelocity::skewMatFromAngVel(rollVel, pitchVel, yawVel))
49 : orientation(std::move(orientation.matrix_)),
50 angularVelocity(std::move(angularVelocity.matrix_))
55 : orientation(orientation.matrix_),
56 angularVelocity(angularVelocity.matrix_)
63 : orientation(std::move(orientation)),
64 angularVelocity(std::move(angularVelocity))
72 : orientation(orientation),
73 angularVelocity(angularVelocity)
80 this->orientation * other.orientation,
81 this->angularVelocity +
82 this->orientation * other.angularVelocity * this->orientation.
transpose());
89 -(this->orientation.transpose() * this->angularVelocity * this->orientation));
102 inline float roll()
const {
return atan2(orientation.
data[7], orientation.
data[8]); }
104 inline float pitch()
const {
return asinf(-orientation.
data[6]); }
106 inline float yaw()
const {
return atan2(orientation.
data[3], orientation.
data[0]); }
CMSISMat< 3, 3 > fromEulerAngles(const float roll, const float pitch, const float yaw)
Definition math_user_utils.cpp:57
Definition cmsis_mat.hpp:45
CMSISMat< COLS, ROWS > transpose() const
Definition cmsis_mat.hpp:129
std::array< float, ROWS *COLS > data
Definition cmsis_mat.hpp:46