# This MBARI Mapping AUV mission file has been generated
# by the MB-System program mbm_route2mission run by
# user <rob> on cpu <whitebirdauv> at <Tue Nov 12 14:34:53 PST 2019>
#
# Program mbm_route2mission version:
#     $Id r
#
# Mission Summary:
#     Route File:		PortDavid3V2.rte
#     Mission File:		PortTrapezoid_1v1.cfg
#     Distance: 		1602 (m)  1.602 (km)
#     Estimated Time:		3728 (s)  1.036 (hr)
#     Abort Time:		5592 (s)  1.553 (hr)
#     Max battery life: 	79200 (s)  22.000 (hr)
#     Safety margin:		900 (s)  0.250 (hr)
#     Time to first waypoint:	2000 (s)  0.556 (hr)
#     Descend time:		347 (s)  0.096 (hr)
#     Ascend time:		300 (s)  0.083 (hr)
#     Way Points:		5
#     Route Points:		5
#     Survey Behaviors:
#	   Behavior for waypoint mode 0:   WaypointDepth
#	   Behavior for waypoint mode 1:   WaypointDepth
#	   Behavior for waypoint mode 2:   WaypointDepth
#	   Behavior for waypoint mode 3:   WaypointBottom
#	   Behavior for waypoint mode 4:   WaypointBottom
#     Descent style:		Spiral descent without StartSurvey behavior
#     Mapping sonar control enabled:
#				Multibeam enabled
#				  Multibeam receive gain:	    34 dB
#				  Multibeam transmit gain:	    218 dB
#				  Multibeam pulse width:	    3.3e-05 usec
#				  Multibeam minimum range fraction: 0.4
#				  Multibeam maximum range fraction: 5.0
#				Subbottom enabled
#				Low sidescan enabled
#				High sidescan disabled
#     Benthic imaging camera control disabled:
#
# Mission Parameters:
#     Vehicle Survey Speed:	  1.500000 (m/s) 2.915769 (knots)
#     Vehicle Ascent Speed:	  1.500000 (m/s) 2.915769 (knots)
#     Vehicle Transit Speed:	  1.500000 (m/s) 2.915769 (knots)
#     Minimum Vehicle Altitude 1: 15 (m)
#     Abort Vehicle Altitude 1:   10 (m)
#     Delta Depth Restart 1:	  5 (m)
#     Desired Vehicle Altitude 1: 30 (m)
#     Desired Vehicle Altitude 2: 30 (m)
#     Desired Vehicle Altitude 3: 30 (m)
#     Constant Vehicle Depth 1:   15 (m)
#     Constant Vehicle Depth 2:   60 (m)
#     Maximum Vehicle Depth:	  82.5 (m)
#     Abort Vehicle Depth:	  90 (m)
#     Descent Vehicle Depth:	  3 (m)
#     Spiral descent depth:	  46.54018 m
#     Spiral descent altitude:	  40 m
#     Waypoint Spacing: 	  5000 (m)
#     Maximum climb rate:	  15 (degrees)
#     Time to first waypoint:	  2000 (s)
#     GPS Duration:		  600 (s)
#     Descend Rate:		  0.417 (m/s)
#     Ascend Rate:		  1 (m/s)
#     Initial descend Duration:   300 (s)
#     Setpoint Duration:	  30 (s)
#
# The primary waypoints from the route file are:
#   <number> <longitude (deg)> <latitude (deg)> <topography (m)> <distance (m)> <type>
#   0 -121.945900 36.695501 -96.540180 0.000000 9
#   1 -121.944463 36.695828 -93.077375 133.407549 1
#   2 -121.939169 36.695783 -83.904936 606.395061 11
#   3 -121.937045 36.695114 -97.395262 810.150411 1
#   4 -121.945911 36.695195 -95.489302 1602.288528 12
#
# A total of 5 mission points have been defined.
#
# Define Mission parameters:

