missionSmearYoYoCamera{""" After transit, this mission dives to yo-yo min depth, turns on red lights and camera, and begins the cylinder. Lights switch between red/white every LightDeltaTimeSetting minutes. """# Almost every mission should start with an overall timeout and a NeedCommsTime. Drift Missions will have an acoustic timeout instead of a NeedCommsTime.# You probably need to change these.arguments{MissionTimeout=4hour""" Maximum duration of mission """NeedCommsTimeInTransit=30minute""" On the way transiting to the surveying location, how often to surface for commumications """BeingInterrogatedTimeout=1hour""" If the vehicle does not receive an acoustic signal for more than this length of time, it will surface for communications. Set longer than MissionTimeout to effectively disable. """TrackAcousticTarget=true""" Whether to track an acoustic target at all. """# debug# </Description><False/></DefineArg>TrackAcousticTargetDuringTransit=false""" Whether to track an acoustic target during transit (on condition that TrackAcousticTarget is True). """AcousticTargetContactLabel=0count""" The acoustic address of the asset to be tracked """AcousticTargetDepth=NaNmeter""" Depth of acoustic target if known and fixed (or nearly fixed). For example, if the acoustic target is a Wave Glider, set it to zero. This will improve 2D projected position estimates in the Earth reference frame. Defaults to NaN. """AcousticTargetContactTimeout=15minute""" Only use a sufficiently fresh handshake to update the tracking center. """PeriodOfParameterSetting=10.0minute""" Period of taking settings for setting samplers. Set to a large number (e.g., 20000 minutes = 14 days) to practically diable this functionality. """LightDeltaTimeSetting=5.0minute""" Period of red versus white lights. """SpeedTransit=1.0meter_per_second""" Vehicle speed when transiting to the surveying location. """SpeedSurveySetting=1.0meter_per_second""" Value for setting vehicle speed when surveying on cylinder yoyo. """MaxDepth=50meter""" Maximum depth for the entire mission. """YoYoMinDepthSetting=40meter""" Value for setting minimum depth while performing the YoYo behavior. """YoYoMaxDepthSetting=50meter""" Value for setting maximum depth while performing the YoYo behavior. """InitDepthTimeout=20minute""" Maximum time duration for the vehicle to reach the initial yo-yo depth. The vehicle will switch over to attempting yo-yos after the timeout is expired. """TransitYoYoMinDepth=10meter""" Minimum yoyo depth while transiting to the surveying location. """TransitYoYoMaxDepth=50meter""" Maximum yoyo depth while transiting to the surveying location. """TransitCaptureRadius=100meter""" Waypoint capture radius for transiting to the surveying location. """CylinderRadiusSetting=100meter""" Value for setting radius of cylinder centered at the surveying location. """MaxCirclesOnCylinder=1000count""" Maximum number of circles on cylinder. """# debug# </Description><Units:count/><Value>3</Value></DefineArg>TransitLatitude=NaNdegree""" The latitude of the surveying location. If NaN, will skip transit. """# debug# </Description><Units:degree/><Value>36.805</Value></DefineArg>TransitLongitude=NaNdegree""" The longitude of the surveying location. If NaN, will skip transit. """# debug# </Description><Units:degree/><Value>-121.825</Value></DefineArg>CenterLatitude=NaNdegree""" The latitude of the center of the circle. Fill this in to specify a start position, it will be overwritten once the vehicle receives an acoustic signal from the contact. """CenterLongitude=NaNdegree""" The longitude of the center of the circle. Fill this in to specify a start position, it will be overwritten once the vehicle receives an acoustic signal from the contact. """# Use caution when changing these.YoYoMinAltitude=9meter""" Minimum altitude while performing the YoYo behavior (for bottom-terminated YoYos). """MinAltitude=7meter""" Minimum altitude for the entire mission. """MinOffshore=2kilometer""" Minimum offshore distance for the entire mission. """# You probably do not need to change these.TrackingUpdatePeriod=15second""" How long to wait between acoustic queries """NumberOfPings=1count""" Number of return pings to request with each acoustic query (more than 1 will activate oneway mode) """NumberOfFixesLowPass=4count""" Number of fixes to average to produce smoothed lat/lon/dep output (initialized to 4). """NumberOfStartingFixesToIgnore=8count""" Number of fixes to ignore at the start of mission (as the vehicle just leaves surface, contact's location estimate especailly bearing can be erroneous. Initialized to 8, corresponding to 2 minutes if query interval TrackingUpdatePeriod = 15 s. """CylinderCircleMaxError=100meter""" If this distance away from the circle, drive straight towards (or away from the center). Otherwise, try to reduce distance from the ideal circle. """CylinderCircleTurnToPort=false""" If true, vehicle turns to the left around the center point. If false, vehicle turns to the right. """KwpHeading=0.010radian_per_meter""" Used to relax waypoint cross-track error constant that is adjusted for docking. (You can override this setting by passing an argument.) """YoYoUpPitch=20degree""" Vehicle up pitch while performing the YoYo behavior. """YoYoDownPitch=-20degree""" Vehicle down pitch while performing the YoYo behavior. """BuoyancyNeutral=Control:VerticalControl.buoyancyNeutral""" Buoyancy bladder position while performing the YoYo behavior. Defaults to buoyancyNeutral setting in the Config/Control.cfg file. Set to NaN cc for active buoyancy """MassDefault=Control:VerticalControl.massDefault""" Static setting for mass during the mission. Set to NaN mm for active mass position """# Internal variables that you should not changeLightDeltaTime=5.0minute""" Period of red versus white lights. """SpeedSurvey=1.0meter_per_second""" Vehicle speed when surveying on cylinder yoyo. """YoYoMinDepth=1.5meter""" Minimum depth while performing the YoYo behavior. Initialized to 1.5 m. """YoYoMaxDepth=20meter""" Maximum depth while performing the YoYo behavior. Initialized to 20 m. """CylinderRadius=100meter""" Radius of cylinder centered at the surveying location. Initialized to 100 m. """FlagFirstTimeParameterSetting=true""" Flag of first time setting samplers (initialized to True). """ContactLatitudeLowpass=NaNdegree""" Low-pass filtered latitude of contact (initialized to NaN). """ContactLongitudeLowpass=NaNdegree""" Low-pass filtered longitude of contact (initialized to NaN). """FromLastTimeFixToCenterUpdate=0minute""" Elapsed time from last time-fix to center update time (initialized to zero). """FromLastTimeFixToParameterSetting=NaNminute""" Elapsed time from last time-fix to setting of samplers. """LastLightSwitchTime=NaNminute""" Elapsed time from last time the light color was switched. """WhiteLightsRequested=false""" Indicates white lights should be turned on (default is red to start so we don't scare the fish). If false, red will be turned on. """TransitWaypointCompleted=false""" Transit waypoint is completed (initialized to false). """}# Missions should almost always start with a timeout and a NeedComms aggregate. Drift missions will not use NeedComms.timeoutduration=MissionTimeout# Missions should almost always start with standard safety envelopesinsertInsert/StandardEnvelopes.xmlassigninsequenceStandardEnvelopes:MinAltitude=MinAltitudeassigninsequenceStandardEnvelopes:MaxDepth=MaxDepthassigninsequenceStandardEnvelopes:MinOffshore=MinOffshoreinsertInsert/AbortDrift.xml{redefineArgAcousticTimeout=BeingInterrogatedTimeout}# Many missions will keep mass position fixed at the default.behaviorGuidance:Pitch{runinparallelsetGuidance:Pitch.massPosition=MassDefault}insertInsert/Science.xmlbehaviorGuidance: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}aggregateSetAllParameters{runwhen(called)assigninsequenceSpeedSurvey=SpeedSurveySettingassigninsequenceYoYoMinDepth=YoYoMinDepthSettingassigninsequenceYoYoMaxDepth=YoYoMaxDepthSettingassigninsequenceCylinderRadius=CylinderRadiusSettingassigninsequenceLightDeltaTime=LightDeltaTimeSettingsyslogimportant"Set SpeedSurvey = "+SpeedSurvey~meter_per_second+", YoYoMinDepth = "+YoYoMinDepth~meter+", YoYoMaxDepth = "+YoYoMaxDepth~meter+", CylinderRadius = "+CylinderRadius~meter+", LightingPeriod = "+LightDeltaTime~minute+"."}aggregateTrackingAcousticTarget{runwhile((((TrackAcousticTargetandTrackAcousticTargetDuringTransit)orTrackAcousticTargetandnot(TrackAcousticTargetDuringTransit)andTransitWaypointCompleted)orTrackAcousticTargetandisNaN(TransitLatitude))orTrackAcousticTargetandisNaN(TransitLongitude))behaviorEstimation:Tracking{runinparallelsetEstimation:Tracking.contactLabelSetting=AcousticTargetContactLabelsetEstimation:Tracking.numberOfSamplesSetting=NumberOfPingssetEstimation:Tracking.updatePeriodSetting=TrackingUpdatePeriodsetEstimation:Tracking.numFixesLowPassSetting=NumberOfFixesLowPasssetEstimation:Tracking.numStartingFixesToIgnoreSetting=NumberOfStartingFixesToIgnoresetEstimation:Tracking.contactDepthSetting=AcousticTargetDepth}}aggregateMissionStart{runinsequenceinsertInsert/NeedComms.xmlid="NeedComms"callid="MissionStartComms"refId="NeedComms"}aggregateTransitToSurveyingLocation{runinsequencebreakif(isNaN(TransitLatitude)orisNaN(TransitLongitude))insertInsert/NeedComms.xmlid="NeedComms"assigninsequenceNeedComms:DiveInterval=NeedCommsTimeInTransitbehaviorGuidance:SetSpeed{runinparallelsetGuidance:SetSpeed.speed=SpeedTransit}behaviorGuidance:DepthEnvelope{runinparallelsetGuidance:DepthEnvelope.minDepth=TransitYoYoMinDepthsetGuidance:DepthEnvelope.maxDepth=TransitYoYoMaxDepthsetGuidance:DepthEnvelope.downPitch=YoYoDownPitchsetGuidance:DepthEnvelope.upPitch=YoYoUpPitch}behaviorGuidance:YoYo{runinparallelsetGuidance:YoYo.downPitch=YoYoDownPitchsetGuidance:YoYo.upPitch=YoYoUpPitch}behaviorGuidance:Buoyancy{runinparallelsetGuidance:Buoyancy.position=BuoyancyNeutral}behaviorGuidance:Waypoint{runinsequencesetGuidance:Waypoint.latitude=TransitLatitudesetGuidance:Waypoint.longitude=TransitLongitudesetGuidance:Waypoint.captureRadius=TransitCaptureRadius}assigninsequenceTransitWaypointCompleted=true}aggregateInitializeWithGPSlatlon{runinsequencerunwhen(isNaN(CenterLatitude)orisNaN(CenterLongitude))assigninsequenceCenterLatitude=Universal:latitude_fixassigninsequenceCenterLongitude=Universal:longitude_fixsyslogimportant"Initialize CenterLatitude and CenterLongitude to GPS fix: "+CenterLatitude~degree+", "+CenterLongitude~degree+"."}aggregateUpdateCenter{runwhen(elapsed(Estimation:Tracking.range_to_contact)<AcousticTargetContactTimeout)assigninsequenceContactLatitudeLowpass=Estimation:Tracking.contact_latitude_lowpassassigninsequenceContactLongitudeLowpass=Estimation:Tracking.contact_longitude_lowpassaggregateUpdateWithContactLowpassLatLon{runinsequencerunwhen((not(isNaN(ContactLatitudeLowpass))andnot(isNaN(ContactLongitudeLowpass)))andelapsed(Universal:time_fix)>=FromLastTimeFixToCenterUpdate+TrackingUpdatePeriod)assigninsequenceCenterLatitude=ContactLatitudeLowpassassigninsequenceCenterLongitude=ContactLongitudeLowpasssysloginfo"Updating. FromLastTimeFixToCenterUpdate, CenterLatitude, CenterLongitude = "+FromLastTimeFixToCenterUpdate~second+", "+CenterLatitude~degree+", "+CenterLongitude~degreeassigninsequenceFromLastTimeFixToCenterUpdate=elapsed(Universal:time_fix)}}aggregatePeriodicSetting{runwhen(FlagFirstTimeParameterSettingorelapsed(Universal:time_fix)>=FromLastTimeFixToParameterSetting+PeriodOfParameterSetting)callid="SetLightingAndOtherParameters"refId="SetAllParameters"assigninsequenceFlagFirstTimeParameterSetting=falseassigninsequenceFromLastTimeFixToParameterSetting=elapsed(Universal:time_fix)}aggregateInitialDive{""" Descend from to initial depth prior to beginning yo-yos and turning on the lights/camera. """runinsequencebehaviorGuidance:Buoyancy{runinparallelsetGuidance:Buoyancy.position=BuoyancyNeutral}behaviorGuidance:SetSpeed{runinparallelsetGuidance:SetSpeed.speed=SpeedSurvey}behaviorGuidance:Pitch{runinsequencetimeoutduration=InitDepthTimeout{syslogimportant"Timed out at current depth of "+Universal:depth~meter+". Switching to yo-yo command."}setGuidance:Pitch.depth=YoYoMinDepth}}# Now that the initial dive is done, get on with the yo-yosaggregateCylinder{runinsequencebehaviorGuidance:SetSpeed{runinparallelsetGuidance:SetSpeed.speed=SpeedSurvey}behaviorGuidance:DepthEnvelope{runinparallelsetGuidance:DepthEnvelope.minDepth=YoYoMinDepthsetGuidance:DepthEnvelope.maxDepth=YoYoMaxDepthsetGuidance:DepthEnvelope.downPitch=YoYoDownPitchsetGuidance:DepthEnvelope.upPitch=YoYoUpPitch}behaviorGuidance:YoYo{runinparallelsetGuidance:YoYo.downPitch=YoYoDownPitchsetGuidance:YoYo.upPitch=YoYoUpPitch}behaviorGuidance:Buoyancy{runinparallelsetGuidance:Buoyancy.position=BuoyancyNeutral}# Power CamerareadDataid="PowerCamera"{Sensor:PowerOnly.sampleLoad1}sysloginfo"Activating camera."# Wait one minute for camera to start recordingbehaviorGuidance:Wait{runinsequencesetGuidance:Wait.duration=25second}# Here we start the light clock and effectively turn on the default (red) lightsassigninsequenceLastLightSwitchTime=elapsed(Universal:time_fix)sysloginfo"Activating Red Lights."# As long as the time hasn't expired and white lights are requested, turn on the white onesaggregateWhiteLights{runwhile((elapsed(Universal:time_fix)<=LastLightSwitchTime+LightDeltaTime)andWhiteLightsRequested)aggregatePowerRequest{runinsequence# Power White LightsreadDataid="PowerWhiteLights"{Sensor:PowerOnly.sampleLoad3}}}# As long as the time hasn't expired and white lights are NOT requested, turn on the red onesaggregateRedLights{runwhile((elapsed(Universal:time_fix)<=LastLightSwitchTime+LightDeltaTime)andnot(WhiteLightsRequested))aggregatePowerRequest{runinsequence# Power Red LightsreadDataid="PowerRedLights"{Sensor:PowerOnly.sampleLoad2}}}# These two aggregates below handle the logic for turning lights from white to red by setting the boolean and resetting the timeraggregateFlipLightsWhite{runwhen((elapsed(Universal:time_fix)>=LastLightSwitchTime+LightDeltaTime)andnot(WhiteLightsRequested))aggregate{runinsequencesysloginfo"Activating White Lights."assigninparallelWhiteLightsRequested=trueassigninparallelLastLightSwitchTime=elapsed(Universal:time_fix)}}aggregateFlipLightsRed{runwhen((elapsed(Universal:time_fix)>=LastLightSwitchTime+LightDeltaTime)andWhiteLightsRequested)aggregate{runinsequencesysloginfo"Activating Red Lights."assigninparallelWhiteLightsRequested=falseassigninparallelLastLightSwitchTime=elapsed(Universal:time_fix)}}aggregateCylinderYoYo{runinsequencesyslogimportant"Yoyo profile on a cylinder around location "+CenterLatitude~degree+","+CenterLongitude~degree+", at radius = "+CylinderRadius~meter+"."aggregateCylinderWrapper{runinsequencerepeat=MaxCirclesOnCylinderassigninparallelControl:HorizontalControl.kwpHeading=KwpHeadingbehaviorGuidance:Circle{runinsequencesetGuidance:Circle.latitude=CenterLatitudesetGuidance:Circle.longitude=CenterLongitudesetGuidance:Circle.radius=CylinderRadiussetGuidance:Circle.maxError=CylinderCircleMaxErrorsetGuidance:Circle.turnToPort=CylinderCircleTurnToPort}}}}}
<?xml version="1.0" encoding="UTF-8"?><Missionxmlns="Tethys"xmlns:Control="Tethys/Control"xmlns:Estimation="Tethys/Estimation"xmlns:Guidance="Tethys/Guidance"xmlns:Sensor="Tethys/Sensor"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/Sensor http://okeanids.mbari.org/tethys/Xml/Sensor.xsd Tethys/Units http://okeanids.mbari.org/tethys/Xml/Units.xsd Tethys/Universal http://okeanids.mbari.org/tethys/Xml/Universal.xsd"Id="SmearYoYoCamera"><Description>
After transit, this mission dives to yo-yo min depth, turns on red
lights and camera, and begins the cylinder. Lights switch between
red/white every LightDeltaTimeSetting minutes.
</Description><!-- Almost every mission should start with an overall timeout and a NeedCommsTime. Drift Missions will have an acoustic timeout instead of a NeedCommsTime. --><!-- You probably need to change these. --><DefineArgName="MissionTimeout"><Description>
Maximum duration of mission
</Description><Units:hour/><Value>4</Value></DefineArg><DefineArgName="NeedCommsTimeInTransit"><Description>
On the way transiting to the surveying location, how often to surface
for commumications
</Description><Units:minute/><Value>30</Value></DefineArg><DefineArgName="BeingInterrogatedTimeout"><Description>
If the vehicle does not receive an acoustic signal for more than this
length of time, it will surface for communications. Set longer than
MissionTimeout to effectively disable.
</Description><Units:hour/><Value>1</Value></DefineArg><DefineArgName="TrackAcousticTarget"><Description>
Whether to track an acoustic target at all.
</Description><True/></DefineArg><!--debug </Description><False/></DefineArg>--><DefineArgName="TrackAcousticTargetDuringTransit"><Description>
Whether to track an acoustic target during transit (on condition that
TrackAcousticTarget is True).
<!--debug </Description><True/></DefineArg>--></Description><False/></DefineArg><DefineArgName="AcousticTargetContactLabel"><Description>
The acoustic address of the asset to be tracked
</Description><Units:count/><Value>0</Value></DefineArg><DefineArgName="AcousticTargetDepth"><Description>
Depth of acoustic target if known and fixed (or nearly fixed). For
example, if the acoustic target is a Wave Glider, set it to zero. This
will improve 2D projected position estimates in the Earth reference
frame. Defaults to NaN.
</Description><Units:meter/><Value>NaN</Value></DefineArg><DefineArgName="AcousticTargetContactTimeout"><Description>
Only use a sufficiently fresh handshake to update the tracking center.
</Description><Units:minute/><Value>15</Value></DefineArg><DefineArgName="PeriodOfParameterSetting"><Description>
Period of taking settings for setting samplers. Set to a large number
(e.g., 20000 minutes = 14 days) to practically diable this
functionality.
</Description><Units:minute/><Value>10.0</Value></DefineArg><DefineArgName="LightDeltaTimeSetting"><Description>
Period of red versus white lights.
</Description><Units:minute/><Value>5.0</Value></DefineArg><DefineArgName="SpeedTransit"><Description>
Vehicle speed when transiting to the surveying location.
</Description><Units:meter_per_second/><Value>1.0</Value></DefineArg><DefineArgName="SpeedSurveySetting"><Description>
Value for setting vehicle speed when surveying on cylinder yoyo.
</Description><Units:meter_per_second/><Value>1.0</Value></DefineArg><DefineArgName="MaxDepth"><Description>
Maximum depth for the entire mission.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="YoYoMinDepthSetting"><Description>
Value for setting minimum depth while performing the YoYo behavior.
</Description><Units:meter/><Value>40</Value></DefineArg><DefineArgName="YoYoMaxDepthSetting"><Description>
Value for setting maximum depth while performing the YoYo behavior.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="InitDepthTimeout"><Description>
Maximum time duration for the vehicle to reach the initial yo-yo depth.
The vehicle will switch over to attempting yo-yos after the timeout is
expired.
</Description><Units:minute/><Value>20</Value></DefineArg><DefineArgName="TransitYoYoMinDepth"><Description>
Minimum yoyo depth while transiting to the surveying location.
</Description><Units:meter/><Value>10</Value></DefineArg><DefineArgName="TransitYoYoMaxDepth"><Description>
Maximum yoyo depth while transiting to the surveying location.
</Description><Units:meter/><Value>50</Value></DefineArg><DefineArgName="TransitCaptureRadius"><Description>
Waypoint capture radius for transiting to the surveying location.
</Description><Units:meter/><Value>100</Value></DefineArg><DefineArgName="CylinderRadiusSetting"><Description>
Value for setting radius of cylinder centered at the surveying location.
</Description><Units:meter/><Value>100</Value></DefineArg><DefineArgName="MaxCirclesOnCylinder"><Description>
Maximum number of circles on cylinder.
</Description><Units:count/><Value>1000</Value></DefineArg><!--debug </Description><Units:count/><Value>3</Value></DefineArg>--><DefineArgName="TransitLatitude"><Description>
The latitude of the surveying location. If NaN, will skip transit.
</Description><Units:degree/><Value>NaN</Value></DefineArg><!--debug </Description><Units:degree/><Value>36.805</Value></DefineArg>--><DefineArgName="TransitLongitude"><Description>
The longitude of the surveying location. If NaN, will skip transit.
</Description><Units:degree/><Value>NaN</Value></DefineArg><!--debug </Description><Units:degree/><Value>-121.825</Value></DefineArg>--><DefineArgName="CenterLatitude"><Description>
The latitude of the center of the circle. Fill this in to specify a
start position, it will be overwritten once the vehicle receives an
acoustic signal from the contact.
</Description><Units:degree/><Value>NaN</Value></DefineArg><DefineArgName="CenterLongitude"><Description>
The longitude of the center of the circle. Fill this in to specify a
start position, it will be overwritten once the vehicle receives an
acoustic signal from the contact.
</Description><Units:degree/><Value>NaN</Value></DefineArg><!-- Use caution when changing these. --><DefineArgName="YoYoMinAltitude"><Description>
Minimum altitude while performing the YoYo behavior (for
bottom-terminated YoYos).
</Description><Units:meter/><Value>9</Value></DefineArg><DefineArgName="MinAltitude"><Description>
Minimum altitude for the entire mission.
</Description><Units:meter/><Value>7</Value></DefineArg><DefineArgName="MinOffshore"><Description>
Minimum offshore distance for the entire mission.
</Description><Units:kilometer/><Value>2</Value></DefineArg><!-- You probably do not need to change these. --><DefineArgName="TrackingUpdatePeriod"><Description>
How long to wait between acoustic queries
</Description><Units:second/><Value>15</Value></DefineArg><DefineArgName="NumberOfPings"><Description>
Number of return pings to request with each acoustic query (more than 1
will activate oneway mode)
</Description><Units:count/><Value>1</Value></DefineArg><DefineArgName="NumberOfFixesLowPass"><Description>
Number of fixes to average to produce smoothed lat/lon/dep output
(initialized to 4).
</Description><Units:count/><Value>4</Value></DefineArg><DefineArgName="NumberOfStartingFixesToIgnore"><Description>
Number of fixes to ignore at the start of mission (as the vehicle just
leaves surface, contact's location estimate especailly bearing can be
erroneous. Initialized to 8, corresponding to 2 minutes if query
interval TrackingUpdatePeriod = 15 s.
</Description><Units:count/><Value>8</Value></DefineArg><DefineArgName="CylinderCircleMaxError"><Description>
If this distance away from the circle, drive straight towards (or away
from the center). Otherwise, try to reduce distance from the ideal
circle.
</Description><Units:meter/><Value>100</Value></DefineArg><DefineArgName="CylinderCircleTurnToPort"><Description>
If true, vehicle turns to the left around the center point. If false,
vehicle turns to the right.
</Description><False/></DefineArg><DefineArgName="KwpHeading"><Description>
Used to relax waypoint cross-track error constant that is adjusted for
docking. (You can override this setting by passing an argument.)
</Description><Units:radian_per_meter/><Value>0.010</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><DefineArgName="BuoyancyNeutral"><Description>
Buoyancy bladder position while performing the YoYo behavior. Defaults
to buoyancyNeutral setting in the Config/Control.cfg file. Set to NaN cc
for active buoyancy
</Description><Control:VerticalControl.buoyancyNeutral/></DefineArg><DefineArgName="MassDefault"><Description>
Static setting for mass during the mission. Set to NaN mm for active
mass position
</Description><Control:VerticalControl.massDefault/></DefineArg><!-- Internal variables that you should not change --><DefineArgName="LightDeltaTime"><Description>
Period of red versus white lights.
</Description><Units:minute/><Value>5.0</Value></DefineArg><DefineArgName="SpeedSurvey"><Description>
Vehicle speed when surveying on cylinder yoyo.
</Description><Units:meter_per_second/><Value>1.0</Value></DefineArg><DefineArgName="YoYoMinDepth"><Description>
Minimum depth while performing the YoYo behavior. Initialized to 1.5 m.
</Description><Units:meter/><Value>1.5</Value></DefineArg><DefineArgName="YoYoMaxDepth"><Description>
Maximum depth while performing the YoYo behavior. Initialized to 20 m.
</Description><Units:meter/><Value>20</Value></DefineArg><DefineArgName="CylinderRadius"><Description>
Radius of cylinder centered at the surveying location. Initialized to
100 m.
</Description><Units:meter/><Value>100</Value></DefineArg><DefineArgName="FlagFirstTimeParameterSetting"><Description>
Flag of first time setting samplers (initialized to True).
</Description><True/></DefineArg><DefineArgName="ContactLatitudeLowpass"><Description>
Low-pass filtered latitude of contact (initialized to NaN).
</Description><Units:degree/><Value>NaN</Value></DefineArg><DefineArgName="ContactLongitudeLowpass"><Description>
Low-pass filtered longitude of contact (initialized to NaN).
</Description><Units:degree/><Value>NaN</Value></DefineArg><DefineArgName="FromLastTimeFixToCenterUpdate"><Description>
Elapsed time from last time-fix to center update time (initialized to
zero).
</Description><Units:minute/><Value>0</Value></DefineArg><DefineArgName="FromLastTimeFixToParameterSetting"><Description>
Elapsed time from last time-fix to setting of samplers.
</Description><Units:minute/><Value>NaN</Value></DefineArg><DefineArgName="LastLightSwitchTime"><Description>
Elapsed time from last time the light color was switched.
</Description><Units:minute/><Value>NaN</Value></DefineArg><DefineArgName="WhiteLightsRequested"><Description>
Indicates white lights should be turned on (default is red to start so
we don't scare the fish). If false, red will be turned on.
</Description><False/></DefineArg><DefineArgName="TransitWaypointCompleted"><Description>
Transit waypoint is completed (initialized to false).
</Description><False/></DefineArg><!-- Missions should almost always start with a timeout and a NeedComms aggregate. Drift missions will not use NeedComms. --><TimeoutDuration="MissionTimeout"/><!-- Missions should almost always start with standard safety 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><InsertFilename="Insert/AbortDrift.xml"><RedefineArgName="AcousticTimeout"><ArgName="BeingInterrogatedTimeout"/></RedefineArg></Insert><!-- Many missions will keep mass position fixed at the default. --><Guidance:Pitch><Parallel/><Setting><Guidance:Pitch.massPosition/><ArgName="MassDefault"/></Setting></Guidance:Pitch><InsertFilename="Insert/Science.xml"/><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><AggregateId="SetAllParameters"><When><Called/></When><Assign><Sequence/><ArgName="SpeedSurvey"/><ArgName="SpeedSurveySetting"/></Assign><Assign><Sequence/><ArgName="YoYoMinDepth"/><ArgName="YoYoMinDepthSetting"/></Assign><Assign><Sequence/><ArgName="YoYoMaxDepth"/><ArgName="YoYoMaxDepthSetting"/></Assign><Assign><Sequence/><ArgName="CylinderRadius"/><ArgName="CylinderRadiusSetting"/></Assign><Assign><Sequence/><ArgName="LightDeltaTime"/><ArgName="LightDeltaTimeSetting"/></Assign><SyslogSeverity="Important">Set SpeedSurvey = <ArgName="SpeedSurvey"/><Units:meter_per_second/>, YoYoMinDepth = <ArgName="YoYoMinDepth"/><Units:meter/>, YoYoMaxDepth = <ArgName="YoYoMaxDepth"/><Units:meter/>, CylinderRadius = <ArgName="CylinderRadius"/><Units:meter/>, LightingPeriod = <ArgName="LightDeltaTime"/><Units:minute/>.</Syslog></Aggregate><AggregateId="TrackingAcousticTarget"><While><ArgName="TrackAcousticTarget"/><And><ArgName="TrackAcousticTargetDuringTransit"/></And><Or><ArgName="TrackAcousticTarget"/><And><Not><ArgName="TrackAcousticTargetDuringTransit"/></Not><And><ArgName="TransitWaypointCompleted"/></And></And></Or><Or><ArgName="TrackAcousticTarget"/><And><IsNaN><ArgName="TransitLatitude"/></IsNaN></And></Or><Or><ArgName="TrackAcousticTarget"/><And><IsNaN><ArgName="TransitLongitude"/></IsNaN></And></Or></While><Estimation:Tracking><Parallel/><Setting><Estimation:Tracking.contactLabelSetting/><ArgName="AcousticTargetContactLabel"/></Setting><Setting><Estimation:Tracking.numberOfSamplesSetting/><ArgName="NumberOfPings"/></Setting><Setting><Estimation:Tracking.updatePeriodSetting/><ArgName="TrackingUpdatePeriod"/></Setting><Setting><Estimation:Tracking.numFixesLowPassSetting/><ArgName="NumberOfFixesLowPass"/></Setting><Setting><Estimation:Tracking.numStartingFixesToIgnoreSetting/><ArgName="NumberOfStartingFixesToIgnore"/></Setting><Setting><Estimation:Tracking.contactDepthSetting/><ArgName="AcousticTargetDepth"/></Setting></Estimation:Tracking></Aggregate><AggregateId="MissionStart"><Sequence/><InsertFilename="Insert/NeedComms.xml"Id="NeedComms"/><CallId="MissionStartComms"RefId="NeedComms"/></Aggregate><AggregateId="TransitToSurveyingLocation"><Sequence/><Break><IsNaN><ArgName="TransitLatitude"/></IsNaN><Or><IsNaN><ArgName="TransitLongitude"/></IsNaN></Or></Break><InsertFilename="Insert/NeedComms.xml"Id="NeedComms"/><Assign><Sequence/><ArgName="NeedComms:DiveInterval"/><ArgName="NeedCommsTimeInTransit"/></Assign><Guidance:SetSpeed><Parallel/><Setting><Guidance:SetSpeed.speed/><ArgName="SpeedTransit"/></Setting></Guidance:SetSpeed><Guidance:DepthEnvelope><Parallel/><Setting><Guidance:DepthEnvelope.minDepth/><ArgName="TransitYoYoMinDepth"/></Setting><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="TransitYoYoMaxDepth"/></Setting><Setting><Guidance:DepthEnvelope.downPitch/><ArgName="YoYoDownPitch"/></Setting><Setting><Guidance:DepthEnvelope.upPitch/><ArgName="YoYoUpPitch"/></Setting></Guidance:DepthEnvelope><Guidance:YoYo><Parallel/><Setting><Guidance:YoYo.downPitch/><ArgName="YoYoDownPitch"/></Setting><Setting><Guidance:YoYo.upPitch/><ArgName="YoYoUpPitch"/></Setting></Guidance:YoYo><Guidance:Buoyancy><Parallel/><Setting><Guidance:Buoyancy.position/><ArgName="BuoyancyNeutral"/></Setting></Guidance:Buoyancy><Guidance:Waypoint><Sequence/><Setting><Guidance:Waypoint.latitude/><ArgName="TransitLatitude"/></Setting><Setting><Guidance:Waypoint.longitude/><ArgName="TransitLongitude"/></Setting><Setting><Guidance:Waypoint.captureRadius/><ArgName="TransitCaptureRadius"/></Setting></Guidance:Waypoint><Assign><Sequence/><ArgName="TransitWaypointCompleted"/><True/></Assign></Aggregate><AggregateId="InitializeWithGPSlatlon"><Sequence/><When><IsNaN><ArgName="CenterLatitude"/></IsNaN><Or><IsNaN><ArgName="CenterLongitude"/></IsNaN></Or></When><Assign><Sequence/><ArgName="CenterLatitude"/><Universal:latitude_fix/></Assign><Assign><Sequence/><ArgName="CenterLongitude"/><Universal:longitude_fix/></Assign><SyslogSeverity="Important">Initialize CenterLatitude and CenterLongitude to GPS fix: <ArgName="CenterLatitude"/><Units:degree/>, <ArgName="CenterLongitude"/><Units:degree/>.</Syslog></Aggregate><AggregateId="UpdateCenter"><When><Elapsed><Estimation:Tracking.range_to_contact/></Elapsed><Lt><ArgName="AcousticTargetContactTimeout"/></Lt></When><Assign><Sequence/><ArgName="ContactLatitudeLowpass"/><Estimation:Tracking.contact_latitude_lowpass/></Assign><Assign><Sequence/><ArgName="ContactLongitudeLowpass"/><Estimation:Tracking.contact_longitude_lowpass/></Assign><AggregateId="UpdateWithContactLowpassLatLon"><Sequence/><When><Not><IsNaN><ArgName="ContactLatitudeLowpass"/></IsNaN></Not><And><Not><IsNaN><ArgName="ContactLongitudeLowpass"/></IsNaN></Not></And><And><Elapsed><Universal:time_fix/></Elapsed><Ge><ArgName="FromLastTimeFixToCenterUpdate"/><Add><ArgName="TrackingUpdatePeriod"/></Add></Ge></And></When><Assign><Sequence/><ArgName="CenterLatitude"/><ArgName="ContactLatitudeLowpass"/></Assign><Assign><Sequence/><ArgName="CenterLongitude"/><ArgName="ContactLongitudeLowpass"/></Assign><SyslogSeverity="Info">Updating. FromLastTimeFixToCenterUpdate, CenterLatitude, CenterLongitude = <ArgName="FromLastTimeFixToCenterUpdate"/><Units:second/>, <ArgName="CenterLatitude"/><Units:degree/>, <ArgName="CenterLongitude"/><Units:degree/></Syslog><Assign><Sequence/><ArgName="FromLastTimeFixToCenterUpdate"/><Elapsed><Universal:time_fix/></Elapsed></Assign></Aggregate></Aggregate><AggregateId="PeriodicSetting"><When><ArgName="FlagFirstTimeParameterSetting"/><Or><Elapsed><Universal:time_fix/></Elapsed><Ge><ArgName="FromLastTimeFixToParameterSetting"/><Add><ArgName="PeriodOfParameterSetting"/></Add></Ge></Or></When><CallId="SetLightingAndOtherParameters"RefId="SetAllParameters"/><Assign><Sequence/><ArgName="FlagFirstTimeParameterSetting"/><False/></Assign><Assign><Sequence/><ArgName="FromLastTimeFixToParameterSetting"/><Elapsed><Universal:time_fix/></Elapsed></Assign></Aggregate><AggregateId="InitialDive"><Description>
Descend from to initial depth prior to beginning yo-yos and turning
on the lights/camera.
</Description><Sequence/><Guidance:Buoyancy><Parallel/><Setting><Guidance:Buoyancy.position/><ArgName="BuoyancyNeutral"/></Setting></Guidance:Buoyancy><Guidance:SetSpeed><Parallel/><Setting><Guidance:SetSpeed.speed/><ArgName="SpeedSurvey"/></Setting></Guidance:SetSpeed><Guidance:Pitch><Sequence/><TimeoutDuration="InitDepthTimeout"><SyslogSeverity="Important">Timed out at current depth of <Universal:depth/><Units:meter/>. Switching to yo-yo command.</Syslog></Timeout><Setting><Guidance:Pitch.depth/><ArgName="YoYoMinDepth"/></Setting></Guidance:Pitch></Aggregate><!-- Now that the initial dive is done, get on with the yo-yos --><AggregateId="Cylinder"><Sequence/><Guidance:SetSpeed><Parallel/><Setting><Guidance:SetSpeed.speed/><ArgName="SpeedSurvey"/></Setting></Guidance:SetSpeed><Guidance:DepthEnvelope><Parallel/><Setting><Guidance:DepthEnvelope.minDepth/><ArgName="YoYoMinDepth"/></Setting><Setting><Guidance:DepthEnvelope.maxDepth/><ArgName="YoYoMaxDepth"/></Setting><Setting><Guidance:DepthEnvelope.downPitch/><ArgName="YoYoDownPitch"/></Setting><Setting><Guidance:DepthEnvelope.upPitch/><ArgName="YoYoUpPitch"/></Setting></Guidance:DepthEnvelope><Guidance:YoYo><Parallel/><Setting><Guidance:YoYo.downPitch/><ArgName="YoYoDownPitch"/></Setting><Setting><Guidance:YoYo.upPitch/><ArgName="YoYoUpPitch"/></Setting></Guidance:YoYo><Guidance:Buoyancy><Parallel/><Setting><Guidance:Buoyancy.position/><ArgName="BuoyancyNeutral"/></Setting></Guidance:Buoyancy><!-- Power Camera --><ReadDataId="PowerCamera"><Sensor:PowerOnly.sampleLoad1/></ReadData><SyslogSeverity="Info">Activating camera.</Syslog><!-- Wait one minute for camera to start recording --><Guidance:Wait><Sequence/><Setting><Guidance:Wait.duration/><Units:second/><Value>25</Value></Setting></Guidance:Wait><!-- Here we start the light clock and effectively turn on the default (red) lights --><Assign><Sequence/><ArgName="LastLightSwitchTime"/><Elapsed><Universal:time_fix/></Elapsed></Assign><SyslogSeverity="Info">Activating Red Lights.</Syslog><!-- As long as the time hasn't expired and white lights are requested, turn on the white ones --><AggregateId="WhiteLights"><While><Elapsed><Universal:time_fix/></Elapsed><Le><ArgName="LastLightSwitchTime"/><Add><ArgName="LightDeltaTime"/></Add></Le><And><ArgName="WhiteLightsRequested"/></And></While><AggregateId="PowerRequest"><Sequence/><!-- Power White Lights --><ReadDataId="PowerWhiteLights"><Sensor:PowerOnly.sampleLoad3/></ReadData></Aggregate></Aggregate><!-- As long as the time hasn't expired and white lights are NOT requested, turn on the red ones --><AggregateId="RedLights"><While><Elapsed><Universal:time_fix/></Elapsed><Le><ArgName="LastLightSwitchTime"/><Add><ArgName="LightDeltaTime"/></Add></Le><And><Not><ArgName="WhiteLightsRequested"/></Not></And></While><AggregateId="PowerRequest"><Sequence/><!-- Power Red Lights --><ReadDataId="PowerRedLights"><Sensor:PowerOnly.sampleLoad2/></ReadData></Aggregate></Aggregate><!-- These two aggregates below handle the logic for turning lights from white to red by setting the boolean and resetting the timer --><AggregateId="FlipLightsWhite"><When><Elapsed><Universal:time_fix/></Elapsed><Ge><ArgName="LastLightSwitchTime"/><Add><ArgName="LightDeltaTime"/></Add></Ge><And><Not><ArgName="WhiteLightsRequested"/></Not></And></When><Aggregate><Sequence/><SyslogSeverity="Info">Activating White Lights.</Syslog><Assign><Parallel/><ArgName="WhiteLightsRequested"/><True/></Assign><Assign><Parallel/><ArgName="LastLightSwitchTime"/><Elapsed><Universal:time_fix/></Elapsed></Assign></Aggregate></Aggregate><AggregateId="FlipLightsRed"><When><Elapsed><Universal:time_fix/></Elapsed><Ge><ArgName="LastLightSwitchTime"/><Add><ArgName="LightDeltaTime"/></Add></Ge><And><ArgName="WhiteLightsRequested"/></And></When><Aggregate><Sequence/><SyslogSeverity="Info">Activating Red Lights.</Syslog><Assign><Parallel/><ArgName="WhiteLightsRequested"/><False/></Assign><Assign><Parallel/><ArgName="LastLightSwitchTime"/><Elapsed><Universal:time_fix/></Elapsed></Assign></Aggregate></Aggregate><AggregateId="CylinderYoYo"><Sequence/><SyslogSeverity="Important">Yoyo profile on a cylinder around location <ArgName="CenterLatitude"/><Units:degree/>,<ArgName="CenterLongitude"/><Units:degree/>, at radius = <ArgName="CylinderRadius"/><Units:meter/>.</Syslog><AggregateId="CylinderWrapper"><SequenceRepeat="MaxCirclesOnCylinder"/><Assign><Parallel/><Control:HorizontalControl.kwpHeading/><ArgName="KwpHeading"/></Assign><Guidance:Circle><Sequence/><Setting><Guidance:Circle.latitude/><ArgName="CenterLatitude"/></Setting><Setting><Guidance:Circle.longitude/><ArgName="CenterLongitude"/></Setting><Setting><Guidance:Circle.radius/><ArgName="CylinderRadius"/></Setting><Setting><Guidance:Circle.maxError/><ArgName="CylinderCircleMaxError"/></Setting><Setting><Guidance:Circle.turnToPort/><ArgName="CylinderCircleTurnToPort"/></Setting></Guidance:Circle></Aggregate></Aggregate></Aggregate></Mission>