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

<!--
TEST_CODE_START
depthIncCount = 0        # times sea floor depth increases
depthDecCount = 0        # times sea floor depth decreases
data = slate.read("sea_floor_depth_below_geoid")[0]
skipDepth = float('nan')
firstDepth = float('nan')
lastDepth = float('nan')
for i in range(len(data)):
  depth = float(data[i].data)
  if firstDepth != firstDepth and skipDepth == skipDepth:
    firstDepth = depth
  if skipDepth != skipDepth:
    skipDepth = depth
  if depth > lastDepth:
    depthIncCount = depthIncCount + 1
  if depth < lastDepth:
    depthDecCount = depthDecCount + 1
  lastDepth = depth;
passed = depthIncCount > depthDecCount and firstDepth < lastDepth
if not passed:
	print("failed: depthIncCount= %g, depthDecCount=%g, firstDepth=%g, lastDepth=%g" %(depthIncCount, depthDecCount, firstDepth, lastDepth) )
TEST_CODE_END
-->

    <Timeout Duration="P1H"/>

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

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

    <Aggregate Id="TestAggregate">

        <Sequence/>

        <Timeout Duration="P30M30S"/>

        <Guidance:WaterDepthEnvelope>
            <Parallel/>
            <Setting><Guidance:WaterDepthEnvelope.minWaterDepth/><Universal:sea_floor_depth_below_geoid/><Add><Units:meter/><Value>5</Value></Add></Setting>
        </Guidance:WaterDepthEnvelope>

    </Aggregate>

</Mission>
