<?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
depthMargin = 4 
data = slate.read("depth")[0]
passed = False
for i in range(len(data)):
  depth = float(data[i].data)
  if depth > depthMargin:
    passed = True
    break 
if not passed:
  print("Vehicle failed to sink")
TEST_CODE_END
-->

    <Timeout Duration="P5M"/>

    <Guidance:Buoyancy Id="AltitudeEnvelope">
        <Parallel/>
        <Setting><Guidance:Buoyancy.position/><Units:cubic_centimeter/><Value>100</Value></Setting>
    </Guidance:Buoyancy>

    <Guidance:SetSpeed>
        <Parallel/>
        <Setting><Guidance:SetSpeed.speed/><Units:meter_per_second/><Value>1</Value></Setting>
    </Guidance:SetSpeed>

    <Guidance:SetSpeed>
        <Parallel/>
        <Setting><Guidance:SetSpeed.speed/><Units:meter_per_second/><Value>1</Value></Setting>
    </Guidance:SetSpeed>

    <Guidance:Pitch>
        <Parallel/>
        <Setting><Guidance:Pitch.depth/><Units:meter/><Value>200</Value></Setting>
    </Guidance:Pitch>

</Mission>
