<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">

<flight_plan ALT="130" GROUND_ALT="68" LAT0="52.26483" LON0="9.99394" MAX_DIST_FROM_HOME="1500" NAME="Gross Lobke Cube" QFU="270" SECURITY_HEIGHT="60">

  <waypoints>
    <waypoint name="HOME" x="-30.0" y="13.0"/>
    <waypoint name="CENTER" x="10.0" y="1.0" alt="140.0"/>
    <waypoint name="CR" x="-53.8" y="140.0"/>

    <waypoint name="_B" x="-200." y="200.0"/>
    <waypoint name="B0" x="-200." y="200.0"/>
    <waypoint name="B1" x="-200." y="200.0"/>
    <waypoint name="B2" x="-200." y="200.0"/>
    <waypoint name="B3" x="-200." y="200.0"/>
    <waypoint name="B4" x="-200." y="200.0"/>
    <waypoint name="B5" x="-200." y="200.0"/>
    <waypoint name="B6" x="-200." y="200.0"/>
    <waypoint name="B7" x="-200." y="200.0"/>
    <waypoint name="_E" x="-200." y="200.0"/>
    <waypoint name="E0" x="-200." y="200.0"/>
    <waypoint name="E1" x="-200." y="200.0"/>
    <waypoint name="E2" x="-200." y="200.0"/>
    <waypoint name="E3" x="-200." y="200.0"/>
    <waypoint name="E4" x="-200." y="200.0"/>
    <waypoint name="E5" x="-200." y="200.0"/>
    <waypoint name="E6" x="-200." y="200.0"/>
    <waypoint name="E7" x="-200." y="200.0"/>
  </waypoints>

  <blocks>
    <block name="wait" strip_button="wait">
      <circle radius="-nav_radius" wp="CR"/>
    </block>

    <block name="Preset cubical lines" strip_button="CubeInit">
      <set var="nav_cube.sect"    value="1"/>
      <set var="nav_cube.nsect_x" value="3"/>
      <set var="nav_cube.nsect_z" value="2"/>
      <set var="nav_cube.alpha"   value="60"/>
      <set var="nav_cube.size.x"  value="70"/>
      <set var="nav_cube.size.y"  value="50"/>
      <set var="nav_cube.size.z"  value="40"/>
      <set var="nav_cube.grid_x"  value="10"/>
      <set var="nav_cube.grid_z"  value="10"/>
      <set var="nav_cube.offset.x"  value="0"/>
      <set var="nav_cube.offset.y"  value="30"/>
      <set var="nav_cube.offset.z"  value="10"/>
      <deroute block="Fly lines in cubical"/>
    </block>

    <block name="Fly lines in cubical" strip_button="Cube">
      <call fun="nav_cube_setup(WP_CENTER, WP_B0, WP_E0)"/>
      <for from="0" to="nav_cube.nline_z" var="j">
        <for from="0" to="nav_cube.nline_x" var="i">
          <call fun="nav_cube_run(_var_j, _var_i, WP__B, WP__E, WP_B0, WP_E0)"/>
          <oval p1="_B" p2="_E" radius="-nav_radius" until="(oval_status == OC1)"/>
          <go approaching_time="0" from="_B" hmode="route" wp="_E"/>
        </for>
      </for>
      <deroute block="wait"/>
    </block>
  </blocks>
</flight_plan>

