[optitrack] Flightplan update : no geo-init (solves non-constant altitude), deroute after climb to 1 meter instead of climbing to 2 and then descending again, add a commonly used GOAL waypoint and put flightplan at more confortable 1.5m

This commit is contained in:
Christophe De Wagter
2015-11-20 17:48:48 +01:00
parent f8e59e6256
commit b3cc6a4707
+9 -10
View File
@@ -1,12 +1,13 @@
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<flight_plan alt="1" ground_alt="0" lat0="51.990634" lon0="4.376789" max_dist_from_home="20" name="Rotorcraft Optitrack (Delft)" security_height="0.3">
<flight_plan alt="1.5" ground_alt="0" lat0="51.990634" lon0="4.376789" max_dist_from_home="20" name="Rotorcraft Optitrack (Delft)" security_height="0.3">
<header>
#include "autopilot.h"
</header>
<waypoints>
<waypoint name="HOME" x="0.0" y="0.0"/>
<waypoint name="CLIMB" x="1.2" y="-0.6"/>
<waypoint name="GOAL" x="2.0" y="2.0"/>
<waypoint name="STDBY" x="-0.7" y="-0.8"/>
<waypoint name="TD" x="0.8" y="-1.7"/>
<waypoint lat="51.990630" lon="4.376823" name="p1"/>
@@ -31,14 +32,6 @@
<call fun="NavKillThrottle()"/>
<while cond="!GpsFixValid()"/>
</block>
<block name="Geo init">
<while cond="LessThan(NavBlockTime(), 1)"/>
<call fun="NavSetWaypointHere(WP_HOME)"/>
<call fun="NavSetWaypointHere(WP_CLIMB)"/>
<call fun="NavSetWaypointHere(WP_STDBY)"/>
<call fun="NavSetWaypointHere(WP_TD)"/>
<call fun="NavSetAltitudeReferenceHere()"/>
</block>
<block name="Holding point">
<call fun="NavKillThrottle()"/>
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
@@ -48,13 +41,19 @@
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
</block>
<block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">
<exception cond="stateGetPositionEnu_f()->z > 2.0" deroute="Standby"/>
<exception cond="stateGetPositionEnu_f()->z > 1.0" deroute="Standby"/>
<call fun="NavSetWaypointHere(WP_CLIMB)"/>
<stay climb="nav_climb_vspeed" vmode="climb" wp="CLIMB"/>
</block>
<block name="Standby" strip_button="Standby" strip_icon="home.png">
<stay wp="STDBY"/>
</block>
<block name="START" strip_button="Go" strip_icon="lookfore.png">
<call fun="NavSetWaypointHere(WP_GOAL)"/>
</block>
<block name="StayGoal">
<stay wp="GOAL"/>
</block>
<block name="stay_p1">
<stay wp="p1"/>
</block>