<?xml version="1.0" encoding="UTF-8"?>
<Aggregate xmlns="Tethys"
       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/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="SurfaceGPS">

    <DefineArg Name="HalfTimeout"><Description>
        Timeout for each attempt to read Universal:latitude_fix from GPS (two
        attempts are made, hence the name HalfTimeout).
    </Description><Units:second/><Value>30</Value></DefineArg>

    <DefineArg Name="SurfacePitch"><Units:degree/><Value>20</Value></DefineArg>

    <DefineArg Name="SurfaceSpeed"><Units:meter_per_second/><Value>1</Value></DefineArg>

    <Sequence/>

    <Guidance:GoToSurface>
        <Progression/>
        <Setting><Guidance:GoToSurface.pitch/><Arg Name="SurfacePitch"/></Setting>
        <Setting><Guidance:GoToSurface.speed/><Arg Name="SurfaceSpeed"/></Setting>
    </Guidance:GoToSurface>

    <Aggregate Id="GetFix">

        <Sequence Repeat="2"/>

        <ReadDatum>
            <Timeout Duration="HalfTimeout"/>
            <Universal:latitude_fix/>
        </ReadDatum>

    </Aggregate>

</Aggregate>
