# 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     = 105;
 abortDepth   = 110;
 minAltitude  = 45;
 abortAltitude  = 5;
}


# 8th leg of run to waypoint C5
# 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 to waypoint C5
behavior waypoint_yoyo {
latitude     = 36.7;
longitude     = -122.16667;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 316;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 316;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# Seventh leg of run to waypoint C5
# 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 to waypoint C5
behavior waypoint_yoyo {
latitude     = 36.7;
longitude     = -122.16667;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 316;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 316;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# Sixth leg of run to waypoint C5
# 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 to waypoint C5
behavior waypoint_yoyo {
latitude     = 36.7;
longitude     = -122.16667;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 316;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 316;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# Fifth leg of run to waypoint C5
# 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 to waypoint C5
behavior waypoint_yoyo {
latitude     = 36.7;
longitude     = -122.16667;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 316;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 316;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}


# Fourth leg of run to waypoint C5
# 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 to waypoint C5
behavior waypoint_yoyo {
latitude     = 36.7;
longitude     = -122.16667;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 316;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 316;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}


# Third leg of run to waypoint C5
# 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 to waypoint C5
behavior waypoint_yoyo {
latitude     = 36.7;
longitude     = -122.16667;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 316;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 316;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}


# Second leg of run to waypoint C5
# 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 to waypoint C5 (aiming for intermediate point)
behavior waypoint_yoyo {
latitude     = 36.61532;
longitude     = -122.06507;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 316;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 316;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}


# First leg of run to waypoint C5 (aiming for intermediate point)
# 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 to waypoint C5 (aiming for intermediate point)
# Set altitude to 50 m to avoid buttress in Carmel Bay
behavior waypoint_yoyo {
latitude     = 36.61532;
longitude     = -122.06507;
captureRadius = 10;
duration     = 2400;
speed        = 1.5;
minDepth       = 3;
maxDepth       = 100;
minAltitude    = 50;
maxCycles      = 1000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 316;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 316;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 120;
abortOnTimeout = True;
}

