#CANON_SoCal_2013_inshore_to_offshore
#fire the Gulper after 12misobath_5
#define YOYO_MIN_ALTITUDE 7.5
#define MISSION_SPEED 1.4
#define MISSION_SPEED_SLOW 1.5
#define MISSION_YOYO_MIN_DEPTH 1.5
#define START_LAT 33.6210
#define START_LON -118.0100
#define TWO_LAT 33.6062
#define TWO_LON -118.0214
#define THREE_LAT 33.5854
#define THREE_LON -118.0375
#define FOUR_LAT 33.5695
#define FOUR_LON -118.0500
#define FIVE_LAT 33.5523
#define FIVE_LON -118.0633
#define SIX_LAT 33.5352
#define SIX_LON -118.0767 
#define END_LAT 33.5180
#define END_LON -118.0900
#define LINE_HEADING 211.0
#define INITIAL_HEADING 140.0

# 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      = 2700;
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      = LINE_HEADING;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = LINE_HEADING;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = LINE_HEADING;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = SIX_LAT;
longitude = SIX_LON;
captureRadius = 10;
duration      = 2700;
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      = LINE_HEADING;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = LINE_HEADING;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = LINE_HEADING;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = FIVE_LAT;
longitude = FIVE_LON;
captureRadius = 10;
duration      = 2700;
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      = LINE_HEADING;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = LINE_HEADING;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = LINE_HEADING;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = FOUR_LAT;
longitude = FOUR_LON;
captureRadius = 10;
duration      = 2700;
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      = LINE_HEADING;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = LINE_HEADING;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = LINE_HEADING;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = THREE_LAT;
longitude = THREE_LON;
captureRadius = 10;
duration      = 2700;
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      = LINE_HEADING;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = LINE_HEADING;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = LINE_HEADING;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

behavior waypoint_yoyo  {
latitude = TWO_LAT;
longitude = TWO_LON;
captureRadius = 10;
duration      = 2700;
speed         = MISSION_SPEED;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 30;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = LINE_HEADING;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = LINE_HEADING;
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 = START_LAT;
longitude = START_LON;
captureRadius = 10;
duration      = 1000;
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      = INITIAL_HEADING;
pitch        = -30;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = INITIAL_HEADING;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}


