1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Guidance: Small sign error

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2209 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
peabody124 2010-12-10 17:14:35 +00:00 committed by peabody124
parent b046829217
commit fd10c6ffff

View File

@ -249,7 +249,7 @@ static void updateVtolDesiredAttitude()
// Project the north and east command signals into the pitch and roll based on yaw. For this to behave well the
// craft should move similarly for 5 deg roll versus 5 deg pitch
attitudeDesired.Pitch = bound(-northCommand * cosf(attitudeActual.Yaw * M_PI / 180) +
eastCommand * sinf(attitudeActual.Yaw * M_PI / 180),
-eastCommand * sinf(attitudeActual.Yaw * M_PI / 180),
-stabSettings.PitchMax, stabSettings.PitchMax);
attitudeDesired.Roll = bound(-northCommand * sinf(attitudeActual.Yaw * M_PI / 180) +
eastCommand * cosf(attitudeActual.Yaw * M_PI / 180),