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:
parent
136bbe3814
commit
3e2feb64cf
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user