1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Fix bug limiting maximum velocity desired

This commit is contained in:
James Cotton 2012-04-14 10:49:54 -05:00
parent 136bbe3814
commit 3e2feb64cf

View File

@ -279,7 +279,7 @@ void updateVtolDesiredVelocity()
eastPosIntegral);
float total_vel = sqrtf(powf(velocityDesired.North,2) + powf(velocityDesired.East,2));
float total_vel = sqrtf(powf(northCommand,2) + powf(eastCommand,2));
float scale = 1;
if(total_vel > guidanceSettings.HorizontalVelMax)
scale = guidanceSettings.HorizontalVelMax / total_vel;