#  17Dec09_OUTbound.cfg
# 
# DEPLOYMENT WAYPOINT        Launch N36 46.80345 W121 53.66414
# MISSION STARTING WAYPOINT  East   N36 46.80000 W121 54.00000 = N36.78 W121.9
# INTERMEDIATE WAYPOINTS     Timed, should cover distance in approx 3.5 legs of 40 min each
# MISSION END WAYPOINT       West   N36 46.80000 W122 02.40000 = N36.78 W122.04
#
# TOTAL MISSION LENGTH IN METERS 12500
# Mission speed 1.75 m/s
#  at 1.52 SOG ( 30 degree yoyo's ) 
#  mission should take approx 2 h 30 min
#
# Arm ALL gulpers at start of mission for adaptive firing
#
#




#
#should be 8224 second mission, set timer to 120%
#set timeout in seconds
behavior missionTimer {
timeOut = 10000;
}

behavior depthEnvelope {
  minDepth = 0;
  maxDepth = 275;
  abortDepth = 300;
  abortAltitude = 2.5;
  abortLockoutDepth = 10.0;
}

# Mission End

# acquire gps fix
behavior getgps {
duration = 7200;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 270;
pitch = 20;
speed = 1.5;
endDepth = 2;
}

#Final leg to waypoint West
# N36 46.80000 W122 02.40000
# WATER DEPTH 365 METERS
# LEG DISTANCE 500 METERS
behavior waypoint_yoyo {
latitude = 36.78;
longitude = -122.04;
captureRadius = 10;
duration = 2400;
speed = 1.75;
minDepth = 50;
maxDepth = 250;
minAltitude = 6.5;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 270;
pitch = -15;
speed = 1.5;
maxDepth = 5;
minAltitude = 9;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 270;
speed = 1.5;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 270;
pitch = 20;
speed = 1.5;
endDepth = 2;
}

#Third leg to waypoint West
# N36 46.80000 W122 02.40000
# WATER DEPTH 365 METERS
# LEG DISTANCE 500 METERS
behavior waypoint_yoyo {
latitude = 36.78;
longitude = -122.04;
captureRadius = 10;
duration = 2400;
speed = 1.75;
minDepth = 50;
maxDepth = 250;
minAltitude = 6.5;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 270;
pitch = -15;
speed = 1.5;
maxDepth = 5;
minAltitude = 9;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 270;
speed = 1.5;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 270;
pitch = 20;
speed = 1.5;
endDepth = 2;
}

#Second leg to waypoint West
# N36 46.80000 W122 02.40000
# WATER DEPTH 365 METERS
# LEG DISTANCE 500 METERS
behavior waypoint_yoyo {
latitude = 36.78;
longitude = -122.04;
captureRadius = 10;
duration = 2400;
speed = 1.75;
minDepth = 50;
maxDepth = 250;
minAltitude = 6.5;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 270;
pitch = -15;
speed = 1.5;
maxDepth = 5;
minAltitude = 9;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 270;
speed = 1.5;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 270;
pitch = 20;
speed = 1.5;
endDepth = 2;
}

#First leg to waypoint West
# N36 46.80000 W122 02.40000
# WATER DEPTH 365 METERS
# LEG DISTANCE 500 METERS
behavior waypoint_yoyo {
latitude = 36.78;
longitude = -122.04;
captureRadius = 10;
duration = 2400;
speed = 1.75;
minDepth = 50;
maxDepth = 250;
minAltitude = 6.5;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 270;
pitch = -15;
speed = 1.5;
maxDepth = 5;
minAltitude = 9;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 270;
speed = 1.5;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 600;
minHits = 30;
abortOnTimeout = True;
}

# ascend behavior
behavior ascend {
duration = 1200;
horizontalMode = heading;
horizontal = 270;
pitch = 20;
speed = 1.5;
endDepth = 2;
}

#Initial leg to start of line
# N36 46.8 W121 54
# WATER DEPTH 365 METERS
# LEG DISTANCE 500 METERS
# shallow yoyo's to initial waypoint
behavior waypoint_yoyo {
latitude = 36.78;
longitude = -121.9;
captureRadius = 10;
duration = 600;
speed = 1.75;
minDepth = 2.0;
maxDepth = 20;
minAltitude = 6.5;
maxCycles = 2000;
}

# Descend behavior to 5 meters
behavior descend {
horizontalMode = heading;
horizontal = 270;
pitch = -15;
speed = 1.5;
maxDepth = 5;
minAltitude = 9;
duration = 60;
}

# setpoint on surface to gather momentum
behavior setpoint {
duration = 30;
heading = 270;
speed = 1.5;
verticalMode = pitch;
pitch = 0;
}

# acquire gps fix
behavior getgps {
duration = 300;
minHits = 15;
abortOnTimeout = True;
}

#Arm all gulpers for adaptive firing
#
behavior ArmTheGulper{
   duration = 1;
   gulper0 = 1;
   gulper1 = 1;
   gulper2 = 1;
   gulper3 = 1;
   gulper4 = 1;
   gulper5 = 1;
   gulper6 = 1;
   gulper7 = 1;
   gulper8 = 1;
   gulper9 = 1;
}

# Launch 500 meters east of Waypoint East 
# at Waypoint Launch
#   N36 46.80345 W121 53.66414
