#define YOYO_MIN_ALTITUDE 6.5
#define MISSION_SPEED 1.25

#should be 15 hour mission, set timer to 19 hours
behavior missionTimer {
timeOut = 68400;
}

behavior depthEnvelope {
  minDepth = 0;
  maxDepth = 23;
  abortDepth = 30;
  abortAltitude = 2.5;
  abortLockoutDepth = 10.0;
}


behavior getgps {
duration = 9600;
minHits = 7200;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}


#Initial leg to waypoint LOCO1 - start of line  end of lap 4
#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;
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;
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;
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;
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;
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;
minDepth      = 2.0;
maxDepth      = 20;
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   = heading;
horizontal       = 302;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 313;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 313;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 313;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 324;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 324;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 324;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 318;
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;
minDepth       = 2.0;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 321;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 321;
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;
}


#Initial leg to waypoint LOCO1 - start of line   end of lap 3
#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;
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;
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;
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;
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;
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;
minDepth      = 2.0;
maxDepth      = 20;
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   = heading;
horizontal       = 302;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 313;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 313;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 313;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 324;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 324;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 324;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 318;
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;
minDepth       = 2.0;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 321;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 321;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}


#Initial leg to waypoint LOCO1 - start of line  end of lap 2
#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;
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;
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;
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;
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;
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;
minDepth      = 2.0;
maxDepth      = 20;
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   = heading;
horizontal       = 302;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 313;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 313;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 313;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 324;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 324;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 324;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 318;
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;
minDepth       = 2.0;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 321;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 321;
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;
}



#Initial leg to waypoint LOCO1 - start of line  end of lap 1
#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;
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;
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;
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;
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;
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;
minDepth      = 2.0;
maxDepth      = 20;
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   = heading;
horizontal       = 302;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 313;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 313;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 313;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 324;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 324;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 324;
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;
minDepth      = 2.0;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 318;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 318;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 318;
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;
minDepth       = 2.0;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 321;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}


# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 321;
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;
}

#Initial leg to waypoint LOCO1 - start of line
#N36 49.5181 W121 49.2562
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8253;
longitude     = -121.82094;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED;
minDepth       = 2.0;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 321;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 321;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}
