################################################################################
#
# PURPOSE: Test operational speed range of the vehicle.
# AUTHOR:  Gashler
# DATE:    02/17/2003:
# NOTE:    Sequential behavoirs are bottom-up.  Priorities are top-down.
# MODS:
#
################################################################################
#
# Define Mission parameters:
#define MISSION_SPEED      1.500000
#define MISSION_DISTANCE   1027.360876
#define MISSION_TIME       2710
#define MISSION_TIMEOUT    3252
#define DEPTH_MAX          75.000000
#define DEPTH_ABORT        85.000000
#define ALTITUDE_MIN       18.000000
#define ALTITUDE_ABORT     10.000000
#define GPS_DURATION       600
#define DESCENT_DEPTH      10.000000
#define DESCEND_DURATION   300
#define SETPOINT_DURATION  30
#define GPSMINHITS         60
#define ASCENDRUDDER       10.000000
#define ASCENDPITCH        20.000000
#define ASCENDENDDEPTH     2.000000
#define DESCENDPITCH       -15.000000
#define MAXCROSSTRACKERROR 20
#define RESON_DURATION     6

behavior missionTimer
{
  timeOut = 1000;
}
#
# Depth Envelope
#
behavior depthEnvelope
{
  minDepth     = 0;          #Meters
  maxDepth     = 15;         #Meters
  minAltitude  = 10;          #Meters
  abortDepth   = 25;         #Meters
}
behavior getgps  
{ 
duration = GPS_DURATION; 
minHits = GPSMINHITS; 
abortOnTimeout = True; 
} 
# 
# ascend behavior 
behavior ascend  
{ 
duration  = 300; 
horizontalMode   = rudder; 
horizontal       = ASCENDRUDDER; 
pitch            = ASCENDPITCH; 
speed            = MISSION_SPEED; 
endDepth         = ASCENDENDDEPTH; 
} 

behavior setpoint
{
duration = 200;
heading = 270;
speed = 1.5;
verticalMode = depth;
depth = 10;
}

# setpoint on surface to accelerate to speed.
behavior descend  
{ 
horizontalMode   = heading; 
horizontal   = 270.0; 
pitch        = DESCENDPITCH; 
speed        = MISSION_SPEED; 
maxDepth     = DESCENT_DEPTH; 
minAltitude  = ALTITUDE_MIN; 
duration     = DESCEND_DURATION; 
} 

behavior setpoint
{
duration = 60;
heading = 270;
speed = 1.5;
verticalMode = depth;
depth = 0;
}

behavior getgps  
{ 
duration = GPS_DURATION; 
minHits = GPSMINHITS; 
abortOnTimeout = True; 
} 
# 
# ascend behavior 
behavior ascend  
{ 
duration  = 300; 
horizontalMode   = rudder; 
horizontal       = ASCENDRUDDER; 
pitch            = ASCENDPITCH; 
speed            = MISSION_SPEED; 
endDepth         = ASCENDENDDEPTH; 
} 

behavior setpoint
{
duration = 200;
heading = 90;
speed = 1.5;
verticalMode = depth;
depth = 10;
}

# setpoint on surface to accelerate to speed.
behavior descend  
{ 
horizontalMode   = heading; 
horizontal   = 90.0; 
pitch        = DESCENDPITCH; 
speed        = MISSION_SPEED; 
maxDepth     = DESCENT_DEPTH; 
minAltitude  = ALTITUDE_MIN; 
duration     = DESCEND_DURATION; 
} 

behavior setpoint
{
duration = 60;
heading = 90;
speed = 1.5;
verticalMode = depth;
depth = 0;
}

behavior getgps
{
minHits = 10;
duration = 60;
abortOnTimeout = True; 
}
