# - Copyright (c) 2024 MBARI# - MBARI Proprietary Information. Confidential. All Rights Reserved# - Unauthorized copying or distribution of this file via any medium is strictly# - prohibited.# -# - WARNING - This file contains information whose export is restricted by the# - Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as# - amended. Violations of these export laws are subject to severe civil and/or# - criminal penalties.missiondrift{""" Vehicle drifts at the surface, continuously recording GPS signals. If enabled, it also estimates the evolving location of a surface drifter using the HFRCM components. """arguments{MinAltitude=10.0meter""" Minimum height above the sea floor for the entire mission. """MaxDepth=5.0meter""" Maximum depth for the entire mission. """MinOffshore=2000.0meter""" Minimum offshore distance for the entire mission. """NeedCommsTime=12minute""" Elapsed time after previous surface communications when vehicle will begin to attempt additional surface communications. """Timeout=6hour""" Maximum length of mission """BuoyancyMax=Control:VerticalControl.buoyancyLimitHiCC""" Buoyancy bladder position for drifting at the surface. This defaults to buoyancyLimitHiCC setting in the Config/Control.cfg file. """MassDefault=Control:VerticalControl.massDefault""" Static setting for mass during the mission. This defaults to massDefault setting in the Config/Confrol.cfg file. """}# massPositionLimitFwd setting in the Config/Confrol.cfg file.# </Description><Control:VerticalControl.massPositionLimitFwd/></DefineArg>timeoutduration=TimeoutaggregateAltEnvWrapper{runwhen(MinAltitude>0meter)behaviorGuidance:AltitudeEnvelope{""" Safety behavior that keeps vehicle off sea floor """runinparallelsetGuidance:AltitudeEnvelope.minAltitude=MinAltitude}}behaviorGuidance:DepthEnvelope{""" Safety behavior that keeps vehicle from going too deep """runinparallelsetGuidance:DepthEnvelope.maxDepth=MaxDepth}aggregateOffshoreWrapper{runwhen(MinOffshore>0meter)behaviorGuidance:OffshoreEnvelope{""" Safety behavior that keeps vehicle away from the shore """runinparallelsetGuidance:OffshoreEnvelope.minOffshore=MinOffshore}}behaviorGuidance:Pitch{runinparallelsetGuidance:Pitch.massPosition=MassDefault}# Communication update: Don't go too long without calling home.aggregateNeedComms{""" Initiate communications with shore. (Don't use Insert/NeedComms.tl here since that operates based on Universal:time_fix, which is continuously updated in this drift mission.) Note that there is a two-minute timeout on platform_communications, after which the mission will exit this aggregate. If communications are not completed, it will re-enter this aggregate immediately, take one GPS fix, and then try to communicate again. """runwhen(elapsed(Universal:platform_communications)>NeedCommsTime)readDatum{Universal:time_fix}readDatum{timeoutduration=P2MUniversal:platform_communications}}insertInsert/Science.tl{""" Record standard science data at the surface during the drift. """}behaviorGuidance:Buoyancy{runinparallelsetGuidance:Buoyancy.position=BuoyancyMax}aggregateClearCommsBuffer{""" Clean up any existing communications before starting to drift. """runinsequencereadDatum{Universal:platform_communications}}# (re)initialize the virtual surface drifteraggregateReinitializeHFRCMVirtualSurfaceDrifter{runinsequence# TODO: Would really prefer an "if" conditional here. Only want to do it once.# <When># <CustomUri Uri="HFRCMVirtualSurfaceDrifter.loadAtStartup"/># </When>syslogimportant"\n\t HFRCMVSD.loadAtStartup: "+customUri"HFRCMVirtualSurfaceDrifter.loadAtStartup"~boolEstimation:ReinitializeHFRCMVirtualSurfaceDrifter#! xml2tethysl note: A non-behavior Tethys definition used by itself.syslogimportant"Reinitialized virtual drifter location to current vehicle location."}# Continuously record GPS signals.aggregateContinuousGPS{""" Continuously query for GPS data. """runinparallelreadDatastrategy="MinError"{Universal:time_fix}}behaviorGuidance:Wait{runinsequence}}
<?xml version="1.0" encoding="UTF-8"?><!--- Copyright (c) 2024 MBARI- MBARI Proprietary Information. Confidential. All Rights Reserved- Unauthorized copying or distribution of this file via any medium is strictly- prohibited.-- WARNING - This file contains information whose export is restricted by the- Export Administration Act of 1979 (Title 50, U.S.C., App. 2401 et seq.), as- amended. Violations of these export laws are subject to severe civil and/or- criminal penalties.--><Missionxmlns="Tethys"xmlns:Control="Tethys/Control"xmlns:Estimation="Tethys/Estimation"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/Estimation http://okeanids.mbari.org/tethys/Xml/Estimation.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="drift"><Description>
Vehicle drifts at the surface, continuously recording GPS signals. If
enabled, it also estimates the evolving location of a surface drifter
using the HFRCM components.
</Description><DefineArgName="MinAltitude"><Description>
Minimum height above the sea floor for the entire mission.
</Description><Units:meter/><Value>10.0</Value></DefineArg><DefineArgName="MaxDepth"><Description>
Maximum depth for the entire mission.
</Description><Units:meter/><Value>5.0</Value></DefineArg><DefineArgName="MinOffshore"><Description>
Minimum offshore distance for the entire mission.
</Description><Units:meter/><Value>2000.0</Value></DefineArg><DefineArgName="NeedCommsTime"><Description>
Elapsed time after previous surface communications when vehicle will
begin to attempt additional surface communications.
</Description><Units:minute/><Value>12</Value></DefineArg><DefineArgName="Timeout"><Description>
Maximum length of mission
</Description><Units:hour/><Value>6</Value></DefineArg><DefineArgName="BuoyancyMax"><Description>
Buoyancy bladder position for drifting at the surface. This defaults to
buoyancyLimitHiCC setting in the Config/Control.cfg file.
</Description><Control:VerticalControl.buoyancyLimitHiCC/></DefineArg><DefineArgName="MassDefault"><Description>
Static setting for mass during the mission. This defaults to massDefault
setting in the Config/Confrol.cfg file.
</Description><Control:VerticalControl.massDefault/></DefineArg><!-- massPositionLimitFwd setting in the Config/Confrol.cfg file. </Description><Control:VerticalControl.massPositionLimitFwd/></DefineArg>--><TimeoutDuration="Timeout"/><AggregateId="AltEnvWrapper"><When><ArgName="MinAltitude"/><Gt><Units:meter/><Value>0</Value></Gt></When><Guidance:AltitudeEnvelope><Description>
Safety behavior that keeps vehicle off sea floor
</Description><Parallel/><Setting><Guidance:AltitudeEnvelope.minAltitude/><ArgName="MinAltitude"/></Setting></Guidance:AltitudeEnvelope></Aggregate><Guidance:DepthEnvelope><Description>
Safety behavior that keeps vehicle from going too deep
</Description><Parallel/><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="MaxDepth"/></Setting></Guidance:DepthEnvelope><AggregateId="OffshoreWrapper"><When><ArgName="MinOffshore"/><Gt><Units:meter/><Value>0</Value></Gt></When><Guidance:OffshoreEnvelope><Description>
Safety behavior that keeps vehicle away from the shore
</Description><Parallel/><Setting><Guidance:OffshoreEnvelope.minOffshore/><ArgName="MinOffshore"/></Setting></Guidance:OffshoreEnvelope></Aggregate><Guidance:Pitch><Parallel/><Setting><Guidance:Pitch.massPosition/><ArgName="MassDefault"/></Setting></Guidance:Pitch><!-- Communication update: Don't go too long without calling home. --><AggregateId="NeedComms"><Description>
Initiate communications with shore. (Don't use Insert/NeedComms.tl
here since that operates based on Universal:time_fix, which is
continuously updated in this drift mission.) Note that there is a
two-minute timeout on platform_communications, after which the
mission will exit this aggregate. If communications are not
completed, it will re-enter this aggregate immediately, take one GPS
fix, and then try to communicate again.
</Description><When><Elapsed><Universal:platform_communications/></Elapsed><Gt><ArgName="NeedCommsTime"/></Gt></When><ReadDatum><Universal:time_fix/></ReadDatum><ReadDatum><TimeoutDuration="P2M"/><Universal:platform_communications/></ReadDatum></Aggregate><InsertFilename="Insert/Science.tl"><Description>
Record standard science data at the surface during the drift.
</Description></Insert><Guidance:Buoyancy><Parallel/><Setting><Guidance:Buoyancy.position/><ArgName="BuoyancyMax"/></Setting></Guidance:Buoyancy><AggregateId="ClearCommsBuffer"><Description>
Clean up any existing communications before starting to drift.
</Description><Sequence/><ReadDatum><Universal:platform_communications/></ReadDatum></Aggregate><!-- (re)initialize the virtual surface drifter --><AggregateId="ReinitializeHFRCMVirtualSurfaceDrifter"><Sequence/><!-- TODO: Would really prefer an "if" conditional here. Only want to do it once. --><!-- <When> <CustomUri Uri="HFRCMVirtualSurfaceDrifter.loadAtStartup"/> </When>--><SyslogSeverity="Important">
HFRCMVSD.loadAtStartup: <CustomUriUri="HFRCMVirtualSurfaceDrifter.loadAtStartup"/><Units:bool/></Syslog><Estimation:ReinitializeHFRCMVirtualSurfaceDrifter><Sequence/><Setting><Estimation:ReinitializeHFRCMVirtualSurfaceDrifter.initial_latitude_setting/><Universal:latitude/></Setting><Setting><Estimation:ReinitializeHFRCMVirtualSurfaceDrifter.initial_longitude_setting/><Universal:longitude/></Setting></Estimation:ReinitializeHFRCMVirtualSurfaceDrifter><SyslogSeverity="Important">Reinitialized virtual drifter location to current vehicle location.</Syslog></Aggregate><!-- Continuously record GPS signals. --><AggregateId="ContinuousGPS"><Description>
Continuously query for GPS data.
</Description><Parallel/><ReadDataStrategy="MinError"><Universal:time_fix/></ReadData></Aggregate><Guidance:Wait><Sequence/></Guidance:Wait></Mission>