# mission timer set to 120% of estimated time of mission
behavior missionTimer {
timeOut = 35000;
}

# depth envelope set to commanded + 5 m, abort at commanded + 10
behavior depthEnvelope {
 minDepth = 0;
 maxDepth     = 105;
 abortDepth   = 110;
 minAltitude  = 5;
 abortAltitude  = 3;
}


# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 10 to waypoint LOCO_17Sept_8 - probably short
#36.8399 -121.9002 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.8399;
longitude     = -121.9002;
captureRadius = 200;
duration     = 600;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 117;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 117;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 12 to waypoint LOCO_17Sept_8
#36.8399 -121.9002 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.8399;
longitude     = -121.9002;
captureRadius = 10;
duration     = 3500;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 117;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 117;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 11 to waypoint LOCO_17Sept_7
#36.8601 -121.9499 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.8601;
longitude     = -121.9499;
captureRadius = 10;
duration     = 3600;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 243;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 243;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 10 to waypoint LOCO_17Sept_6
#36.8796 -121.9002 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.8796;
longitude     = -121.9002;
captureRadius = 10;
duration     = 2000;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 116;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 116;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 9 to waypoint LOCO_17Sept_6
#36.8796 -121.9002 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.8796;
longitude     = -121.9002;
captureRadius = 10;
duration     = 2000;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 40;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 116;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 116;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 8 to waypoint LOCO_17Sept_5
#36.8998 -121.9499 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.8998;
longitude     = -121.9499;
captureRadius = 10;
duration     = 3400;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 40;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 255;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 255;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 7 to waypoint LOCO_17Sept_4
#36.9099 -121.9006 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.9099;
longitude     = -121.9006;
captureRadius = 10;
duration     = 2000;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 40;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 120;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 120;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 6 to waypoint LOCO_17Sept_4
#36.9099 -121.9006 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.9099;
longitude     = -121.9006;
captureRadius = 10;
duration     = 2000;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 40;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 120;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 120;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 5 to waypoint LOCO_17Sept_3
##36.9331 -121.9499 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.9331;
longitude     = -121.9499;
captureRadius = 10;
duration     = 1500;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 30;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 270;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 270;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 4 to waypoint LOCO_17Sept_3
##36.9331 -121.9499 
#maximum depth 30m
behavior waypoint_yoyo {
latitude     = 36.9331;
longitude     = -121.9499;
captureRadius = 10;
duration     = 1500;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 30;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 270;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 270;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 3 to waypoint LOCO_17Sept_2
#36.9331 -121.9002 
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.9331;
longitude     = -121.9002;
captureRadius = 10;
duration     = 1500;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 15;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 117;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 117;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.6;
endDepth         = 2;
}

#Leg 2 to waypoint LOCO_17Sept_2
#36.9331 -121.9002 
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.9331;
longitude     = -121.9002;
captureRadius = 10;
duration     = 1500;
speed        = 1.6;
minDepth       = 3;
maxDepth       = 15;
minAltitude    = 5;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 117;
pitch        = -15;
speed        = 1.6;
maxDepth     = 5;
minAltitude  = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 117;
speed        = 1.6;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 120;
abortOnTimeout = True;
}






