# mission timer set to 120% of estimated time of mission
behavior missionTimer {
timeOut = 30000;
}

# depth envelope set to commanded + 5 m, abort at commanded + 10
behavior depthEnvelope {
 minDepth = 0;
 maxDepth     = 255;
 abortDepth   = 260;
 minAltitude  = 40;
 abortAltitude  = 5;
}

# Eighth leg of run from waypoint M1.5 to C1.5 (near head of canyon), will probably be short
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.773;
longitude     = -121.9348;
captureRadius = 10;
duration     = 2000;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 200;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 70;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 70;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}



# Seventh leg of run from waypoint M1.5 to C1.5 (near head of canyon)
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.773;
longitude     = -121.9348;
captureRadius = 10;
duration     = 2000;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 200;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 70;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 70;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# Sixth leg of run from waypoint M1.5 to C1.5 (deep water)
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.773;
longitude     = -121.9348;
captureRadius = 10;
duration     = 2200;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 250;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 70;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 70;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}



# Fifth leg of run from waypoint M1.5 to C1.5 (deep water)
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# waypoint behavior
# Aiming for point 20 km downrange
behavior waypoint_yoyo {
latitude     = 36.76393;
longitude     = -121.98232;
captureRadius = 10;
duration     = 2200;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 250;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 70;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 70;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}


# Fourth leg of run from waypoint M1.5 to C1.5 (deep water)
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# waypoint behavior
# Aiming for point 16 km downrange
behavior waypoint_yoyo {
latitude     = 36.75558;
longitude     = -122.02603;
captureRadius = 10;
duration     = 2200;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 250;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 70;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 70;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# Third leg of run from waypoint M1.5 to C1.5 (deep water)
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# waypoint behavior
# Aiming for point 12 km downrange.
behavior waypoint_yoyo {
latitude     = 36.74727;
longitude     = -122.06948;
captureRadius = 10;
duration     = 2200;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 250;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 70;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 70;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}


# Second leg of run from waypoint M1.5 to C1.5 (deep water)
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

# waypoint behavior
# Aiming for point 8 km downrange.
behavior waypoint_yoyo {
latitude     = 36.73888;
longitude     = -122.11310;
captureRadius = 10;
duration     = 2200;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 250;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 70;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 70;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}


# First leg of run from waypoint M1.5 to C1.5 (deep water)
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}
