<!DOCTYPE procedure SYSTEM "flight_plan.dtd">

<procedure>
  <param name="rad" default_value="30"/>
  <param name="alt" default_value="GROUND_ALT+50"/>

  <waypoints>
    <waypoint name="center" x="0" y="0"/>
  </waypoints>

  <blocks>
    <block NAME="go">
      <exception COND="(RcEvent1())" DEROUTE="event1"/>
      <circle WP="center" RADIUS="2*rad" alt="alt" until="And(Qdr(0), circle_count > 1)"/>
      <circle wp="center" wp_qdr="0" wp_dist="rad" RADIUS="rad" alt="alt" until="circle_count > 0.5"/>
      <circle WP="center" wp_qdr="180" wp_dist="rad" RADIUS="-rad" alt="alt" until="circle_count > 1"/>
      <circle WP="center" wp_qdr="0" wp_dist="rad" RADIUS="rad" alt="alt" until="circle_count > 0.5"/>
      <circle WP="center" RADIUS="2*rad" alt="alt" until="Qdr(90)"/>
      <circle WP="center" wp_qdr="90" wp_dist="rad" RADIUS="rad" alt="alt" until="circle_count > 0.5"/>
      <circle WP="center" wp_qdr="270" wp_dist="rad" RADIUS="-rad" alt="alt" until="circle_count > 1"/>
      <circle WP="center" wp_qdr="90" wp_dist="rad" RADIUS="rad" alt="alt" until="circle_count > 0.5"/>
      <deroute block="go"/>
    </block>
  </blocks>
</procedure>