#
#######################################################
# Set Mission Behaviors
#
# mission timer set to 120% of estimated time of mission
behavior missionTimer
{
timeOut = 5592;
}
#
# depth envelope
behavior depthEnvelope
{
minDepth      = 0;
maxDepth      = 85.000000;
abortDepth    = 95.000000;
minAltitude   = 10.000000;
abortAltitude = 7.000000;
deltaDepthRestart = 5.000000;
}
#######################################################
# Set End-of-Mission Behaviors
#
#
# acquire gps fix
behavior getgps
{
duration = 600;
minHits = 10;
abortOnTimeout = True;
}
#
# ascend behavior
behavior ascend
{
duration  = 300;
horizontalMode	 = rudder;
horizontal	 = 3.000000;
pitch		 = 45.000000;
speed		 = 1.500000;
endDepth	 = 2.000000;
}
#
# Acoustic update 1 - sent status ping after end of survey
#
behavior acousticUpdate
{
duration  = 2;
dummy  = 1;
}
#
# Turn off power to sonars and stop logging on the PLC
# by setting the value of the mode attribute to 0 (used to be False).
behavior edgetech
{
duration  = 6;
SBP_Mode  = 0;
LoSS_Mode = 0;
HiSS_Mode = 0;
}
behavior reson
{
duration  = 6;
MB_Power = 0;
Log_Mode  = 0;
}
#######################################################
#
#
# Waypoint_bottom behavior to get to end of line 4
#   Segment length 792.138117 meters
#   Minimum depth: 95.489302 meters looking forward 0.000000 meters along route
#   Maximum depth: 95.489302 meters looking forward 0.000000 meters along route
#   Maximum vehicle depth: 82.500000 meters
#   Constant vehicle depth:   60.000000 meters
#   Minimum vehicle altitude: 15.000000 meters
#   Behavior depth of 60.000000 meters set by local depth and desired altitude
#   Vehicle survey speed:     1.500000 m/s
behavior waypoint_bottom
{
latitude	   = 36.695195;
longitude	   = -121.945911;
lastLatitude	   = 36.695114;
lastLongitude	   = -121.937045;
duration	   = 3168;
depth		   = 85.000000;
speed		   = 1.500000;
altitude           = 10.;
avoidRange         = 40.;
useThetaB          = True;
tau		   = 3;
avoidAngle         = 20;
# abortOnTimeout    = True;
# avoidRange	     = 60.0;
# tau		     = 3;
}

