mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
113 lines
4.5 KiB
XML
113 lines
4.5 KiB
XML
<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
|
|
|
|
<flight_plan alt="152" ground_alt="147" lat0="43 33 50.83" lon0="1 28 52.61" max_dist_from_home="150" name="Rotorcraft Basic (Enac)" security_height="2">
|
|
<header>
|
|
#include "autopilot.h"
|
|
#ifdef dc_Survey
|
|
#define LINE_START_FUNCTION dc_Survey(dc_distance_interval);
|
|
#define LINE_STOP_FUNCTION {dc_autoshoot = DC_AUTOSHOOT_STOP;}
|
|
#endif
|
|
</header>
|
|
<waypoints>
|
|
<waypoint name="HOME" x="0.0" y="0.0"/>
|
|
<waypoint name="CLIMB" x="0.0" y="5.0"/>
|
|
<waypoint name="STDBY" x="-2.0" y="-5.0"/>
|
|
<waypoint name="p1" x="3.6" y="-13.9"/>
|
|
<waypoint name="p2" x="27.5" y="-48.2"/>
|
|
<waypoint name="p3" x="16.7" y="-19.6"/>
|
|
<waypoint name="p4" x="13.7" y="-40.7"/>
|
|
<waypoint name="CAM" x="-20" y="-50" height="2."/>
|
|
<waypoint name="TD" x="5.6" y="-10.9"/>
|
|
<waypoint name="S1" x="32.6" y="-35.2" height="25"/>
|
|
<waypoint name="S2" x="-88.6" y="48.9"/>
|
|
</waypoints>
|
|
<blocks>
|
|
<block name="Wait GPS">
|
|
<call_once fun="NavKillThrottle()"/>
|
|
<while cond="!GpsFixValid()"/>
|
|
</block>
|
|
<block name="Geo init">
|
|
<while cond="LessThan(NavBlockTime(), 10)"/>
|
|
<call_once fun="NavSetGroundReferenceHere()"/>
|
|
<!--<call_once fun="NavSetAltitudeReferenceHere()"/>-->
|
|
</block>
|
|
<block name="Holding point">
|
|
<call_once fun="NavKillThrottle()"/>
|
|
<attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>
|
|
</block>
|
|
<block name="Start Engine">
|
|
<call_once fun="NavResurrect()"/>
|
|
<attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>
|
|
</block>
|
|
<block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">
|
|
<exception cond="stateGetPositionEnu_f()->z > 2.0" deroute="Standby"/>
|
|
<call_once fun="NavSetWaypointHere(WP_CLIMB)"/>
|
|
<stay vmode="climb" climb="nav_climb_vspeed" wp="CLIMB"/>
|
|
</block>
|
|
<block name="Standby" strip_button="Standby" strip_icon="home.png">
|
|
<stay wp="STDBY"/>
|
|
</block>
|
|
<block name="stay_p1">
|
|
<stay wp="p1"/>
|
|
</block>
|
|
<block name="go_p2">
|
|
<call_once fun="nav_set_heading_deg(90)"/>
|
|
<go wp="p2"/>
|
|
<deroute block="stay_p1"/>
|
|
</block>
|
|
<block name="line_p1_p2">
|
|
<go from="p1" hmode="route" wp="p2"/>
|
|
<stay wp="p2" until="stage_time>10"/>
|
|
<go from="p2" hmode="route" wp="p1"/>
|
|
<deroute block="stay_p1"/>
|
|
</block>
|
|
<block name="route">
|
|
<go from="p1" hmode="route" wp="p3"/>
|
|
<go from="p3" hmode="route" wp="p4"/>
|
|
<go from="p4" hmode="route" wp="p1"/>
|
|
<deroute block="stay_p1"/>
|
|
</block>
|
|
|
|
<block group="extra_pattern" name="Survey S1-S2 25m NS" strip_button="Svy25-NS-PRIMITIVE">
|
|
<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">
|
|
<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">
|
|
<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">
|
|
<exception cond="rectangle_survey_sweep_num > 1" deroute="Standby"/>
|
|
<call fun="nav_survey_rectangle_rotorcraft_run(WP_S1, WP_S2)"/>
|
|
</block>
|
|
|
|
<block name="circle CAM" pre_call="nav_set_heading_towards_waypoint(WP_CAM)">
|
|
<circle radius="nav_radius" wp="CAM"/>
|
|
</block>
|
|
<block name="land here" strip_button="Land Here" strip_icon="land-right.png">
|
|
<call_once fun="NavSetWaypointHere(WP_TD)"/>
|
|
</block>
|
|
<block name="land">
|
|
<go wp="TD"/>
|
|
</block>
|
|
<block name="flare">
|
|
<exception cond="NavDetectGround()" deroute="Holding point"/>
|
|
<exception cond="!nav_is_in_flight()" deroute="landed"/>
|
|
<call_once fun="NavStartDetectGround()"/>
|
|
<stay climb="nav_descend_vspeed" vmode="climb" wp="TD"/>
|
|
</block>
|
|
<block name="landed">
|
|
<attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>
|
|
</block>
|
|
<block name="visualflare">
|
|
<exception cond="NavDetectGround()" deroute="Holding point"/>
|
|
<exception cond="!nav_is_in_flight()" deroute="landed"/>
|
|
<call_once fun="NavStartDetectGround()"/>
|
|
<stay climb="nav_descend_vspeed" vmode="climb" wp="p1"/>
|
|
</block>
|
|
</blocks>
|
|
</flight_plan>
|