mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 03:03:33 +08:00
replace geo _wrap_pi with matrix::wrap_pi
This commit is contained in:
committed by
Lorenz Meier
parent
5c64879688
commit
a8b73bd139
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user