1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-18 08:54:15 +01:00

Flip the sign of throttle in the guidance altitude control

This commit is contained in:
James Cotton 2012-03-14 21:52:45 -05:00
parent 7f226867c6
commit 62117430cf

View File

@ -364,6 +364,8 @@ static void updateVtolDesiredAttitude()
// Compute desired down command
downError = velocityDesired.Down - velocityActual.Down;
// Must flip this sign
downError = -downError;
downVelIntegral = bound(downVelIntegral + downError * dT * guidanceSettings.VerticalVelPID[GUIDANCESETTINGS_VERTICALVELPID_KI],
-guidanceSettings.VerticalVelPID[GUIDANCESETTINGS_VERTICALVELPID_ILIMIT],
guidanceSettings.VerticalVelPID[GUIDANCESETTINGS_VERTICALVELPID_ILIMIT]);