<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">

<flight_plan alt="5" ground_alt="0" lat0="48 51 41.166" lon0="1 53 42.444" max_dist_from_home="400" name="DGA 09 Cour" security_height="1">
  <waypoints>
    <waypoint alt="5.0" name="HOME" x="0.0" y="0.0"/>
    <waypoint alt="8.0" name="D1" lat="48 51 41.166" lon="1 53 42.444"/>
    <waypoint alt="8.0" name="P1" lat="48 51 41.960" lon="1 53 42.344"/>
    <waypoint alt="8.0" name="P2" lat="48 51 41.977" lon="1 53 41.555"/>
    <waypoint alt="8.0" name="P3" lat="48 51 42.547" lon="1 53 41.631"/>
    <waypoint alt="8.0" name="CAM" x="0.0" y="30.0"/>
  </waypoints>
  <blocks>
    <block name="Geo init">
      <while cond="LessThan(NavBlockTime(), 3)"/>
      <call fun="NavSetAltitudeReferenceHere()"/> <!-- TODO reset alt only -->
    </block>
    <block name="Holding point">
      <stay alt="POS_BFP_OF_REAL(-20.0)" vmode="alt" wp="D1"/>
    </block>
    <block name="Takeoff" strip_button="Takeoff" strip_icon="takeoff.png">
      <exception cond="booz_ins_enu_pos.z > POS_BFP_OF_REAL(1.5)" deroute="Standby"/>
      <attitude roll="0" pitch="0" throttle="0.65" vmode="throttle"/>
    </block>
    <block name="Standby" strip_button="Standby" strip_icon="home.png">
      <stay wp="HOME"/>
    </block>
    <block name="Go and Wait P1">
      <go from="D1" hmode="route" wp="P1"/>
      <stay wp="P1"/>
    </block>
    <block name="Route">
      <go from="P1" hmode="route" wp="P2"/>
      <go from="P2" hmode="route" wp="P3"/>
      <stay wp="P3"/>
    </block>
    <block name="Route back">
      <go from="P3" hmode="route" wp="P2"/>
      <go from="P2" hmode="route" wp="D1"/>
      <deroute block="Standby"/>
    </block>
    <block name="Land">
      <go wp="D1"/>
      <stay climb="-0.6" vmode="climb" wp="D1"/>
    </block>
    <block name="Flare">
      <attitude pitch="0.0" roll="0.0" throttle="0.0" until="FALSE" vmode="throttle"/>
    </block>
  </blocks>
</flight_plan>
