From edc5f8a05723b91bff7975dd4a5f60c62b275809 Mon Sep 17 00:00:00 2001 From: Thomas Gubler Date: Sun, 4 Jan 2015 13:28:15 +0100 Subject: [PATCH] add experimantal acceleration feedback by @kd0aij --- src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp b/src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp index f85c622e4e..a879067494 100644 --- a/src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp +++ b/src/lib/ecl/attitude_fw/ecl_yaw_controller.cpp @@ -181,7 +181,8 @@ float ECL_YawController::control_bodyrate_impl(const struct ECL_ControlData &ctl /* Close the acceleration loop if _coordinated_method wants this: change body_rate setpoint */ if (_coordinated_method == COORD_METHOD_CLOSEACC) { - //XXX + //XXX: filtering of acceleration? + _bodyrate_setpoint -= (ctl_data.acc_body_y / (airspeed * cosf(ctl_data.pitch))); } /* Transform estimation to body angular rates (jacobian) */