Commit d0d46649 authored by beuchatp's avatar beuchatp
Browse files

finally corrected body rate commands for current yaw angle

parent c4ec9599
...@@ -656,8 +656,8 @@ void desired_eulerrates_to_bodyrates( Controller::Request &request , float roll_ ...@@ -656,8 +656,8 @@ void desired_eulerrates_to_bodyrates( Controller::Request &request , float roll_
float sinYaw = sin(yaw); float sinYaw = sin(yaw);
float cosYaw = cos(yaw); float cosYaw = cos(yaw);
bodyrates[0] = roll_rate * cosYaw - pitch_rate * sinYaw; bodyrates[0] = roll_rate * cosYaw + pitch_rate * sinYaw;
bodyrates[1] = +roll_rate * sinYaw + pitch_rate * cosYaw; bodyrates[1] = -roll_rate * sinYaw + pitch_rate * cosYaw;
return; return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment