1
0
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:
peabody124 2010-12-13 07:03:04 +00:00 committed by peabody124
parent 06c42702f9
commit 9250470c98

View File

@ -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);