mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
LP-367 - Set homelocation velocity
This commit is contained in:
parent
05d541684e
commit
08b960549a
@ -143,7 +143,9 @@ void plan_setup_returnToBase()
|
||||
// For a safer RTB destination altitude will be the higher between takeofflocation and current position (corrected with safety margin)
|
||||
|
||||
float destDown;
|
||||
float destVelocity;
|
||||
FlightModeSettingsReturnToBaseAltitudeOffsetGet(&destDown);
|
||||
FlightModeSettingsReturnToBaseVelocityGet(&destVelocity);
|
||||
destDown = MIN(positionStateDown, takeoffLocation.Down) - destDown;
|
||||
FlightModeSettingsPositionHoldOffsetData offset;
|
||||
FlightModeSettingsPositionHoldOffsetGet(&offset);
|
||||
@ -156,8 +158,8 @@ void plan_setup_returnToBase()
|
||||
pathDesired.Start.East = takeoffLocation.East;
|
||||
pathDesired.Start.Down = destDown;
|
||||
|
||||
pathDesired.StartingVelocity = 0.0f;
|
||||
pathDesired.EndingVelocity = 0.0f;
|
||||
pathDesired.StartingVelocity = destVelocity;
|
||||
pathDesired.EndingVelocity = destVelocity;
|
||||
|
||||
FlightModeSettingsReturnToBaseNextCommandOptions ReturnToBaseNextCommand;
|
||||
FlightModeSettingsReturnToBaseNextCommandGet(&ReturnToBaseNextCommand);
|
||||
|
@ -88,6 +88,7 @@
|
||||
<field name="DisarmingSequenceTime" units="ms" type="uint16" elements="1" defaultvalue="1000"/>
|
||||
<field name="DisableSanityChecks" units="" type="enum" elements="1" options="False,True" defaultvalue="False"/>
|
||||
<field name="ReturnToBaseAltitudeOffset" units="m" type="float" elements="1" defaultvalue="10"/>
|
||||
<field name="ReturnToBaseVelocity" units="m" type="float" elements="4" defaultvalue="10"/>
|
||||
<field name="ReturnToBaseNextCommand" units="" type="enum" elements="1" options="Hold,Land" defaultvalue="Hold"/>
|
||||
<field name="LandingVelocity" units="m" type="float" elements="1" defaultvalue="0.6"/>
|
||||
<field name="AutoTakeOffVelocity" units="m" type="float" elements="1" defaultvalue="0.6"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user