#define YOYO_MIN_ALTITUDE 7.5
#define MISSION_SPEED 1.75
#define MISSION_SPEED_SLOW 1.25

# mission timer set to 120% of estimated time of mission
behavior missionTimer {
timeOut = 50000;
}

# 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;
}

# 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 LOCO1
#N36 49.5181 W121 49.2562
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8253;
longitude     = -121.8209;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = 2.0;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 142;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 142;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 142;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Initial leg to waypoint LOCO2 - first waypoint
#N36 50.1100 W121 49.8200
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8352;
longitude     = -121.8303;
captureRadius = 10;
duration     = 3600;
speed        = MISSION_SPEED_SLOW;
minDepth       = 2.0;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 138;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 138;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 138;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint LOCO3
#N36 51.5100 W121 51.3900
behavior waypoint_yoyo {
latitude = 36.8585;
longitude = -121.8565;
captureRadius = 10;
duration      = 3600;
speed         = MISSION_SPEED_SLOW;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 145;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 145;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 145;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint LOCO4
#N 36 53.3400 W121 53.0000
behavior waypoint_yoyo  {
latitude = 36.8890;
longitude = -121.8833;
captureRadius = 10;
duration      = 3600;
speed         = MISSION_SPEED_SLOW;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 133;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 133;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 133;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint LOCO5
#N 36 54.5600 W121 54.6200
behavior waypoint_yoyo  {
latitude = 36.9093;
longitude = -121.9103;
captureRadius = 10;
duration      = 3600;
speed         = MISSION_SPEED_SLOW;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 122;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 122;
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;
}

#next leg - waypoint LOCO6
#N 36 55.6300 W121 56.7100
behavior waypoint_yoyo  {
latitude = 36.9272;
longitude = -121.9452;
captureRadius = 10;
duration      = 3600;
speed         = MISSION_SPEED_SLOW;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 266;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 266;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}


#next leg - waypoint Transit_E1_LOCO6
#N 36 55.730 W121 55.280
behavior waypoint_yoyo  {
latitude = 36.9288;
longitude = -121.9213;
captureRadius = 10;
duration      = 3600;
speed         = MISSION_SPEED_SLOW;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 266;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 266;
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;
}


#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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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 = 15;
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;
}
