<?xml version="1.0" encoding="UTF-8"?>
<Mission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="Tethys"
         xmlns:Guidance="Tethys/Guidance"
         xmlns:Units="Tethys/Units"
         xsi:schemaLocation="Tethys http://okeanids.mbari.org/tethys/Xml/Tethys.xsd
                             Tethys/Guidance http://okeanids.mbari.org/tethys/Xml/Guidance.xsd
                             Tethys/Units http://okeanids.mbari.org/tethys/Xml/Units.xsd"
       Id="TestMission">

<!--
TEST_CODE_START

minDepth = 5          # mission's min depth
maxDepth = 30         # mission's max depth
depthDelta = 3.5        # inflections can occur with delta of min/max depth
UP = 0
DOWN = 1
direction = DOWN
lastDepth = 0
depth = 0
infl = 0
inflExpected = 4
data = slate.read("depth")[0]
for i in range(len(data)):
  lastDepth = depth
  depth = abs(float(data[i].data))
  if direction == DOWN and depth < lastDepth:
    direction = UP
    if utils.withinDelta(depth, maxDepth, depthDelta):
      infl = infl + 1
  elif direction == UP and depth > lastDepth:
    direction = DOWN
    if utils.withinDelta(depth, minDepth, depthDelta):
      infl = infl + 1
if infl >= inflExpected:
  passed = True
else:
  print "Error, expected at least %d inflections, only got %d." % ( inflExpected, infl )

TEST_CODE_END
-->

    <Timeout Duration="P1H"/>

    <Insert Filename="RegressionTests/InsertHighPriority.xml"/>

    <Insert Filename="RegressionTests/InsertSurfaceOps.xml"/>

    <Aggregate Id="TestAggregate">

        <Sequence/>

        <Guidance:DepthEnvelope>
            <Parallel/>
            <Setting><Guidance:DepthEnvelope.minDepth/><Units:meter/><Value>5</Value></Setting>
            <Setting><Guidance:DepthEnvelope.maxDepth/><Units:meter/><Value>30</Value></Setting>
        </Guidance:DepthEnvelope>

        <Guidance:YoYo>
            <Parallel/>
        </Guidance:YoYo>

    </Aggregate>

</Mission>
