41 #include <mathlib/mathlib.h> 62 body_z_sp = R_yaw * body_z_sp;
65 float roll_sp = -asinf(body_z_sp(1));
67 float roll_exceeding_treshold = 0.0f;
70 if (roll_sp > min_roll_rad) {
71 roll_exceeding_treshold = roll_sp - min_roll_rad;
73 }
else if (roll_sp < -min_roll_rad) {
74 roll_exceeding_treshold = roll_sp + min_roll_rad;
constexpr _Tp constrain(_Tp val, _Tp min_val, _Tp max_val)
float get_weathervane_yawrate()
void update(const matrix::Vector3f &dcm_z_sp_prev, float yaw)
constexpr T radians(T degrees)
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
float _yaw
current yaw angle
matrix::Vector3f _dcm_z_sp_prev
previous attitude setpoint body z axis