mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-27 16:54:15 +01:00
Guidance: In velocity control use maximum groundspeed to cap the velocity
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2229 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
06c42702f9
commit
9250470c98
@ -279,9 +279,12 @@ static void manualSetDesiredVelocity()
|
||||
|
||||
ManualControlCommandGet(&cmd);
|
||||
VelocityDesiredGet(&velocityDesired);
|
||||
|
||||
GuidanceSettingsData guidanceSettings;
|
||||
GuidanceSettingsGet(&guidanceSettings);
|
||||
|
||||
velocityDesired.North = -200 * cmd.Pitch;
|
||||
velocityDesired.East = 200 * cmd.Roll;
|
||||
velocityDesired.North = -guidanceSettings.MaxGroundspeed * cmd.Pitch;
|
||||
velocityDesired.East = guidanceSettings.MaxGroundspeed * cmd.Roll;
|
||||
velocityDesired.Down = 0;
|
||||
|
||||
VelocityDesiredSet(&velocityDesired);
|
||||
|
Loading…
x
Reference in New Issue
Block a user