#CANON_SoCal_2013_inshore_to_offshore
#fire the Gulper after 12misobath_5
#define YOYO_MIN_ALTITUDE 7.5
#define MISSION_SPEED 1.5
#define MISSION_SPEED_SLOW 1.5
#define MISSION_YOYO_MIN_DEPTH 1.5
#define END_LAT 33.6210
#define END_LON -118.0100
#define START_LAT 33.5180
#define START_LON -118.0900

# 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     = 90;
 abortDepth   = 100;
 abortAltitude  = 2.5;
 abortLockoutDepth = 8.0;
}

behavior getgps {
duration = 1800;
minHits = 300;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 5;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = END_LAT;
longitude = END_LON;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 32;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 32;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 5;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = END_LAT;
longitude = END_LON;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 32;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 32;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 32;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = END_LAT;
longitude = END_LON;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 40;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 32;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 32;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 32;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = END_LAT;
longitude = END_LON;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 80;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 32;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 32;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 32;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = END_LAT;
longitude = END_LON;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 80;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 32;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 32;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 32;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = END_LAT;
longitude = END_LON;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 80;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 32;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 32;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 32;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = END_LAT;
longitude = END_LON;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 80;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 32;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 32;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

behavior ArmTheGulper
{
  duration = 5;
  gulper0 = 0;
  gulper1 = 1;
  gulper2 = 1;
  gulper3 = 1;
  gulper4 = 1;
  gulper5 = 1;
  gulper6 = 1;
  gulper7 = 1;
  gulper8 = 1;
}

