mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 08:55:51 +08:00
156 lines
6.7 KiB
XML
156 lines
6.7 KiB
XML
<!DOCTYPE flight_plan SYSTEM "../flight_plan.dtd">
|
|
|
|
<flight_plan alt="60" ground_alt="0" lat0="53.398848" lon0="5.258644" max_dist_from_home="5000" name="Nederdrone Valkenburg" security_height="2">
|
|
<header>
|
|
#include "autopilot.h"
|
|
#include "modules/datalink/datalink.h"
|
|
</header>
|
|
<waypoints>
|
|
<waypoint name="HOME" x="-657.7" y="-25.2"/>
|
|
<waypoint name="CLIMB" x="-476.9" y="77.1"/>
|
|
<waypoint alt="80.0" name="STDBY" x="-688.0" y="13.9"/>
|
|
<waypoint alt="100.0" name="p1" x="-1047.6" y="27.2"/>
|
|
<waypoint alt="100.0" name="p2" x="-1091.2" y="272.9"/>
|
|
<waypoint alt="100.0" name="p3" x="-718.0" y="345.1"/>
|
|
<waypoint alt="100.0" name="p4" x="-641.6" y="127.3"/>
|
|
<waypoint name="TD" x="-472.8" y="169.5"/>
|
|
<waypoint name="FOLLOW" x="-593.9" y="379.7"/>
|
|
<waypoint lat="53.409169" lon="5.243295" name="S1"/>
|
|
<waypoint lat="53.410073" lon="5.248888" name="S2"/>
|
|
<waypoint lat="53.403590" lon="5.214102" name="C1"/>
|
|
<waypoint lat="53.399129" lon="5.219031" name="C2"/>
|
|
<waypoint lat="53.391752" lon="5.234877" name="C3"/>
|
|
<waypoint lat="53.399786" lon="5.273960" name="C4"/>
|
|
<waypoint lat="53.416200" lon="5.265441" name="C5"/>
|
|
<waypoint lat="53.424575" lon="5.252654" name="C6"/>
|
|
<waypoint lat="53.422246" lon="5.233265" name="C7"/>
|
|
<waypoint lat="53.418859" lon="5.216361" name="C8"/>
|
|
<waypoint lat="53.411762" lon="5.208801" name="C9"/>
|
|
</waypoints>
|
|
<sectors>
|
|
<sector color="red" name="Flyzone">
|
|
<corner name="C1"/>
|
|
<corner name="C2"/>
|
|
<corner name="C3"/>
|
|
<corner name="C4"/>
|
|
<corner name="C5"/>
|
|
<corner name="C6"/>
|
|
<corner name="C7"/>
|
|
<corner name="C8"/>
|
|
<corner name="C9"/>
|
|
</sector>
|
|
</sectors>
|
|
<modules>
|
|
<module name="nav" type="survey_rectangle_rotorcraft">
|
|
<define name="RECTANGLE_SURVEY_DEFAULT_SWEEP" value="100"/>
|
|
</module>
|
|
</modules>
|
|
<exceptions>
|
|
<exception cond="Or(!InsideFlyzone(GetPosX(), GetPosY()), GetPosAlt() @GT GetAltRef() + 1500) @AND !(nav_block == IndexOfBlock('Wait GPS')) @AND !(nav_block == IndexOfBlock('Geo init')) @AND !(nav_block == IndexOfBlock('Holding point'))" deroute="Holding point"/>
|
|
<exception cond="datalink_time @GT 25 @AND !(nav_block == IndexOfBlock('Wait GPS')) @AND !(nav_block == IndexOfBlock('Geo init')) @AND !(nav_block == IndexOfBlock('Holding point')) @AND !(nav_block == IndexOfBlock('Standby'))" deroute="Standby"/>
|
|
</exceptions>
|
|
<blocks>
|
|
<block name="Wait GPS">
|
|
<call_once fun="NavKillThrottle()"/>
|
|
<while cond="!GpsFixValid() || !state.ned_initialized_i"/>
|
|
</block>
|
|
<block name="Geo init">
|
|
<while cond="LessThan(NavBlockTime(), 10)"/>
|
|
<call_once fun="NavSetAltitudeReferenceHere()"/>
|
|
</block>
|
|
<block name="Holding point">
|
|
<call_once fun="NavKillThrottle()"/>
|
|
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
|
|
</block>
|
|
<block name="Start Engine">
|
|
<set value="FALSE" var="force_forward"/>
|
|
<call_once fun="NavResurrect()"/>
|
|
<call_once fun="nav_set_heading_current()"/>
|
|
<attitude pitch="-45" roll="0" throttle="0" until="stage_time>1" vmode="throttle"/>
|
|
</block>
|
|
<block name="TakeoffLow" strip_button="Takeoff" strip_icon="takeoff.png">
|
|
<exception cond="GetPosHeight() @GT 18.0" deroute="Takeoff"/>
|
|
<call_once fun="nav_set_heading_current()"/>
|
|
<call_once fun="autopilot_set_in_flight(true)"/>
|
|
<attitude pitch="-45." roll="0" throttle="0.8" vmode="throttle"/>
|
|
</block>
|
|
<block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">
|
|
<exception cond="GetPosHeight() @GT 40.0" deroute="Standby"/>
|
|
<call_once fun="nav_set_heading_current()"/>
|
|
<call_once fun="NavSetWaypointHere(WP_CLIMB)"/>
|
|
<stay climb="nav.climb_vspeed" vmode="climb" wp="CLIMB"/>
|
|
</block>
|
|
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
|
<set value="FALSE" var="force_forward"/>
|
|
<stay wp="STDBY"/>
|
|
</block>
|
|
<block name="stay_p1">
|
|
<set value="FALSE" var="force_forward"/>
|
|
<stay wp="p1"/>
|
|
</block>
|
|
<block name="go_p2">
|
|
<set value="TRUE" var="force_forward"/>
|
|
<go wp="p2"/>
|
|
<deroute block="stay_p1"/>
|
|
</block>
|
|
<block name="line_p1_p2">
|
|
<set value="TRUE" var="force_forward"/>
|
|
<go from="p1" hmode="route" wp="p2"/>
|
|
<stay until="stage_time>10" wp="p2"/>
|
|
<go from="p2" hmode="route" wp="p1"/>
|
|
<deroute block="line_p1_p2"/>
|
|
</block>
|
|
<block name="route">
|
|
<set value="TRUE" var="force_forward"/>
|
|
<go from="p1" hmode="route" wp="p2"/>
|
|
<go from="p2" hmode="route" wp="p3"/>
|
|
<go from="p3" hmode="route" wp="p4"/>
|
|
<go from="p4" hmode="route" wp="p1"/>
|
|
<deroute block="route"/>
|
|
</block>
|
|
<block group="extra_pattern" name="Survey S1-S2 25m NS" strip_button="Svy25-NS-PRIMITIVE">
|
|
<set value="FALSE" var="force_forward"/>
|
|
<survey_rectangle grid="30" orientation="NS" wp1="S1" wp2="S2"/>
|
|
</block>
|
|
<block group="extra_pattern" name="Survey S1-S2 NS" strip_button="Svy-NS" strip_icon="survey.png">
|
|
<set value="TRUE" var="force_forward"/>
|
|
<call_once fun="nav_survey_rectangle_rotorcraft_setup(WP_S1, WP_S2, sweep, NS)"/>
|
|
<deroute block="Survey RECTANGLE RUN"/>
|
|
</block>
|
|
<block group="extra_pattern" name="Survey S1-S2 LO" strip_button="Svy-LO" strip_icon="survey_we.png">
|
|
<set value="TRUE" var="force_forward"/>
|
|
<call_once fun="nav_survey_rectangle_rotorcraft_setup(WP_S1, WP_S2, sweep, WE)"/>
|
|
<deroute block="Survey RECTANGLE RUN"/>
|
|
</block>
|
|
<block group="extra_pattern" name="Survey RECTANGLE RUN" strip_button="Svy CONT">
|
|
<set value="TRUE" var="force_forward"/>
|
|
<exception cond="rectangle_survey_sweep_num @GT 1" deroute="Standby"/>
|
|
<call fun="nav_survey_rectangle_rotorcraft_run(WP_S1, WP_S2)"/>
|
|
</block>
|
|
<block name="Oval">
|
|
<set value="TRUE" var="force_forward"/>
|
|
<oval p1="p1" p2="p2" radius="nav.radius"/>
|
|
</block>
|
|
<block name="land here" strip_button="Land Here" strip_icon="land-right.png">
|
|
<set value="FALSE" var="force_forward"/>
|
|
<call_once fun="NavSetWaypointHere(WP_TD)"/>
|
|
</block>
|
|
<block name="land">
|
|
<set value="FALSE" var="force_forward"/>
|
|
<go wp="TD"/>
|
|
</block>
|
|
<block name="descend">
|
|
<set value="FALSE" var="force_forward"/>
|
|
<exception cond="LessThan(GetPosHeight(), 15.0)" deroute="flare"/>
|
|
<stay climb="nav.descend_vspeed" vmode="climb" wp="TD"/>
|
|
</block>
|
|
<block name="flare">
|
|
<set value="FALSE" var="force_forward"/>
|
|
<stay climb="-0.5" vmode="climb" wp="TD"/>
|
|
</block>
|
|
<block name="landed">
|
|
<attitude pitch="0" roll="0" throttle="0" until="FALSE" vmode="throttle"/>
|
|
</block>
|
|
</blocks>
|
|
</flight_plan>
|