missioncanon_esp_trianguloid{""" This mission navigates to the CANON trianguloid waypoints and sets the max depth for each leg. The mission can (re)start at any point within this trajectory by adjusting the `leg` parameter as needed. Samples are triggered on a clock every SampleInterval. """arguments{# Almost every mission should start with an overall timeout and a NeedCommsTime.MissionTimeout=42hour""" Maximum duration of mission """NeedCommsTime=120minute""" How often to surface for commumications """# You probably need to change these.leg=1count""" Leg to start at (default is start at leg 1). leg 1: C1, 40m leg 2: C1 - M1 Bypass 01, 50m leg 3: M1 Bypass 01 - Soquel Monterey Junction 01, 50m leg 4: Soquel Monterey Junction 01 - WG near MARS, 50m leg 5: WG near MARS - WG near Mid 1, 50m leg 6: WG near Mid 1 - M1 Bypass 01, 50m leg 7: M1 Bypass 01 - C1, 50m leg 8: C1 - ?, 50m (spare wp) """SampleInterval=2hour""" ESP sampling interval. Must be longer than the duration of a single ESP sample. """FirstSampleTimeOffset=10minute""" When true, the mission will acquire and ESP sample at the start of the mission. When false, the mission will wait for the SampleInterval before acquiring the first sample. """SampleESP=true""" When true, aqurie an ESP sample. """CartridgeType=-6count""" Specifies ESP cartridge type code (defaults to archive_bac: -6) """SampleCANONSampler=false""" When true, aqurie a CANON Sampler water sample. """CANONSamplerDelay=10minute""" How long to delay a CANON Sampler sample after an ESP sample is intiated. """SampleTimeout=3hour""" Max time duration allowed for a single sample. """Lat1=36.797degree""" Latitude of waypoint 1 (default: C1). """Lon1=-121.847degree""" Longitude of waypoint 1 (default: C1). """Lat2=36.754degree""" Latitude of waypoint 2 (default: M1 Bypass 01). """Lon2=-122.0155degree""" Longitude of waypoint 2 (default: M1 Bypass 01). """Lat3=36.7825degree""" Latitude of waypoint 3 (default: Soquel Monterey Junction 01). """Lon3=-122.018degree""" Longitude of waypoint 3 (default: Soquel Monterey Junction 01). """Lat4=36.7117degree""" Latitude of waypoint 4 (default: WG near MARS). """Lon4=-122.1919degree""" Longitude of waypoint 4 (default: WG near MARS). """Lat5=36.6978degree""" Latitude of waypoint 5 (default: WG near Mid 1). """Lon5=-122.0562degree""" Longitude of waypoint 5 (default: WG near Mid 1). """Lat6=36.754degree""" Latitude of waypoint 6 (default: M1 Bypass 01). """Lon6=-122.0155degree""" Longitude of waypoint 6 (default: M1 Bypass 01). """Lat7=36.797degree""" Latitude of waypoint 7 (default: C1). """Lon7=-121.847degree""" Longitude of waypoint 7 (default: C1). """Lat8=NaNdegree""" Latitude of waypoint 8 (spare). """Lon8=NaNdegree""" Longitude of waypoint 8 (spare). """Speed=1meter_per_second""" Vehicle speed for the entire mission. """YoYoMinDepth=5meter""" Minimum YoYo depth for the entire mission. """YoYoMaxDepth1=40meter""" Maximum YoYo depth during leg 1. """YoYoMaxDepth2=50meter""" Maximum YoYo depth during leg 2. """YoYoMaxDepth3=50meter""" Maximum YoYo depth during leg 3. """YoYoMaxDepth4=50meter""" Maximum YoYo depth during leg 4. """YoYoMaxDepth5=50meter""" Maximum YoYo depth during leg 5. """YoYoMaxDepth6=50meter""" Maximum YoYo depth during leg 6. """YoYoMaxDepth7=50meter""" Maximum YoYo depth during leg 7. """YoYoMaxDepth8=50meter""" Maximum YoYo depth during leg 8. """YoYoMinAltitude=9meter""" Minimum altitude while performing the YoYo behavior (for bottom-terminated YoYos). """YoYoUpPitch=20degree""" Vehicle up pitch while performing the YoYo behavior. """YoYoDownPitch=-20degree""" Vehicle down pitch while performing the YoYo behavior. """# You are even less likely to need to change these.CaptureRadius=NaNmeter""" Waypoint capture radiues. """MinAltitude=5meter""" Minimum height above the sea floor for the entire mission. """MaxDepth=110meter""" Maximum depth for the entire mission. """MinOffshore=2kilometer""" Minimum offshore distance for the entire mission. """}output{ElapsedSinceLastSampleStart=0minute""" Mission variable (don't change). The mission sets this variable to reset the ESP sample timer. """ElapsedTime=0hour""" Mission variable (don't change). The mission sets this variable to reset the ESP sample timer. """SampleInProgress=false""" Mission variable (don't change). The mission sets this variable to while sampling is in progress. """FirstSample=false""" Mission variable (don't change). The mission sets this variable to when it's time to take the first sample. """}# Missions should almost always start with a timeouttimeoutduration=MissionTimeoutinsertInsert/Science.xml{""" Most missions will run the science sensors. If you don't place this aggregate above NeedComms, science instruments get turned off on the last upcast and while floating on the surface. """}# Most missions should use the NeedComms aggregate.insertInsert/NeedComms.xmlid="NeedComms"assigninsequenceNeedComms:DiveInterval=NeedCommsTime# Missions should almost always start with standard safety envelopes;# most missions should not expose the parameters of these envelopes.insertInsert/StandardEnvelopes.xmlassigninsequenceStandardEnvelopes:MinAltitude=MinAltitudeassigninsequenceStandardEnvelopes:MaxDepth=MaxDepthassigninsequenceStandardEnvelopes:MinOffshore=MinOffshoreassigninsequenceStandardEnvelopes:MaxDepth=MaxDepthassigninsequenceStandardEnvelopes:MinOffshore=MinOffshore# Sampling directivesaggregateCheckSamplingSettings{runinsequencesysloginfo"Checking sampling settings."aggregateCheckESP{runwhen(SampleESPand(not(Science:ESPComponent.loadAtStartup)))syslogcritical"Cannot service ESP sample request. ESPComponent is not loaded."}aggregateCheckCANONSampler{runwhen(SampleCANONSamplerand(not(Science:CANONSampler.loadAtStartup)))syslogcritical"Cannot service CANONSampler water sample request. CANONSampler component is not loaded."}}insertInsert/Sample.xml{redefineArgSampleTimeout=SampleTimeout}# Automatically cycle logs every 24 hoursaggregateCycleLogs{runinparallelaggregate{runinsequencebehaviorGuidance:Wait{runinsequencesetGuidance:Wait.duration=24hour}syslogimportant"Restarting logs."behaviorGuidance:Execute{runinsequencesetGuidance:Execute.command="restart logs"}}}# Acquire ESP sample every SampleIntervalaggregateSampleTimer{runwhile(FirstSampleand(SampleInProgressor(elapsed(ElapsedSinceLastSampleStart)>SampleInterval)))aggregateAcquireSample{runinsequenceassigninsequenceElapsedTime=elapsed(ElapsedSinceLastSampleStart)syslogimportant"Pre-sample comms. Elapsed time since last water sample: "+ElapsedTime~hour# Surface for comms before initiating the sample sequencecallid="PreSampleComms"refId="NeedComms"# Set the surface comms interval to the sample timeout to avoid interruptions while samplingassigninsequenceNeedComms:DiveInterval=SampleTimeoutaggregateWaitForDepth{runinsequencebreakif(Universal:depth>=YoYoMinDepth)sysloginfo"Waiting to achieve min depth of "+YoYoMinDepth~meterbehaviorGuidance:Wait{runinsequencesetGuidance:Wait.duration=SampleTimeout}}# Indicate a sample is in progressassigninsequenceSampleInProgress=true# This assignment restarts the sample timerassigninsequenceElapsedSinceLastSampleStart=0#<No-Units?># Configure sampling sequanceassigninsequenceSample:SampleCANONSampler=SampleCANONSamplerassigninsequenceSample:CANONSamplerDelay=CANONSamplerDelayassigninsequenceSample:ESPCartridgeType=CartridgeTypeassigninsequenceSample:SampleESP=SampleESP# Trigger sampling sequancecallid="TriggerSample"refId="Sample"# Surface for comms after the sampling sequence completescallid="PostSampleComms"refId="NeedComms"# Reinstate nominal surface comms intervalassigninsequenceNeedComms:DiveInterval=NeedCommsTimeassigninsequenceSampleInProgress=false}}callid="StartingMission"refId="NeedComms"# Many missions will keep mass position and buoyancy volume fixed at defaults.behaviorGuidance:Pitch{runinparallelsetGuidance:Pitch.massPosition=Control:VerticalControl.massDefault}behaviorGuidance:Buoyancy{runinparallelsetGuidance:Buoyancy.position=Control:VerticalControl.buoyancyNeutral}behaviorGuidance:SetSpeed{runinparallelsetGuidance:SetSpeed.speed=Speed}behaviorGuidance:DepthEnvelope{""" Another depth envelope for the YoYo behavior. This envelope should fall within the limits of the standard safety envelopes in Insert/StandardEnvelopes.xml in order to avoid commanding high pitch angles for depth-terminated YoYos. """runinparallelsetGuidance:DepthEnvelope.minDepth=YoYoMinDepthsetGuidance:DepthEnvelope.downPitch=YoYoDownPitchsetGuidance:DepthEnvelope.upPitch=YoYoUpPitch}behaviorGuidance:AltitudeEnvelope{""" Another altitude envelope for the YoYo behavior. This envelope should fall within the limits of the standard safety envelopes in Insert/StandardEnvelopes.xml in order to avoid commanding high pitch angles for bottom-terminated YoYos. """runinparallelsetGuidance:AltitudeEnvelope.minAltitude=YoYoMinAltitudesetGuidance:AltitudeEnvelope.upPitch=YoYoUpPitch}behaviorGuidance:YoYo{runinparallelsetGuidance:YoYo.downPitch=YoYoDownPitchsetGuidance:YoYo.upPitch=YoYoUpPitch}aggregateSetWaypointsPerLegParameter{""" The following Leg2-5 aggregates adjust the Lat[] and Lon[] variables according to the `trajectory` parameter: """runinsequenceaggregateLeg2{runinsequencebreakif(leg<=1count)assigninsequenceLat1=NaNdegreeassigninsequenceLon1=NaNdegree}aggregateLeg3{runinsequencebreakif(leg<=2count)assigninsequenceLat2=NaNdegreeassigninsequenceLon2=NaNdegree}aggregateLeg4{runinsequencebreakif(leg<=3count)assigninsequenceLat3=NaNdegreeassigninsequenceLon3=NaNdegree}aggregateLeg5{runinsequencebreakif(leg<=4count)assigninsequenceLat4=NaNdegreeassigninsequenceLon4=NaNdegree}aggregateLeg6{runinsequencebreakif(leg<=5count)assigninsequenceLat5=NaNdegreeassigninsequenceLon5=NaNdegree}aggregateLeg7{runinsequencebreakif(leg<=6count)assigninsequenceLat6=NaNdegreeassigninsequenceLon6=NaNdegree}aggregateLeg8{runinsequencebreakif(leg<=7count)assigninsequenceLat7=NaNdegreeassigninsequenceLon7=NaNdegree}}aggregateLap{runinsequencesyslogimportant"Starting Lap"syslogimportant"Lat[1] = "+Lat1~degree+" Lon[1] = "+Lon1~degreesyslogimportant"Lat[2] = "+Lat2~degree+" Lon[2] = "+Lon2~degreesyslogimportant"Lat[3] = "+Lat3~degree+" Lon[3] = "+Lon3~degreesyslogimportant"Lat[4] = "+Lat4~degree+" Lon[4] = "+Lon4~degreesyslogimportant"Lat[5] = "+Lat5~degree+" Lon[5] = "+Lon5~degreesyslogimportant"Lat[6] = "+Lat6~degree+" Lon[6] = "+Lon6~degreesyslogimportant"Lat[7] = "+Lat7~degree+" Lon[7] = "+Lon7~degreesyslogimportant"Lat[8] = "+Lat8~degree+" Lon[8] = "+Lon8~degree# Kick off the first ESP sample on mission start?aggregateSampleOnStart{runinsequencerunwhen(not(FirstSample)and(elapsed(ElapsedSinceLastSampleStart)>FirstSampleTimeOffset))# Start the first ESP sample.syslogimportant"Acquiring first sample."assigninsequenceSampleInProgress=trueassigninsequenceFirstSample=true}# The following aggregates dispatch the waypoints behaviorsaggregateWpt1{runinsequencesyslogimportant"Navigating to box start WP. YoYoMaxDepth:"+YoYoMaxDepth1~meterbehaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth1}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=Lat1setGuidance:Waypoint.longitude=Lon1}}aggregateWpt2{runinsequencesyslogimportant"Navigating to WP2. YoYoMaxDepth: "+YoYoMaxDepth2~meterbehaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth2}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=Lat2setGuidance:Waypoint.longitude=Lon2}}aggregateWpt3{runinsequencesyslogimportant"Navigating to WP3. YoYoMaxDepth: "+YoYoMaxDepth3~meterbehaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth3}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=Lat3setGuidance:Waypoint.longitude=Lon3}}aggregateWpt4{runinsequencesyslogimportant"Navigating to WP4. YoYoMaxDepth: "+YoYoMaxDepth4~meterbehaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth4}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=Lat4setGuidance:Waypoint.longitude=Lon4}}aggregateWpt5{runinsequencesyslogimportant"Navigating to WP5. YoYoMaxDepth:"+YoYoMaxDepth5~meterbehaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth5}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=Lat5setGuidance:Waypoint.longitude=Lon5}}aggregateWpt6{runinsequencesyslogimportant"Navigating to WP6. YoYoMaxDepth:"+YoYoMaxDepth6~meterbehaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth6}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=Lat6setGuidance:Waypoint.longitude=Lon6}}aggregateWpt7{runinsequencesyslogimportant"Navigating to WP7. YoYoMaxDepth: "+YoYoMaxDepth7~meterbehaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth7}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=Lat7setGuidance:Waypoint.longitude=Lon7}}aggregateWpt8{runinsequencesyslogimportant"Navigating to WP8. YoYoMaxDepth: "+YoYoMaxDepth8~meterbehaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth8}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=Lat8setGuidance:Waypoint.longitude=Lon8}}aggregateCircleWpt8{runinsequencebreakif(not(SampleInProgress))syslogimportant"Circling at WP8 until sample is finished."behaviorGuidance:DepthEnvelope{setGuidance:DepthEnvelope.maxDepth=YoYoMaxDepth8}aggregateCircleWrapper{runinsequencerepeat=4096assigninparallelControl:HorizontalControl.kwpHeading=0.010radian_per_meterbehaviorGuidance:Circle{runinsequencesetGuidance:Circle.latitude=Lat8setGuidance:Circle.longitude=Lon8setGuidance:Circle.radius=100metersetGuidance:Circle.maxError=10metersetGuidance:Circle.turnToPort=false}}}}}
<?xml version="1.0" encoding="UTF-8"?><Missionxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="Tethys"xmlns:Units="Tethys/Units"xmlns:Control="Tethys/Control"xmlns:Science="Tethys/Science"xmlns:Universal="Tethys/Universal"xmlns:Guidance="Tethys/Guidance"xsi:schemaLocation="Tethys http://okeanids.mbari.org/tethys/Xml/Tethys.xsd Tethys/Units http://okeanids.mbari.org/tethys/Xml/Units.xsd Tethys/Control http://okeanids.mbari.org/tethys/Xml/Control.xsd Tethys/Science http://okeanids.mbari.org/tethys/Xml/Science.xsd Tethys/Universal http://okeanids.mbari.org/tethys/Xml/Universal.xsd Tethys/Guidance http://okeanids.mbari.org/tethys/Xml/Guidance.xsd"Id="canon_esp_trianguloid"><Description>
This mission navigates to the CANON trianguloid waypoints and sets the
max depth for each leg. The mission can (re)start at any point within
this trajectory by adjusting the `leg` parameter as needed. Samples are
triggered on a clock every SampleInterval.
</Description><!-- Almost every mission should start with an overall timeout and a NeedCommsTime. --><DefineArgName="MissionTimeout"><Description>
Maximum duration of mission
</Description><Units:hour/><Value>42</Value></DefineArg><DefineArgName="NeedCommsTime"><Description>
How often to surface for commumications
</Description><Units:minute/><Value>120</Value></DefineArg><!-- You probably need to change these. --><DefineArgName="leg"><Description>
Leg to start at (default is start at leg 1). leg 1: C1, 40m leg 2: C1 -
M1 Bypass 01, 50m leg 3: M1 Bypass 01 - Soquel Monterey Junction 01, 50m
leg 4: Soquel Monterey Junction 01 - WG near MARS, 50m leg 5: WG near
MARS - WG near Mid 1, 50m leg 6: WG near Mid 1 - M1 Bypass 01, 50m leg
7: M1 Bypass 01 - C1, 50m leg 8: C1 - ?, 50m (spare wp)
</Description><Units:count/><Value>1</Value></DefineArg><DefineArgName="SampleInterval"><Description>
ESP sampling interval. Must be longer than the duration of a single ESP
sample.
</Description><Units:hour/><Value>2</Value></DefineArg><DefineArgName="FirstSampleTimeOffset"><Description>
When true, the mission will acquire and ESP sample at the start of the
mission. When false, the mission will wait for the SampleInterval before
acquiring the first sample.
</Description><Units:minute/><Value>10</Value></DefineArg><DefineArgName="SampleESP"><Description>
When true, aqurie an ESP sample.
</Description><True/></DefineArg><DefineArgName="CartridgeType"><Description>
Specifies ESP cartridge type code (defaults to archive_bac: -6)
</Description><Units:count/><Value>-6</Value></DefineArg><DefineArgName="SampleCANONSampler"><Description>
When true, aqurie a CANON Sampler water sample.
</Description><False/></DefineArg><DefineArgName="CANONSamplerDelay"><Description>
How long to delay a CANON Sampler sample after an ESP sample is
intiated.
</Description><Units:minute/><Value>10</Value></DefineArg><DefineArgName="SampleTimeout"><Description>
Max time duration allowed for a single sample.
</Description><Units:hour/><Value>3</Value></DefineArg><DefineArgName="Lat1"><Description>
Latitude of waypoint 1 (default: C1).
</Description><Units:degree/><Value>36.797</Value></DefineArg><DefineArgName="Lon1"><Description>
Longitude of waypoint 1 (default: C1).
</Description><Units:degree/><Value>-121.847</Value></DefineArg><DefineArgName="Lat2"><Description>
Latitude of waypoint 2 (default: M1 Bypass 01).
</Description><Units:degree/><Value>36.754</Value></DefineArg><DefineArgName="Lon2"><Description>
Longitude of waypoint 2 (default: M1 Bypass 01).
</Description><Units:degree/><Value>-122.0155</Value></DefineArg><DefineArgName="Lat3"><Description>
Latitude of waypoint 3 (default: Soquel Monterey Junction 01).
</Description><Units:degree/><Value>36.7825</Value></DefineArg><DefineArgName="Lon3"><Description>
Longitude of waypoint 3 (default: Soquel Monterey Junction 01).
</Description><Units:degree/><Value>-122.018</Value></DefineArg><DefineArgName="Lat4"><Description>
Latitude of waypoint 4 (default: WG near MARS).
</Description><Units:degree/><Value>36.7117</Value></DefineArg><DefineArgName="Lon4"><Description>
Longitude of waypoint 4 (default: WG near MARS).
</Description><Units:degree/><Value>-122.1919</Value></DefineArg><DefineArgName="Lat5"><Description>
Latitude of waypoint 5 (default: WG near Mid 1).
</Description><Units:degree/><Value>36.6978</Value></DefineArg><DefineArgName="Lon5"><Description>
Longitude of waypoint 5 (default: WG near Mid 1).
</Description><Units:degree/><Value>-122.0562</Value></DefineArg><DefineArgName="Lat6"><Description>
Latitude of waypoint 6 (default: M1 Bypass 01).
</Description><Units:degree/><Value>36.754</Value></DefineArg><DefineArgName="Lon6"><Description>
Longitude of waypoint 6 (default: M1 Bypass 01).
</Description><Units:degree/><Value>-122.0155</Value></DefineArg><DefineArgName="Lat7"><Description>
Latitude of waypoint 7 (default: C1).
</Description><Units:degree/><Value>36.797</Value></DefineArg><DefineArgName="Lon7"><Description>
Longitude of waypoint 7 (default: C1).
</Description><Units:degree/><Value>-121.847</Value></DefineArg><DefineArgName="Lat8"><Description>
Latitude of waypoint 8 (spare).
</Description><Units:degree/><Value>NaN</Value></DefineArg><DefineArgName="Lon8"><Description>
Longitude of waypoint 8 (spare).
</Description><Units:degree/><Value>NaN</Value></DefineArg><DefineArgName="Speed"><Description>
Vehicle speed for the entire mission.
</Description><Units:meter_per_second/><Value>1</Value></DefineArg><DefineArgName="YoYoMinDepth"><Description>
Minimum YoYo depth for the entire mission.
</Description><Units:meter/><Value>5</Value></DefineArg><DefineArgName="YoYoMaxDepth1"><Description>
Maximum YoYo depth during leg 1.
</Description><Units:meter/><Value>40</Value></DefineArg><DefineArgName="YoYoMaxDepth2"><Description>
Maximum YoYo depth during leg 2.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="YoYoMaxDepth3"><Description>
Maximum YoYo depth during leg 3.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="YoYoMaxDepth4"><Description>
Maximum YoYo depth during leg 4.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="YoYoMaxDepth5"><Description>
Maximum YoYo depth during leg 5.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="YoYoMaxDepth6"><Description>
Maximum YoYo depth during leg 6.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="YoYoMaxDepth7"><Description>
Maximum YoYo depth during leg 7.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="YoYoMaxDepth8"><Description>
Maximum YoYo depth during leg 8.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="YoYoMinAltitude"><Description>
Minimum altitude while performing the YoYo behavior (for
bottom-terminated YoYos).
</Description><Units:meter/><Value>9</Value></DefineArg><DefineArgName="YoYoUpPitch"><Description>
Vehicle up pitch while performing the YoYo behavior.
</Description><Units:degree/><Value>20</Value></DefineArg><DefineArgName="YoYoDownPitch"><Description>
Vehicle down pitch while performing the YoYo behavior.
</Description><Units:degree/><Value>-20</Value></DefineArg><!-- You are even less likely to need to change these. --><DefineArgName="CaptureRadius"><Description>
Waypoint capture radiues.
</Description><Units:meter/><Value>NaN</Value></DefineArg><DefineArgName="MinAltitude"><Description>
Minimum height above the sea floor for the entire mission.
</Description><Units:meter/><Value>5</Value></DefineArg><DefineArgName="MaxDepth"><Description>
Maximum depth for the entire mission.
</Description><Units:meter/><Value>110</Value></DefineArg><DefineArgName="MinOffshore"><Description>
Minimum offshore distance for the entire mission.
</Description><Units:kilometer/><Value>2</Value></DefineArg><DefineOutputName="ElapsedSinceLastSampleStart"><Description>
Mission variable (don't change). The mission sets this variable to reset
the ESP sample timer.
</Description><Units:minute/><Value>0</Value></DefineOutput><DefineOutputName="ElapsedTime"><Description>
Mission variable (don't change). The mission sets this variable to reset
the ESP sample timer.
</Description><Units:hour/><Value>0</Value></DefineOutput><DefineOutputName="SampleInProgress"><Description>
Mission variable (don't change). The mission sets this variable to while
sampling is in progress.
</Description><False/></DefineOutput><DefineOutputName="FirstSample"><Description>
Mission variable (don't change). The mission sets this variable to when
it's time to take the first sample.
</Description><False/></DefineOutput><!-- Missions should almost always start with a timeout --><TimeoutDuration="MissionTimeout"/><InsertFilename="Insert/Science.xml"><Description>
Most missions will run the science sensors. If you don't place this
aggregate above NeedComms, science instruments get turned off on the
last upcast and while floating on the surface.
</Description></Insert><!-- Most missions should use the NeedComms aggregate. --><InsertFilename="Insert/NeedComms.xml"Id="NeedComms"/><Assign><Sequence/><ArgName="NeedComms:DiveInterval"/><ArgName="NeedCommsTime"/></Assign><!-- Missions should almost always start with standard safety envelopes; most missions should not expose the parameters of these envelopes. --><InsertFilename="Insert/StandardEnvelopes.xml"/><Assign><Sequence/><ArgName="StandardEnvelopes:MinAltitude"/><ArgName="MinAltitude"/></Assign><Assign><Sequence/><ArgName="StandardEnvelopes:MaxDepth"/><ArgName="MaxDepth"/></Assign><Assign><Sequence/><ArgName="StandardEnvelopes:MinOffshore"/><ArgName="MinOffshore"/></Assign><Assign><Sequence/><ArgName="StandardEnvelopes:MaxDepth"/><ArgName="MaxDepth"/></Assign><Assign><Sequence/><ArgName="StandardEnvelopes:MinOffshore"/><ArgName="MinOffshore"/></Assign><!-- Sampling directives --><AggregateId="CheckSamplingSettings"><Sequence/><SyslogSeverity="Info">Checking sampling settings.</Syslog><AggregateId="CheckESP"><When><ArgName="SampleESP"/><And><Not><Science:ESPComponent.loadAtStartup/></Not></And></When><SyslogSeverity="Critical">Cannot service ESP sample request. ESPComponent is not loaded.</Syslog></Aggregate><AggregateId="CheckCANONSampler"><When><ArgName="SampleCANONSampler"/><And><Not><Science:CANONSampler.loadAtStartup/></Not></And></When><SyslogSeverity="Critical">Cannot service CANONSampler water sample request. CANONSampler component is not loaded.</Syslog></Aggregate></Aggregate><InsertFilename="Insert/Sample.xml"><RedefineArgName="SampleTimeout"><ArgName="SampleTimeout"/></RedefineArg></Insert><!-- Automatically cycle logs every 24 hours --><AggregateId="CycleLogs"><Parallel/><Aggregate><Sequence/><Guidance:Wait><Sequence/><Setting><Guidance:Wait.duration/><Units:hour/><Value>24</Value></Setting></Guidance:Wait><SyslogSeverity="Important">Restarting logs.</Syslog><Guidance:Execute><Sequence/><Setting><Guidance:Execute.command/><String>restart logs</String></Setting></Guidance:Execute></Aggregate></Aggregate><!-- Acquire ESP sample every SampleInterval --><AggregateId="SampleTimer"><While><ArgName="FirstSample"/><And><ArgName="SampleInProgress"/><Or><Elapsed><ArgName="ElapsedSinceLastSampleStart"/></Elapsed><Gt><ArgName="SampleInterval"/></Gt></Or></And></While><AggregateId="AcquireSample"><Sequence/><Assign><Sequence/><ArgName="ElapsedTime"/><Elapsed><ArgName="ElapsedSinceLastSampleStart"/></Elapsed></Assign><SyslogSeverity="Important">Pre-sample comms. Elapsed time since last water sample: <ArgName="ElapsedTime"/><Units:hour/></Syslog><!-- Surface for comms before initiating the sample sequence --><CallId="PreSampleComms"RefId="NeedComms"/><!-- Set the surface comms interval to the sample timeout to avoid interruptions while sampling --><Assign><Sequence/><ArgName="NeedComms:DiveInterval"/><ArgName="SampleTimeout"/></Assign><AggregateId="WaitForDepth"><Sequence/><Break><Universal:depth/><Ge><ArgName="YoYoMinDepth"/></Ge></Break><SyslogSeverity="Info">Waiting to achieve min depth of <ArgName="YoYoMinDepth"/><Units:meter/></Syslog><Guidance:Wait><Sequence/><Setting><Guidance:Wait.duration/><ArgName="SampleTimeout"/></Setting></Guidance:Wait></Aggregate><!-- Indicate a sample is in progress --><Assign><Sequence/><ArgName="SampleInProgress"/><True/></Assign><!-- This assignment restarts the sample timer --><Assign><Sequence/><ArgName="ElapsedSinceLastSampleStart"/><Value>0</Value></Assign><!-- Configure sampling sequance --><Assign><Sequence/><ArgName="Sample:SampleCANONSampler"/><ArgName="SampleCANONSampler"/></Assign><Assign><Sequence/><ArgName="Sample:CANONSamplerDelay"/><ArgName="CANONSamplerDelay"/></Assign><Assign><Sequence/><ArgName="Sample:ESPCartridgeType"/><ArgName="CartridgeType"/></Assign><Assign><Sequence/><ArgName="Sample:SampleESP"/><ArgName="SampleESP"/></Assign><!-- Trigger sampling sequance --><CallId="TriggerSample"RefId="Sample"/><!-- Surface for comms after the sampling sequence completes --><CallId="PostSampleComms"RefId="NeedComms"/><!-- Reinstate nominal surface comms interval --><Assign><Sequence/><ArgName="NeedComms:DiveInterval"/><ArgName="NeedCommsTime"/></Assign><Assign><Sequence/><ArgName="SampleInProgress"/><False/></Assign></Aggregate></Aggregate><CallId="StartingMission"RefId="NeedComms"/><!-- Many missions will keep mass position and buoyancy volume fixed at defaults. --><Guidance:Pitch><Parallel/><Setting><Guidance:Pitch.massPosition/><Control:VerticalControl.massDefault/></Setting></Guidance:Pitch><Guidance:Buoyancy><Parallel/><Setting><Guidance:Buoyancy.position/><Control:VerticalControl.buoyancyNeutral/></Setting></Guidance:Buoyancy><Guidance:SetSpeed><Parallel/><Setting><Guidance:SetSpeed.speed/><ArgName="Speed"/></Setting></Guidance:SetSpeed><Guidance:DepthEnvelope><Description>
Another depth envelope for the YoYo behavior. This envelope should
fall within the limits of the standard safety envelopes in
Insert/StandardEnvelopes.xml in order to avoid commanding high pitch
angles for depth-terminated YoYos.
</Description><Parallel/><Setting><Guidance:DepthEnvelope.minDepth/><ArgName="YoYoMinDepth"/></Setting><Setting><Guidance:DepthEnvelope.downPitch/><ArgName="YoYoDownPitch"/></Setting><Setting><Guidance:DepthEnvelope.upPitch/><ArgName="YoYoUpPitch"/></Setting></Guidance:DepthEnvelope><Guidance:AltitudeEnvelope><Description>
Another altitude envelope for the YoYo behavior. This envelope
should fall within the limits of the standard safety envelopes in
Insert/StandardEnvelopes.xml in order to avoid commanding high pitch
angles for bottom-terminated YoYos.
</Description><Parallel/><Setting><Guidance:AltitudeEnvelope.minAltitude/><ArgName="YoYoMinAltitude"/></Setting><Setting><Guidance:AltitudeEnvelope.upPitch/><ArgName="YoYoUpPitch"/></Setting></Guidance:AltitudeEnvelope><Guidance:YoYo><Parallel/><Setting><Guidance:YoYo.downPitch/><ArgName="YoYoDownPitch"/></Setting><Setting><Guidance:YoYo.upPitch/><ArgName="YoYoUpPitch"/></Setting></Guidance:YoYo><AggregateId="SetWaypointsPerLegParameter"><Description>
The following Leg2-5 aggregates adjust the Lat[] and Lon[] variables
according to the `trajectory` parameter:
</Description><Sequence/><AggregateId="Leg2"><Sequence/><Break><ArgName="leg"/><Le><Units:count/><Value>1</Value></Le></Break><Assign><Sequence/><ArgName="Lat1"/><Units:degree/><Value>NaN</Value></Assign><Assign><Sequence/><ArgName="Lon1"/><Units:degree/><Value>NaN</Value></Assign></Aggregate><AggregateId="Leg3"><Sequence/><Break><ArgName="leg"/><Le><Units:count/><Value>2</Value></Le></Break><Assign><Sequence/><ArgName="Lat2"/><Units:degree/><Value>NaN</Value></Assign><Assign><Sequence/><ArgName="Lon2"/><Units:degree/><Value>NaN</Value></Assign></Aggregate><AggregateId="Leg4"><Sequence/><Break><ArgName="leg"/><Le><Units:count/><Value>3</Value></Le></Break><Assign><Sequence/><ArgName="Lat3"/><Units:degree/><Value>NaN</Value></Assign><Assign><Sequence/><ArgName="Lon3"/><Units:degree/><Value>NaN</Value></Assign></Aggregate><AggregateId="Leg5"><Sequence/><Break><ArgName="leg"/><Le><Units:count/><Value>4</Value></Le></Break><Assign><Sequence/><ArgName="Lat4"/><Units:degree/><Value>NaN</Value></Assign><Assign><Sequence/><ArgName="Lon4"/><Units:degree/><Value>NaN</Value></Assign></Aggregate><AggregateId="Leg6"><Sequence/><Break><ArgName="leg"/><Le><Units:count/><Value>5</Value></Le></Break><Assign><Sequence/><ArgName="Lat5"/><Units:degree/><Value>NaN</Value></Assign><Assign><Sequence/><ArgName="Lon5"/><Units:degree/><Value>NaN</Value></Assign></Aggregate><AggregateId="Leg7"><Sequence/><Break><ArgName="leg"/><Le><Units:count/><Value>6</Value></Le></Break><Assign><Sequence/><ArgName="Lat6"/><Units:degree/><Value>NaN</Value></Assign><Assign><Sequence/><ArgName="Lon6"/><Units:degree/><Value>NaN</Value></Assign></Aggregate><AggregateId="Leg8"><Sequence/><Break><ArgName="leg"/><Le><Units:count/><Value>7</Value></Le></Break><Assign><Sequence/><ArgName="Lat7"/><Units:degree/><Value>NaN</Value></Assign><Assign><Sequence/><ArgName="Lon7"/><Units:degree/><Value>NaN</Value></Assign></Aggregate></Aggregate><AggregateId="Lap"><Sequence/><SyslogSeverity="Important">Starting Lap</Syslog><SyslogSeverity="Important">Lat[1] = <ArgName="Lat1"/><Units:degree/> Lon[1] = <ArgName="Lon1"/><Units:degree/></Syslog><SyslogSeverity="Important">Lat[2] = <ArgName="Lat2"/><Units:degree/> Lon[2] = <ArgName="Lon2"/><Units:degree/></Syslog><SyslogSeverity="Important">Lat[3] = <ArgName="Lat3"/><Units:degree/> Lon[3] = <ArgName="Lon3"/><Units:degree/></Syslog><SyslogSeverity="Important">Lat[4] = <ArgName="Lat4"/><Units:degree/> Lon[4] = <ArgName="Lon4"/><Units:degree/></Syslog><SyslogSeverity="Important">Lat[5] = <ArgName="Lat5"/><Units:degree/> Lon[5] = <ArgName="Lon5"/><Units:degree/></Syslog><SyslogSeverity="Important">Lat[6] = <ArgName="Lat6"/><Units:degree/> Lon[6] = <ArgName="Lon6"/><Units:degree/></Syslog><SyslogSeverity="Important">Lat[7] = <ArgName="Lat7"/><Units:degree/> Lon[7] = <ArgName="Lon7"/><Units:degree/></Syslog><SyslogSeverity="Important">Lat[8] = <ArgName="Lat8"/><Units:degree/> Lon[8] = <ArgName="Lon8"/><Units:degree/></Syslog><!-- Kick off the first ESP sample on mission start? --><AggregateId="SampleOnStart"><Sequence/><When><Not><ArgName="FirstSample"/></Not><And><Elapsed><ArgName="ElapsedSinceLastSampleStart"/></Elapsed><Gt><ArgName="FirstSampleTimeOffset"/></Gt></And></When><!-- Start the first ESP sample. --><SyslogSeverity="Important">Acquiring first sample.</Syslog><Assign><Sequence/><ArgName="SampleInProgress"/><True/></Assign><Assign><Sequence/><ArgName="FirstSample"/><True/></Assign></Aggregate><!-- The following aggregates dispatch the waypoints behaviors --><AggregateId="Wpt1"><Sequence/><SyslogSeverity="Important">Navigating to box start WP. YoYoMaxDepth:<ArgName="YoYoMaxDepth1"/><Units:meter/></Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth1"/></Setting></Guidance:DepthEnvelope><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="Lat1"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="Lon1"/></Setting></Guidance:Waypoint></Aggregate><AggregateId="Wpt2"><Sequence/><SyslogSeverity="Important">Navigating to WP2. YoYoMaxDepth: <ArgName="YoYoMaxDepth2"/><Units:meter/></Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth2"/></Setting></Guidance:DepthEnvelope><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="Lat2"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="Lon2"/></Setting></Guidance:Waypoint></Aggregate><AggregateId="Wpt3"><Sequence/><SyslogSeverity="Important">Navigating to WP3. YoYoMaxDepth: <ArgName="YoYoMaxDepth3"/><Units:meter/></Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth3"/></Setting></Guidance:DepthEnvelope><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="Lat3"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="Lon3"/></Setting></Guidance:Waypoint></Aggregate><AggregateId="Wpt4"><Sequence/><SyslogSeverity="Important">Navigating to WP4. YoYoMaxDepth: <ArgName="YoYoMaxDepth4"/><Units:meter/></Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth4"/></Setting></Guidance:DepthEnvelope><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="Lat4"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="Lon4"/></Setting></Guidance:Waypoint></Aggregate><AggregateId="Wpt5"><Sequence/><SyslogSeverity="Important">Navigating to WP5. YoYoMaxDepth:<ArgName="YoYoMaxDepth5"/><Units:meter/></Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth5"/></Setting></Guidance:DepthEnvelope><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="Lat5"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="Lon5"/></Setting></Guidance:Waypoint></Aggregate><AggregateId="Wpt6"><Sequence/><SyslogSeverity="Important">Navigating to WP6. YoYoMaxDepth:<ArgName="YoYoMaxDepth6"/><Units:meter/></Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth6"/></Setting></Guidance:DepthEnvelope><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="Lat6"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="Lon6"/></Setting></Guidance:Waypoint></Aggregate><AggregateId="Wpt7"><Sequence/><SyslogSeverity="Important">Navigating to WP7. YoYoMaxDepth: <ArgName="YoYoMaxDepth7"/><Units:meter/></Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth7"/></Setting></Guidance:DepthEnvelope><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="Lat7"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="Lon7"/></Setting></Guidance:Waypoint></Aggregate><AggregateId="Wpt8"><Sequence/><SyslogSeverity="Important">Navigating to WP8. YoYoMaxDepth: <ArgName="YoYoMaxDepth8"/><Units:meter/></Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth8"/></Setting></Guidance:DepthEnvelope><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="Lat8"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="Lon8"/></Setting></Guidance:Waypoint></Aggregate><AggregateId="CircleWpt8"><Sequence/><Break><Not><ArgName="SampleInProgress"/></Not></Break><SyslogSeverity="Important">Circling at WP8 until sample is finished.</Syslog><Guidance:DepthEnvelope><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth8"/></Setting></Guidance:DepthEnvelope><AggregateId="CircleWrapper"><SequenceRepeat="4096"/><Assign><Parallel/><Control:HorizontalControl.kwpHeading/><Units:radian_per_meter/><Value>0.010</Value></Assign><Guidance:Circle><Sequence/><Setting><Guidance:Circle.latitude/><ArgName="Lat8"/></Setting><Setting><Guidance:Circle.longitude/><ArgName="Lon8"/></Setting><Setting><Guidance:Circle.radius/><Units:meter/><Value>100</Value></Setting><Setting><Guidance:Circle.maxError/><Units:meter/><Value>10</Value></Setting><Setting><Guidance:Circle.turnToPort/><False/></Setting></Guidance:Circle></Aggregate></Aggregate></Aggregate></Mission>