################################################################################
#
# PURPOSE: Test operational speed range of the vehicle.
# AUTHOR:  thomas
# DATE:    08/16/2006:
# NOTE:    Sequential behavoirs are bottom-up.  Priorities are top-down.
# MODS:
#
################################################################################
#define MISSION_SPEED 1.5

behavior missionTimer
{
  timeOut = 1000;
}
#
# Depth Envelope
#
behavior depthEnvelope
{
  minDepth     = 0;          #Meters
  maxDepth     = 35;         #Meters
  minAltitude  = 15;          #Meters
  abortDepth   = 40;         #Meters
  abortAltitude = 5;
}

behavior getgps
{
minHits = 10;
duration = 60;
}

behavior ascend {

  duration         = 180;      #Seconds
  horizontalMode   = rudder;   #Mode
  horizontal       = -2;      #Degrees; 
  pitch            = 45;       #Degrees
  speed            = MISSION_SPEED;      #Meters/sec
  endDepth         = 2;	       #Meters
}

behavior reson
{
  duration = 6;

  SBP_Mode  = 0;
  SBP_Power = 0.0;
  SBP_Gain = 128.0;
  SBP_Duration = 330.0;

  LoSS_Mode = 0;
  LoSS_Power = 0.0;
  LoSS_Range = 200.0;
  
  HiSS_Mode = 0;
  HiSS_Power = 0.0;
  HiSS_Range = 200.0;

  MB_Mode = 1; #multibeam must ping for DVL to ping
  MB_Power = 0.0; # must be between 170.0 db/upas to 220 db/upas
  MB_Range = 200.0; # meters
  MB_Rate = 2.0; #pings/sec
  MB_Gain = 60.0; #between 0 and 83 db
  MB_Pulse_Width = .00003;
  MB_Bottom_Detect_Filter_Min_Range = 25.0;
  MB_Bottom_Detect_Filter_Max_Range = 200.0;
  MB_Bottom_Detect_Filter_Min_Depth = 25.0;
  MB_Bottom_Detect_Filter_Max_Depth = 200.0;
  MB_Bottom_Detect_Range_Mode = 1;
  MB_Bottom_Detect_Depth_Mode = 1;
  Snippet_Mode = 1;
  Window_Size = 200;
  Log_Mode = 0;
}

#
# Command a constant heading and depth.
#
behavior setpoint
{
  duration     = 300;          #Seconds
  heading      = 10;          #Degrees
  speed        = 1.5;          #Meters/second
  verticalMode = depth;
  depth        = 30.0;           #Meters
}


behavior reson
{
  duration = 6;

  SBP_Mode  = 1;
  SBP_Power = 100.0;
  SBP_Gain = 128.0;
  SBP_Duration = 430.0;

  LoSS_Mode = 1;
  LoSS_Power = 100.0;
  LoSS_Range = 200.0;
  
  HiSS_Mode = 0;
  HiSS_Power = 0.0;
  HiSS_Range = 200.0;

  MB_Mode = 1; #multibeam must ping for DVL to ping
  MB_Power = 220.0; # must be between 170.0 db/upas to 220 db/upas
  MB_Range = 200.0; # meters
  MB_Rate = 2.0; #pings/sec
  MB_Gain = 60.0; #between 0 and 83 db
  MB_Pulse_Width = .00003;
  MB_Bottom_Detect_Filter_Min_Range = 25.0;
  MB_Bottom_Detect_Filter_Max_Range = 200.0;
  MB_Bottom_Detect_Filter_Min_Depth = 25.0;
  MB_Bottom_Detect_Filter_Max_Depth = 200.0;
  MB_Bottom_Detect_Range_Mode = 1;
  MB_Bottom_Detect_Depth_Mode = 1;
  Snippet_Mode = 1;
  Window_Size = 200;
  Log_Mode = 1;
}

# descend behavior for launch
behavior descend 
{
duration = 90;
horizontalMode = heading;
horizontal = 10;
pitch = -30;
speed = 1.50;
maxDepth = 5; 
minAltitude = 10;
}

# setpoint on surface to accelerate to speed.

behavior setpoint
{
duration = 30;
heading = 10;
speed = 1.50;
verticalMode = pitch;
pitch = 0;
}

behavior getgps
{
minHits = 5;
duration = 60;
}


behavior reson
{
  duration = 6;

  SBP_Mode  = 0;
  SBP_Power = 0.0;
  SBP_Gain = 64.0;
  SBP_Duration = 330.0;

  LoSS_Mode = 0;
  LoSS_Power = 0.0;
  LoSS_Range = 200.0;
  
  HiSS_Mode = 0;
  HiSS_Power = 0.0;
  HiSS_Range = 200.0;

  MB_Mode = 1; #multibeam must ping for DVL to ping
  MB_Power = 0.0; # must be between 170.0 db/upas to 220 db/upas
  MB_Range = 125.0; # meters
  MB_Rate = 2.0; #pings/sec
  MB_Gain = 60.0; #between 0 and 83 db
  MB_Pulse_Width = .00003;
  MB_Bottom_Detect_Filter_Min_Range = 10.0;
  MB_Bottom_Detect_Filter_Max_Range = 125.0;
  MB_Bottom_Detect_Filter_Min_Depth = 10.0;
  MB_Bottom_Detect_Filter_Max_Depth = 125.0;
  MB_Bottom_Detect_Range_Mode = 1;
  MB_Bottom_Detect_Depth_Mode = 1;
  Snippet_Mode = 1;
  Window_Size = 200;
  Log_Mode = 0;
}

