<?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="DiveTestElevatorTank">

    <DefineArg Name="MassDefault"><Control:VerticalControl.massDefault/></DefineArg>

    <Timeout Duration="P4M"/>

    <Guidance:DepthEnvelope>
        <Parallel/>
        <Setting><Guidance:DepthEnvelope.minDepth/><Units:meter/><Value>0</Value></Setting>
        <Setting><Guidance:DepthEnvelope.maxDepth/><Units:meter/><Value>10</Value></Setting>
    </Guidance:DepthEnvelope>

    <Guidance:Buoyancy>
        <Progression/>
        <Setting><Guidance:Buoyancy.position/><Units:cubic_centimeter/><Value>100</Value></Setting>
    </Guidance:Buoyancy>

    <Aggregate Id="ELEVATORMOVE">

        <Sequence/>

        <Guidance:Pitch>
            <Parallel/>
            <Setting><Guidance:Pitch.massPosition/><Arg Name="MassDefault"/></Setting>
            <Setting><Guidance:Pitch.elevatorAngle/><Units:degree/><Value>10.0</Value></Setting>
        </Guidance:Pitch>

        <Guidance:Wait>
            <Sequence/>
            <Break>
                <Universal:platform_elevator_angle/>
                <Ge><Units:degree/><Value>9</Value></Ge>
            </Break>
        </Guidance:Wait>

        <Aggregate Id="SPEEDON">

            <Sequence/>

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

            <Guidance:Wait>
                <Sequence/>
                <Setting><Guidance:Wait.duration/><Units:second/><Value>45</Value></Setting>
            </Guidance:Wait>

        </Aggregate>

    </Aggregate>

</Mission>
