# mission timer set to 120% of estimated time of mission
behavior missionTimer {
timeOut = 18000;
}

# depth envelope set to commanded + 5 m, abort at commanded + 10
behavior depthEnvelope {
 minDepth = 0;
 maxDepth     = 205;
 abortDepth   = 210;
 minAltitude  = 8;
 abortAltitude  = 5;
}


# acquire gps fix
behavior getgps {
duration = 300;
minHits = 10;
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 C to waypoint D (deep water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.765;
longitude     = -121.89;
captureRadius = 10;
duration     = 1800;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 200;
minAltitude    = 35;
maxCycles      = 100;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 330;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 330;
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 C to waypoint D (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.765;
longitude     = -121.89;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 10;
maxCycles      = 100;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 330;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 330;
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 B to waypoint C (shallow water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.725;
longitude     = -121.86;
captureRadius = 10;
duration     = 3600;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 10;
maxCycles      = 100;
}

# 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 B to waypoint C (deep water)
# waypoint behavior
behavior waypoint_yoyo {
latitude     = 36.725;
longitude     = -121.86;
captureRadius = 10;
duration     = 1200;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 80;
minAltitude    = 35;
maxCycles      = 100;
}

# 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;
}

