#12m_Isobath.cfg
#fire the Gulper after 12misobath_5
#define YOYO_MIN_ALTITUDE 7.5
#define MISSION_SPEED 1.5
#define MISSION_SPEED_SLOW 1.25
#define MISSION_YOYO_MIN_DEPTH 1.5

# mission timer set to 120% of estimated time of mission
behavior missionTimer {
timeOut = 50000;
}

# depth envelope set to commanded + 5 m, abort at commanded + 10
behavior depthEnvelope {
 minDepth = 0;
 maxDepth     = 105;
 abortDepth   = 120;
 abortAltitude  = 2.5;
 abortLockoutDepth = 8.0;
}

# End of mission
# acquire gps fix
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = False;
}


# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 15;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}


#Final leg to waypoint 12m_isobath_12
#N36 49.26 W121 48.45
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8210;
longitude     = -121.8075;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 154;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 154;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 154;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_11
#N36 49.73 W121 48.73
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8288;
longitude     = -121.8122;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 155;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 155;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 155;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_10
#N36 50.76 W121 49.33
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8460;
longitude     = -121.8222;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 158;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 158;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 158;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_9
#N36 51.65 W121 49.78
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8608;
longitude     = -121.8297;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 151;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 151;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 151;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_8
#N36 52.78 W121 50.54
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8797;
longitude     = -121.8423;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 147;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 147;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 147;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_7
#N36 53.81 W121 51.35
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.8968;
longitude     = -121.8558;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 151;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 151;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 151;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Final leg to waypoint 12m_isobath_6
#N36 54.93 W121 52.12
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.9155;
longitude     = -121.8687;
captureRadius = 10;
duration     = 2200;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}

behavior FireTheGulper {
duration = 1;
dummy = 1;
}

# Descend behavior to 3 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 144;
pitch        = -15;
speed        = 1.5;
maxDepth     = 3;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 144;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 144;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#Initial leg to waypoint 12m_isobath_5
#N36 56.05 W121 53.12
#maximum depth 20m
behavior waypoint_yoyo {
latitude     = 36.9342;
longitude     = -121.8853;
captureRadius = 10;
duration     = 1800;
speed        = MISSION_SPEED_SLOW;
minDepth       = MISSION_YOYO_MIN_DEPTH;
maxDepth       = 20;
minAltitude    = YOYO_MIN_ALTITUDE;
maxCycles      = 2000;
}


# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 130;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 130;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 130;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint 12m_isobath_4
#N36 56.71 W121 554.09
behavior waypoint_yoyo {
latitude = 36.9452;
longitude = -121.9015;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 126;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 126;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 126;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint 12m_isobath_3
#N 36 57.23 W121 54.98
behavior waypoint_yoyo  {
latitude = 36.9538;
longitude = -121.9163;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 104;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 104;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = heading;
horizontal       = 104;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint 12m_isobath_2
#N 36 57.41 W121 55.91
behavior waypoint_yoyo  {
latitude = 36.9568;
longitude = -121.9318;
captureRadius = 10;
duration      = 1800;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 83;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 83;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}

# ascend behavior
behavior ascend {
duration  = 1200;
horizontalMode   = rudder;
horizontal       = 10;
pitch            = 20;
speed            = 1.5;
endDepth         = 2;
}

#next leg - waypoint 12m_isobath_1 - should reach it
#N 36 57.32 W121 57.00
behavior waypoint_yoyo  {
latitude = 36.9553;
longitude = -121.9500;
captureRadius = 10;
duration      = 1900;
speed         = MISSION_SPEED_SLOW;
minDepth      = MISSION_YOYO_MIN_DEPTH;
maxDepth      = 20;
minAltitude   = YOYO_MIN_ALTITUDE;
maxCycles     = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode   = heading;
horizontal      = 302;
pitch        = -15;
speed        = 1.5;
maxDepth     = 5;
minAltitude  = 9;
duration     = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration     = 30;
heading      = 302;
speed        = 1.5;
verticalMode = pitch;
pitch        = 0;
}

behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = False;
}
