#M1_Incubator_Gulper
#  M1 to E1                    22,200 meters
#  Transit E1 to 12m_isobath_1  5,200 meters
#  12m_Isobath                 21,000 meters
#
#  Total                       48,400 meters
#  9 hours at 1.5 m/s
#  8.5 hours at 1.6 m/s

#define YOYO_MIN_ALTITUDE 7.5
#define MISSION_YOYO_MIN_DEPTH 1.5
#define MISSION_SPEED 1.6
#define MISSION_SPEED_SLOW 1.6

# mission timer set to 120% of estimated time of mission
behavior missionTimer {
timeOut = 37000;
}

# depth envelope set to commanded + 5 m, abort at commanded + 10
behavior depthEnvelope {
 minDepth = 0;
 maxDepth     = 105;
 abortDepth   = 120;
 abortAltitude  = 2.5;
}


# End of mission
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}


# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 15;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}


#Final leg to waypoint 12m_isobath_12
#N36 49.26 W121 48.45
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8210;
longitude     = -121.8075;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 9;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 154;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# Fire gulper 00 at 2m depth
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 8;
}

# Descend behavior to 2 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 154;
pitch        = -15;
speed        = 1.5;
maxDepth     = 2;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 154;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 154;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_11
#N36 49.73 W121 48.73
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8288;
longitude     = -121.8122;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 9;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 155;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# Fire gulper 00 at 2m depth
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 7;
}

# Descend behavior to 2 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 155;
pitch        = -15;
speed        = 1.5;
maxDepth     = 2;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 155;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 155;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_10
#N36 50.76 W121 49.33
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8460;
longitude     = -121.8222;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 9;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 158;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 158;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 158;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_9
#N36 51.65 W121 49.78
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8608;
longitude     = -121.8297;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 9;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 151;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# Fire gulper 06 at 2m depth
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 6;
}

# Descend behavior to 2 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 151;
pitch        = -15;
speed        = 1.5;
maxDepth     = 2;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 151;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 151;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_8
#N36 52.78 W121 50.54
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8797;
longitude     = -121.8423;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 9;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 147;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 147;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 147;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_7
#N36 53.81 W121 51.35
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8968;
longitude     = -121.8558;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 9;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Fire gulper 05 at 5m depth
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 5;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 151;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 151;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 151;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_6
#N36 54.93 W121 52.12
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.9155;
longitude     = -121.8687;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 9;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

behavior FireTheGulper {
duration = 1;
dummy = 1;
}

# Descend behavior to 3 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 144;
pitch        = -15;
speed        = 1.5;
maxDepth     = 3;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 144;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 144;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Initial leg to waypoint 12m_isobath_5
#N36 56.05 W121 53.12
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.9342;
longitude     = -121.8853;
captureRadius = 10;
duration     = 1800;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 9;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}


# Fire gulper 04 at 5m depth
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 4;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 130;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 130;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 130;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint 12m_isobath_4
#N36 56.71 W121 554.09
behavior waypoint_yoyo {
latitude = 36.9452;
longitude = -121.9015;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 9;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 126;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 126;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 126;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint 12m_isobath_3
#N 36 57.23 W121 54.98
behavior waypoint_yoyo  {
latitude = 36.9538;
longitude = -121.9163;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 9;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Fire gulper 03 at 5m depth
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 3;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 104;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 104;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 104;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint 12m_isobath_2
#N 36 57.41 W121 55.91
behavior waypoint_yoyo  {
latitude = 36.9568;
longitude = -121.9318;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 9;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 83;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 83;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 15;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint 12m_isobath_1 - should reach it
#N 36 57.32 W121 57.00
behavior waypoint_yoyo  {
latitude = 36.9553;
longitude = -121.9500;
captureRadius = 10;
duration      = 1900;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 9;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 302;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 302;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}


# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# Waypoint E1_to_12m_2
#N 36 57.1322 W 121 56.6264
behavior waypoint_yoyo  {
latitude = 36.9522;
longitude = -121.9438;
captureRadius = 10;
duration      = 1900;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 12;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 302;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 302;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# Waypoint E1_to_12m_1
#N 36 56.5635 W 121 55.4968
behavior waypoint_yoyo  {
latitude = 36.9427;
longitude = -121.9249;
captureRadius = 10;
duration      = 1900;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 12;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 302;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 302;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

#
#Transit From E1 to 12m_isobath_1
#

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 15;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}


#Final Leg to waypoint E1
#N36 55.800 W121 54.00
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.9300;
longitude     = -121.900;
captureRadius = 10;
duration     = 600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 15;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 28;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Eighth leg of run to waypoint E5
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 28;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# Leg 2 waypoint behavior to waypoint 3500m down line E1M1D1_1
#N36 54.174 W121 55.093
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.9029;
longitude     = -121.9182;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 28;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 28;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Eighth leg of run to waypoint E5
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 28;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# Leg 3 waypoint behavior to waypoint 7000m down line to E1M1D1_2
#N36 52.491 W121 56.225
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8749;
longitude     = -121.9371;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 50;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 28;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Eighth leg of run to waypoint E5
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 28;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# Leg 4 waypoint behavior to waypoint 10500m down range E1M1D1_3
#N36 50.844 W121 57.330
#max depth 26m
behavior waypoint_yoyo {
latitude     = 36.8474;
longitude     = -121.9555;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 100;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 28;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Eighth leg of run to waypoint E5
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 28;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}


# Leg 4 waypoint behavior to waypoint 14000m down line E1M1D1_4
#N36 49.155 W121 58.460
#max depth 200m
behavior waypoint_yoyo {
latitude     = 36.8193;
longitude     = -121.9743;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 100;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 28;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Eighth leg of run to waypoint E5
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 28;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# Leg 5 waypoint behavior to waypoint 17500m down line to E1M1D1_5
# N36 47.487 W121 59.581
#maxumum depth 500m
behavior waypoint_yoyo {
latitude     = 36.7915;
longitude     = -121.9930;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 100;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 28;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Eighth leg of run to waypoint E5
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 28;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}


# waypoint behavior to E1M1D1_6
# N36 45.827 W 122 00.687
#maximum depth 800m
behavior waypoint_yoyo {
latitude     = 36.7638;
longitude     = -122.0115;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 100;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -15;
speed        = 1.6;
maxDepth     = 10.0;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 28;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 28;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint M1
# N36 45.2 W122 1.112
behavior waypoint_yoyo {
latitude     = 36.7533;
longitude     = -122.0185;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 100;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Fire gulper 02 at 250m
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 2;
}

# Descend behavior to 250 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -30;
speed        = 1.5;
maxDepth     = 250;
duration     = 450;
}

# Fire gulper 01 at 100m
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 1;
}

# Descend behavior to 100 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -30;
speed        = 1.5;
maxDepth     = 100;
duration     = 300;
}

# Fire gulper 00 at 5m depth
behavior FireTheGulper {
	duration = 2;
	gulperToFire = 0;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 28;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 28;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# run to waypoint M1
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}
