################################################################################
#
# PURPOSE: Temperature following behavior to track tide generated internal wave
# AUTHOR:  Zhang, Hoover
# DATE:    2007MAR16
# NOTE:    Planned as first mission, short run, toward open water to test behavior
#		Sequential behavoirs are bottom-up.  Priorities are top-down.
#               Start this with vehicle near Inshore Waypoint
# MODS:
#
################################################################################





# Mission timer
# Total time in subroutines is 3690
# Time to travel distance is 1570
# Estimated time for total mission is 1840 Or 30min40sec
# Max time set at 2200 or 36min40sec
# "Wrong way Charlie" AUV is only halfway to the beach
behavior missionTimer {
timeOut = 2200;
}

# Maximum depth and Abort Depth
behavior depthEnvelope {
 minDepth = 0;
 maxDepth = 60;
 abortDepth = 70;
 abortAltitude = 2.5;
}

# 300 secs or 30 GPS hits to continue
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}

# Surface, 20 upangle, for 20 minutes
# estimate 120sec from max depth to surface
behavior ascend {
duration = 1200;
horizontalMode = rudder;
horizontal = 10;
pitch = 20;
speed = 1.5;
endDepth = 2;
}

# 30 minutes to Midway 
behavior waypointtemp_yoyo {
latitude = 36.6984;
longitude = -121.9125;
captureRadius = 10;
duration = 1800;
speed = 1.5;
minDepth = 2.5;
maxDepth = 40;
minAltitude = 10.0;
maxCycles = 1000000;
}

# Dive, 15 degre down angle to 5 meter depth for 60 sec
behavior descend {
horizontalMode = heading;
horizontal = 281;
pitch = -15;
speed = 1.5;
maxDepth = 5;
minAltitude = 9;
duration = 60;
}


# 30 seconds to gain speed at heading 281
behavior setpoint {
duration = 30;
heading = 281;
speed = 1.5;
verticalMode = pitch;
pitch = 0;
}

# 300 seconds or 30 GPS hits
behavior getgps {
duration = 300;
minHits = 30;
abortOnTimeout = True;
}
