replace geo _wrap_pi with matrix::wrap_pi

This commit is contained in:
Daniel Agar
2018-06-11 00:16:17 +02:00
committed by Lorenz Meier
parent 5c64879688
commit a8b73bd139
5 changed files with 23 additions and 139 deletions
+4 -1
View File
@@ -42,6 +42,9 @@
#include <float.h>
#include <geo/geo.h>
#include <mathlib/mathlib.h>
#include <matrix/math.hpp>
using matrix::wrap_pi;
ECL_WheelController::ECL_WheelController() :
ECL_Controller("wheel")
@@ -112,7 +115,7 @@ float ECL_WheelController::control_attitude(const struct ECL_ControlData &ctl_da
}
/* Calculate the error */
float yaw_error = _wrap_pi(ctl_data.yaw_setpoint - ctl_data.yaw);
float yaw_error = wrap_pi(ctl_data.yaw_setpoint - ctl_data.yaw);
/* Apply P controller: rate setpoint from current error and time constant */
_rate_setpoint = yaw_error / _tc;