replace geo _wrap_pi with matrix::wrap_pi

This commit is contained in:
Daniel Agar
2018-06-12 09:00:52 +02:00
committed by Lorenz Meier
parent 518daa4a8d
commit d0bde9ab2a
14 changed files with 60 additions and 313 deletions
+3 -1
View File
@@ -46,6 +46,8 @@
#include <float.h>
using matrix::wrap_pi;
Standard::Standard(VtolAttitudeControl *attc) :
VtolType(attc),
_pusher_throttle(0.0f),
@@ -368,7 +370,7 @@ void Standard::update_mc_state()
// rotate the vector into a new frame which is rotated in z by the desired heading
// with respect to the earh frame.
float yaw_error = matrix::wrap_pi(euler_sp(2) - euler(2));
const float yaw_error = wrap_pi(euler_sp(2) - euler(2));
matrix::Dcmf R_yaw_correction = matrix::Eulerf(0.0f, 0.0f, -yaw_error);
tilt_new = R_yaw_correction * tilt_new;