//////////////////////////////////////////////////////////////////////
// Bluefin proprietary source code. Copyright (C) Bluefin Robotics Co.
// and its licensors.
// 
// FILENAME: bpauvTailCone.cfg
// PURPOSE: List of BPAUV tailcone parameters, such as actuator geometry.
// AUTHOR:  dgreen
// DATE:    7/11/00
//
// NOTES:  
//  for explanation of meaning of these constants 
//  see the file tailcone_transform.mcd in the software
//  documentation folder of the Starteam repository.
//  for BPAUV and the stp100 + sv203 manuals
// MODS:
//
////////////////////////////////////////////////////////////////////


//speedPerRpm = 0.005;      // Waterspeed (m/sec) per prop rpm

// PROPELLER CONSTANTS
  propPitch = .05 ;         //Meters per radian               
  propeller_board_num = 1;       // board number of the pontech sv203 propller motor controller  


//  RUDDER CONSTANTS
 rudder_board_num = 3;        // board number of the stp100 rudder controller
 rudder_L1 = 0.333;           // meters	
 rudder_L2 = 0.075;	      // meters
 rudder_R0 = 0.302;	      // meters 
 rudder_Theta_zero = 1.0345; //1.045;   // radians 
 maxRudderAngle = 0.1745; // 18deg was 0.2967;      // radians
 minRudderAngle = -0.1745; // 18deg was -0.2618;
 rudderAccel = 5;              
 rudderHoldCurrent = 10;       // delay units
 rudderRunCurrent = 250; //use to be 118 hjt Oct 18 2011
 rudderSpeed = 100; //used to be 100
 rudderMinSpeed = 1;	
 rudderHome = 110; //was 118 
 rudderPot1CntsToSteps = 45; //was 38;

//  ELEVATOR CONSTANTS
 elevator_board_num = 2;     // board number of the stp100 elevator controller
 elevator_L1 = 0.35;          // meters
 elevator_L2 = 0.076;         // meters
 elevator_R0 = 0.311;         // meters
 elevator_Theta_zero = 0.936; //0.936; radians
 maxElevatorAngle = 0.174;   //0.191; // 15deg was 0.1571;    // radians	 
 minElevatorAngle = -0.174;  //-0.157; // 9deg was -0.262;   // radians	
 elevatorAccel = 5;
 elevatorHoldCurrent = 10;
 elevatorRunCurrent = 250; //use to be 120 hjt Oct 18 2011 
 elevatorSpeed = 100;
 elevatorMinSpeed = 1;
 elevatorHome = 90 ;    // changed from 133 
 elevatorPot1CntsToSteps = 45; //was 38;


//
// The following motor constants are scaled for the fixed-point micro code,
// and must be 16 bit integers. The control gains include the sampling period 
// where required.  That is Ki-here = Ki-cont*Ts, and Kd-here = Kd-cont/Ts.
//
  propAccel  = 300;
  propDeadband = 10;
  propKp    = 160;            // Position gain, (10e-4 counts)/(prop rpm)v
  propKi    = 0;          // Integral gain, (10e-4 counts)/(prop rpm)
  propIntLimit = 0;
  propKd    = 300;            // Rate gain, (10e-4 pwm counts)(prop rpm)
  propPWMLimit = 255;
  propErrorLimit = 16000;
  propServoRate = 20;
  debug = False;
