#should be 19 hour mission, set timer to 19.5 hours
#set timeout in seconds
behavior missionTimer {
timeOut = 31500;
}

behavior depthEnvelope {
  minDepth = 0;
  maxDepth = 170;
  abortDepth = 180;
}



# acquire gps fix
behavior getgps {
duration = 4000;
minHits = 3600;
abortOnTimeout = True;
}

#end of second lap
# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = rudder;
horizontal = 3;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#fourth leg to veretx 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 142.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 142.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 142.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#third leg to veretx 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 142.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 142.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 142.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#second leg to veretx 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 142.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 142.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 142.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#first leg to veretx 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 142.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 142.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = rudder;
horizontal = 3;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#fourth leg to veretx 3
behavior waypoint_yoyo {
latitude = 36.3541;
longitude = -122.3696;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 21.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 21.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 21.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#third leg to veretx 3
behavior waypoint_yoyo {
latitude = 36.3541;
longitude = -122.3696;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}


# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 21.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 21.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 21.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#second leg to veretx 3
behavior waypoint_yoyo {
latitude = 36.3541;
longitude = -122.3696;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}


# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 21.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 21.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 21.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#first leg to veretx 3
behavior waypoint_yoyo {
latitude = 36.3541;
longitude = -122.3696;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 21.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 21.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = rudder;
horizontal = 3;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#fourth leg to veretx 2
behavior waypoint_yoyo {
latitude = 36.2675;
longitude = -122.4130;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 261.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 261.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 261.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#third leg to veretx 2
behavior waypoint_yoyo {
latitude = 36.2675;
longitude = -122.4130;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 261.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 261.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 261.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#second leg to veretx 2
behavior waypoint_yoyo {
latitude = 36.2675;
longitude = -122.4130;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 261.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 261.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 261.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#First leg to veretx 2
behavior waypoint_yoyo {
latitude = 36.2675;
longitude = -122.4130;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 261.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 261.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

#end of first lap
# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = rudder;
horizontal = 3;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#fourth leg to veretx 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 142.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 142.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 142.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#third leg to veretx 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 142.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 142.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 142.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#second leg to veretx 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 142.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 142.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 142.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#first leg to veretx 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 142.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 142.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = rudder;
horizontal = 3;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#fourth leg to veretx 3
behavior waypoint_yoyo {
latitude = 36.3541;
longitude = -122.3696;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 21.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 21.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 21.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#third leg to veretx 3
behavior waypoint_yoyo {
latitude = 36.3541;
longitude = -122.3696;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}


# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 21.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 21.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 21.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#second leg to veretx 3
behavior waypoint_yoyo {
latitude = 36.3541;
longitude = -122.3696;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}


# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 21.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 21.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 21.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#first leg to veretx 3
behavior waypoint_yoyo {
latitude = 36.3541;
longitude = -122.3696;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 21.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 21.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = rudder;
horizontal = 3;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#fourth leg to veretx 2
behavior waypoint_yoyo {
latitude = 36.2675;
longitude = -122.4130;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 261.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 261.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 261.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#third leg to veretx 2
behavior waypoint_yoyo {
latitude = 36.2675;
longitude = -122.4130;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 261.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 261.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 261.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#second leg to veretx 2
behavior waypoint_yoyo {
latitude = 36.2675;
longitude = -122.4130;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 261.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 261.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 261.0;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#First leg to veretx 2
behavior waypoint_yoyo {
latitude = 36.2675;
longitude = -122.4130;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 261.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 261.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 60;
abortOnTimeout = True;
}


# ascend behavior - use a rudder ascend to minimize overshoot
behavior ascend {
duration = 1200;
horizontalMode = rudder;
horizontal = 3;
pitch = 20;
speed = 1.50;
endDepth = 2;
}

#Initial leg to vertex 1
behavior waypoint_yoyo {
latitude = 36.2805;
longitude = -122.2984;
captureRadius = 10;
duration = 2700;
speed = 1.50;
minDepth = 2.0;
maxDepth = 150;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 87.0;
pitch = -15;
speed = 1.50;
maxDepth = 5;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 87.0;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 15;
abortOnTimeout = True;
}