#######################################################
# Reset sonar parameters
#   Waypoint type:	      1
#   Commanded altitude:       35.489302
#   Actual altitude:	      35.489302
#   Commanded vehicle depth:  60
#   Seafloor depth:	      -95.489302
#
behavior reson
{
duration  = 6;
MB_Range = 177.45;
MB_Sound_Velocity = 0.0;
MB_Bottom_Detect_Filter_Min_Range = 14.20;
MB_Bottom_Detect_Filter_Max_Range = 177.45;
MB_Bottom_Detect_Filter_Min_Depth = 0.00;
}
#
#######################################################
#
#######################################################
#######################################################
#
#
# Waypoint_bottom behavior to get to end of line 3
#   Segment length 203.755350 meters
#   Minimum depth: 97.395262 meters looking forward 0.000000 meters along route
#   Maximum depth: 97.395262 meters looking forward 0.000000 meters along route
#   Maximum vehicle depth: 82.500000 meters
#   Constant vehicle depth:   60.000000 meters
#   Minimum vehicle altitude: 15.000000 meters
#   Behavior depth of 60.000000 meters set by local depth and desired altitude
#   Vehicle survey speed:     1.500000 m/s
behavior waypoint_bottom
{
latitude	   = 36.695114;
longitude	   = -121.937045;
lastLatitude	   = 36.695783;
lastLongitude	   = -121.939169;
duration	   = 815;
depth		   = 85.000000;
speed		   = 1.500000;
altitude           = 10.;
avoidRange         = 40.;
useThetaB          = True;
tau		   = 3;
avoidAngle         = 20;
# abortOnTimeout    = True;
# avoidRange	     = 60.0;
# tau		     = 3;
}
#######################################################
# Reset sonar parameters
#   Waypoint type:	      11
#   Commanded altitude:       37.395262
#   Actual altitude:	      37.395262
#   Commanded vehicle depth:  60
#   Seafloor depth:	      -97.395262
#
behavior reson
{
duration  = 6;
MB_Range = 186.98;
MB_Sound_Velocity = 0.0;
MB_Bottom_Detect_Filter_Min_Range = 14.96;
MB_Bottom_Detect_Filter_Max_Range = 186.98;
MB_Bottom_Detect_Filter_Min_Depth = 0.00;
}
#
#######################################################
#
# Acoustic update 7 - sent status ping before start of line
#
behavior acousticUpdate
{
duration  = 2;
dummy  = 1;
}
#
#######################################################
#######################################################
#######################################################
#
#
# Waypoint_bottom behavior to get to end of line 2
#   Segment length 472.987512 meters
#   Minimum depth: 83.904936 meters looking forward 0.000000 meters along route
#   Maximum depth: 83.904936 meters looking forward 0.000000 meters along route
#   Maximum vehicle depth: 82.500000 meters
#   Constant vehicle depth:   60.000000 meters
#   Minimum vehicle altitude: 15.000000 meters
#   Behavior depth of 60.000000 meters set by local depth and desired altitude
#   Vehicle survey speed:     1.500000 m/s
behavior waypoint_bottom
{
latitude	   = 36.695783;
longitude	   = -121.939169;
lastLatitude	   = 36.695828;
lastLongitude	   = -121.944463;
duration	   = 1891;
depth		   = 85.000000;
speed		   = 1.500000;
altitude           = 10.;
avoidRange         = 40.;
useThetaB          = True;
avoidAngle         = 20;
tau		   = 3;
# abortOnTimeout    = True;
# avoidRange	     = 60.0;
# tau		     = 3;
}
#######################################################
# Reset sonar parameters
#   Waypoint type:	      1
#   Commanded altitude:       37.395262
#   Actual altitude:	      37.395262
#   Commanded vehicle depth:  60
#   Seafloor depth:	      -83.904936
#
behavior reson
{
duration  = 6;
MB_Range = 186.98;
MB_Sound_Velocity = 0.0;
MB_Bottom_Detect_Filter_Min_Range = 14.96;
MB_Bottom_Detect_Filter_Max_Range = 186.98;
MB_Bottom_Detect_Filter_Min_Depth = 0.00;
}
#
#######################################################
#
#######################################################
#######################################################
#
#
# Waypoint_bottom behavior to get to end of line 1
#   Segment length 133.407549 meters
#   Minimum depth: 93.077375 meters looking forward 0.000000 meters along route
#   Maximum depth: 93.077375 meters looking forward 0.000000 meters along route
#   Maximum vehicle depth: 82.500000 meters
#   Constant vehicle depth:   15.000000 meters
#   Minimum vehicle altitude: 15.000000 meters
#   Behavior depth of 15.000000 meters set by local depth and desired altitude
#   Vehicle survey speed:     1.500000 m/s
behavior waypoint_bottom
{
latitude	   = 36.695828;
longitude	   = -121.944463;
lastLatitude	   = 36.695501;
lastLongitude	   = -121.945900;
duration	   = 533;
depth		   = 85.000000;
speed		   = 1.500000;
altitude           = 10.;
avoidRange         = 40.;
useThetaB          = True;
tau		   = 3;
avoidAngle         = 20;
reinitFilter	   = True;
# abortOnTimeout    = True;
# avoidRange	     = 60.0;
# tau		     = 3;
}
#######################################################
# Reset sonar parameters
#   Waypoint type:	      9
#   Commanded altitude:       78.077375
#   Actual altitude:	      78.077375
#   Commanded vehicle depth:  15
#   Seafloor depth:	      -93.077375
#
behavior reson
{
duration  = 6;
MB_Range = 200.00;
MB_Sound_Velocity = 0.0;
MB_Bottom_Detect_Filter_Min_Range = 31.23;
MB_Bottom_Detect_Filter_Max_Range = 200.00;
MB_Bottom_Detect_Filter_Min_Depth = 0.00;
}
#
#######################################################
#
# Acoustic update 7 - sent status ping before start of line
#
behavior acousticUpdate
{
duration  = 2;
dummy  = 1;
}
#
#######################################################
#######################################################
#######################################################
#
#######################################################
# Turn Mapping sonars on and start logging.
#
behavior reson
{
duration  = 6;
Log_Mode  = 2;
}
# Set sonar parameters
#   Waypoint type:	      9
#   Commanded altitude:       81.54018
#   Sonar parameter altitude: 81.54018
#   Commanded vehicle depth:  15
#   Seafloor depth:	      -96.540180
#
behavior edgetech
{
duration  = 6;
SBP_Mode = 1;
SBP_Power = 100.0;
SBP_Gain = 128.0;
SBP_Duration = 300.000;
LoSS_Mode = 1;
LoSS_Power = 100.0;
LoSS_Range = 200.00;
}
behavior reson
{
duration  = 6;
MB_Power = 218;
MB_Range = 200.00;
MB_Rate = 3;
MB_Gain = 34;
MB_Sound_Velocity = 0.0;
MB_Pulse_Width = 0.000033;
MB_Bottom_Detect_Filter_Min_Range = 32.62;
MB_Bottom_Detect_Filter_Max_Range = 200.00;
MB_Bottom_Detect_Filter_Min_Depth = 0.00;
MB_Bottom_Detect_Filter_Max_Depth = 200.00;
MB_Bottom_Detect_Range_Mode = 1;
MB_Bottom_Detect_Depth_Mode = 0;
Snippet_Mode = 1;
Window_Size = 200;
Log_Mode = 0;
}
#
#######################################################
#######################################################
#
#
# Waypoint behavior to get back to start of line 1
#   Segment length 133.407549 meters
#   Minimum depth: 96.540180 meters looking forward 0.000000 meters along route
#   Maximum depth: 96.540180 meters looking forward 0.000000 meters along route
#   Vehicle depth: 15.000000 meters
behavior waypoint
{
latitude     = 36.695501;
longitude    = -121.945900;
duration     = 2000;
depth	     = 85.000000;
speed	     = 1.500000;
}
#
#
# Acoustic update 4 - sent status ping at end of spiral descent
#
behavior acousticUpdate
{
duration  = 2;
dummy  = 1;
}
#
# Spiral descend behavior to get to proper depth at start of line 1
#   Behavior depth of 15.000000 meters set by local depth and desired altitude
behavior descend
{
duration	 = 600;
horizontalMode	 = rudder;
horizontal	 = 2.000000;
pitch		 = -30.000000;
speed		 = 1.500000;
maxDepth	 = 80;
minAltitude	 = 10.000000;
}
#
# Acoustic update 5 - sent status ping after end of line
#
behavior acousticUpdate
{
duration  = 2;
dummy  = 1;
}
#
# Waypoint behavior to get to start of line 1
#   Segment length 133.407549 meters
#   Minimum depth: 96.540180 meters looking forward 0.000000 meters along route
#   Maximum depth: 96.540180 meters looking forward 0.000000 meters along route
#   Vehicle depth: 15.000000 meters
behavior waypoint
{
latitude     = 36.695501;
longitude    = -121.945900;
duration     = 2000;
depth	     = 15.000000;
speed	     = 1.500000;
}
#######################################################
# Acoustic update 6 - sent status ping after end of line
#
behavior acousticUpdate
{
duration  = 2;
dummy  = 1;
}
#
#
#######################################################
#######################################################
#
#
# Descend behavior
behavior descend
{
horizontalMode	 = heading;
horizontal   = 73.590590;
pitch	     = -45.000000;
speed	     = 1.500000;
maxDepth     = 3.000000;
minAltitude  = 15.000000;
duration     = 300;
}
#
# setpoint on surface to gather momentum
behavior setpoint
{
duration     = 30;
heading      = 73.590590;
speed	     = 1.500000;
verticalMode = pitch;
pitch	     = 0;
}
#
# acquire gps fix
behavior getgps
{
duration = 600;
minHits = 10;
abortOnTimeout = True;
}
#######################################################
# Set sonar parameters, turn pinging on, power zero and logging off
#
behavior edgetech
{
duration  = 6;
SBP_Mode = 0;
SBP_Power = 0.0;
SBP_Gain = 128.0;
SBP_Duration = 300.000;
LoSS_Mode = 0;
LoSS_Power = 0.0;
LoSS_Range = 200.00;
HiSS_Mode = 0;
HiSS_Power = 0.0;
HiSS_Range = 200;
}
behavior reson
{
duration  = 6;
MB_Mode  = 1;
Log_Mode  = 0;
MB_Power = 0;
MB_Range = 150.00;
MB_Rate = 3;
MB_Gain = 34;
MB_Sound_Velocity = 0.0;
MB_Pulse_Width = 0.000033;
MB_Bottom_Detect_Filter_Min_Range = 12.00;
MB_Bottom_Detect_Filter_Max_Range = 150.00;
MB_Bottom_Detect_Filter_Min_Depth = 0.00;
MB_Bottom_Detect_Filter_Max_Depth = 150.00;
MB_Bottom_Detect_Range_Mode = 1;
MB_Bottom_Detect_Depth_Mode = 0;
Snippet_Mode = 1;
Window_Size = 200;
}
#
#######################################################
#######################################################
#######################################################
#######################################################

