#define YOYO_MIN_ALTITUDE 7.5
#define MISSION_SPEED 1.75

# mission timer set to 120% of estimated time of mission
behavior missionTimer {
timeOut = 57600;
}

# depth envelope set to commanded + 5 m, abort at commanded + 10
behavior depthEnvelope {
 minDepth = 0;
 maxDepth     = 105;
 abortDepth   = 120;
 abortAltitude  = 2.5;
 abortLockoutDepth = 10.0;
}

# Eighth leg of run to waypoint E1
# 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;
}

#waypoint behavior to waypoint Sawtooth 4 
#N36 49.1801 W121 54.359
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.8197;
longitude     = -121.906;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 14;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 14;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 14;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Sawtooth 3.5 
#N36 47.9168 W121 54.883
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.7986;
longitude     = -121.9147;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 14;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 14;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 161;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Sawtooth 3 
#N36 46.5898 W121 55.3018
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.7765;
longitude     = -121.9217;
captureRadius = 10;
duration     = 2600;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 161;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 161;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 161;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Sawtooth 2.5 
#N36 47.90 W121 55.994
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.7983;
longitude     = -121.9332;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 161;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 161;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Sawtooth 2 
#N36 49.0937 W121 56.4895
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.8182;
longitude     = -121.9415;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 22;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Sawtooth 1.5 
#N36 47.914 W121 57.05
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.7986;
longitude     = -121.9508;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 22;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 168;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Sawtooth 1 
#N36 46.5757 W121 57.7463
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.7763;
longitude     = -121.9624;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 168;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 168;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 168;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Sawtooth 0.5 
#N36 47.9142 W121 58.1297
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.7986;
longitude     = -121.9688;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 168;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 168;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 202;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Haddock 4 
#N36 49.158 W121 58.458
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.8193;
longitude     = -121.9743;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 100;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 202;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 202;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 202;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Haddock 3 
#N36 50.844 W121 57.330
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.8474;
longitude     = -121.9555;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 50;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 202;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 202;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 202;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior to waypoint Haddock 2 
#N36 52.494 W121 56.226
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.8749;
longitude     = -121.9371;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 28;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 202;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 202;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 202;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#waypoint behavior back down line to waypoint Haddock 1 
#N36 54.174 W121 55.092
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.9029;
longitude     = -121.9182;
captureRadius = 10;
duration     = 2800;
speed        = 1.5;
minDepth       = 2.5;
maxDepth       = 18;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 202;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 202;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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     = 700;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 15;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 22;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

#leg of run to waypoint E1
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint just before E1
#waypoint E1M1D1_0.5
#N36 36 55.4121 W121 54.2854
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.9235;
longitude     = -121.9048;
captureRadius = 10;
duration     = 2100;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 22;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
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   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#waypoint behavior to waypoint 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       = 25;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 22;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# leg of run to waypoint just before E1
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#waypoint behavior to waypoint 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      = 22;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# leg of run to waypoint E2
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# Leg 4 waypoint behavior to waypoint 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      = 22;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# leg of run to waypoint E3
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#waypoint behavior to waypoint 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      = 22;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# leg of run to waypoint E1M1D1_4
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint 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      = 22;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# leg of run to waypoint E2
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 22;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint down line to E1M1D1_6
# N36 46.3319  W122 00.2630
#maxumum depth 500m
behavior waypoint_yoyo {
latitude     = 36.7722;
longitude     = -122.0044;
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      = 22;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 22;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Run to waypoint E6
# 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;
}

# finally, waypoint behavior DIRECTLY to waypoint M1 - 1300m run
# 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;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Run to waypoint M1
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 318;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to just before M1 to E1M1D1_6.5
# N36 44.7929 W 122 00.6122
#maximum depth 800m
behavior waypoint_yoyo {
latitude     = 36.7465;
longitude     = -122.0102;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 100;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

behavior FireTheGulper {
duration = 1;
dummy = 1;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.6;
maxDepth     = 10.0;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# Seventh leg of run to waypoint M1
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}


# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 318;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint down line to E1M1D1_7
#N36 43.8558 W121 59.6039
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.73093;
longitude     = -121.9934;
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      = 318;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
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   = heading;
horizontal       = 318;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint down line E1M1D1_8
#N36 42.4850 W121 58.0701
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.7081;
longitude     = -121.9678;
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      = 318;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}


# Fourth leg of run to waypoint M1
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 318;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint down line E1M1D1_9
#N36 41.0647 W121 56.480
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.6844;
longitude     = -121.9413;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 90;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
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   = heading;
horizontal       = 318;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint down line to E1M1D1_10
#N36 39.6758 W121 54.9244
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.6613;
longitude     = -121.9154;
captureRadius = 10;
duration     = 2600;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
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   = heading;
horizontal       = 318;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# waypoint behavior to waypoint down line E1M1D1_11
#N36 38.2707 W121 53.3560
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.6378;
longitude     = -121.8893;
captureRadius = 10;
duration     = 1800;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 70;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}


# First leg of run to waypoint Mooring-1 (aiming for intermediate point)
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}


# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

# Leg 1 waypoint behavior to waypoint D1 
#N36 37.500 W121 52.500
#maximum depth 50m?
#maximum water depth 500m
behavior waypoint_yoyo {
latitude     = 36.625;
longitude     = -121.875;
captureRadius = 10;
duration     = 700;
speed        = MISSION_SPEED;
minDepth       = 2.5;
maxDepth       = 40;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 180;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 180;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}
