# mission timer set to 120% of estimated time of mission
behavior missionTimer {
timeOut = 33000;
}

# depth envelope set to commanded + 5 m, abort at commanded + 10
behavior depthEnvelope {
 minDepth = 0;
 maxDepth     = 85;
 abortDepth   = 90;
 minAltitude  = 5;
 abortAltitude  = 2;
}

# 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;
}

# Second leg of run from waypoint 6 to waypoint 5 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.83;
longitude     = -121.93;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 180;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 180;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# First leg of run from waypoint 6 to waypoint 5 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.83;
longitude     = -121.93;
captureRadius = 10;
duration     = 1800;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 180;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 180;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# Second leg of run from waypoint 3 to waypoint 6 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.88;
longitude     = -121.93;
captureRadius = 10;
duration     = 3000;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 327;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 327;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# First leg of run from waypoint 3 to waypoint 6 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.88;
longitude     = -121.93;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 327;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 327;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# Second leg of run from waypoint 4 to waypoint 3 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.83;
longitude     = -121.89;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 180;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 180;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# First leg of run from waypoint 4 to waypoint 3 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.83;
longitude     = -121.89;
captureRadius = 10;
duration     = 1800;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 180;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 180;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# Second leg of run from waypoint 1 to waypoint 4 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.88;
longitude     = -121.89;
captureRadius = 10;
duration     = 3000;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 327;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 327;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# First leg of run from waypoint 1 to waypoint 4 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.88;
longitude     = -121.89;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 327;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 327;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# 2nd leg of run from waypoint 2 to waypoint 1 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.83;
longitude     = -121.85;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 180;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 180;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# 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;
}

# First leg of run from waypoint 2 to waypoint 1 (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.83;
longitude     = -121.85;
captureRadius = 10;
duration     = 1800;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 7;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 180;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 180;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 120;
abortOnTimeout = True;
}

