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

    <Description>
        Just a test to set position
    </Description>

    <DefineArg Name="DockLat"><Description>
        Latitude of docking station waypoint (defaults to
        Config/workSite.beaconLat).
    </Description><CustomUri Uri="Config/workSite.beaconLat"/></DefineArg>

    <DefineArg Name="DockLon"><Description>
        Longitude of docking station waypoint (defaults to
        Config/workSite.beaconLon).
    </Description><CustomUri Uri="Config/workSite.beaconLon"/></DefineArg>

    <Sequence/>

    <Aggregate Id="UpdateNav">

        <Description>
            Reset nav to dock location if the vehicle is within dock range.
        </Description>

        <Sequence/>

        <Syslog Severity="Info">Reseting nav to dock location at range<Arg Name="Range"/><Units:meter/></Syslog>

        <Dock:SetNav>
            <Sequence/>
            <Setting><Dock:SetNav.latitude/><Arg Name="DockLat"/></Setting>
            <Setting><Dock:SetNav.longitude/><Arg Name="DockLon"/></Setting>
        </Dock:SetNav>

    </Aggregate>

</Aggregate>
