////////////////////////////////////////////////////////////////////
//
// PURPOSE: List of parameters, such as mass properties.
// AUTHOR:  Altex Team/rsm
// DATE:    99/9/8
//
// NOTES:   All values must be in Standard International 
//          Units (mks).  Angles must be in degrees.
//
//          The first cut of this file contains Odyssey II numbers.
//
// MODS: Gashler 2/16/03 to support ops with 327 cm vehicle.:
//
////////////////////////////////////////////////////////////////////
//
   vehicleName		= Dorado389;  
   Ts                   = .2;           //seconds; Control system sampling prd.
   propPitch		= .04912;       //Meters/rad; Corrected 3kts <=> 300 rpm
   tau			= 2.5;		//seconds; Command generator time const.
//
// Heading (Sway/Yaw):
   kpHeading		= 1.0;		//unitless; Position gain, ODY
   kdHeading		= 2.0;		//sec; Rate gain           ODY
   kwpHeading		= .05;		//rad/meter; Cross-track error gain
   kiHeading		= 0.020;        //1/sec; Integral gain     ODY
// kiHeading		= 0.000;        //1/sec; Integral gain     ODY
// kiwp                 = 0.002;        //rad/sec/meter; crs trk intgrl gain
   maxHdgRate		= 12.;          //Deg/sec; Max turn rate
   maxHdgInt		= 5.0;          //deg.; max cmded rudder from hdg int
   rudLimit	        = 11.;		//degrees; Max tailcone deflection
   maxXteInt            = 10.;          //degrees; Max heading trim
   maxXteOff            = 10.;          //meters; xte int off above this error
//
// Pitch:
   kpPitch		= 0.75;         //unitless; Position gain  ODY
   kdPitch		= 1.1;		//sec; Rate gain           ODY
   pitchLimit		= 30.;		//degrees; Max veh pitch
// kiPitch		= .025;		//1/sec; Integral gain     ODY
   kiPitch		= 0.0;		//1/sec; Integral gain     ODY
   maxPitchInt		= 10.0;         //deg.; max cmded elev from pitch int
   elevLimit		= 11.;		//degrees, max tailcone deflection changed 3/6/03 dg
//
// Depth (Heave/Pitch):
   kiDepth		= 0.0008;	//rad/sec/meter; Dive loop int. gain
// kpDepth		= .017;         //rad/meter; Dive loop pos'n gain ODY
   kpDepth		= .09;          //rad/meter; Dive loop pos'n gain ODY
   maxDiveRate		= 1.5;		//meters/sec was .5 m/s
   maxDepthInt		= 5.0;          //deg.; max cmded pitch frm depth int
//
// Flags:
   decouple             = 0.;           // Decouple heading and depth control
   altimeterInstrument  = 0.;           // 0 => DVL, 1 => PSA
   logOnly		= 0;
   useLbl               = 0.;           // 0 => log only; 1 => Use for control
   useIns		= 0.;
//
// Not used?
   kiHeadingLimit	= 5.;		//degrees; Limit on integral term
   kiPitchLimit		= 10.;		//degrees; Limit on integral term
   rudActLimit		= 10000;	//counts; Max actuator excursion
   rudActRateLimit	= 1200.;	//counts/sec
   elevActLimit		= 10000;	//counts; Max actuator excursion
   elevActRateLimit	= 1200.;	//counts/sec
//
// Mass Properties:
   mass			= 867.8;	//kg; Vehicle mass Ctd len=170 in.
   buoyancy		= 8527;		//Newtons, 4 lbf, Ctd 170 in.
//
// Stability Derivatives:
   effDragCoef		= .21;		//unitless; veh drag in x; related to Xuu
   Xuabu = -25.0;                       //Force Derivative, kg/meter
//
// Geometric Parameters (Used only by the simulation)
//
// The following y & z CG values were measured on 1 June, for the 1st Octans 
// test.  The x value is computed.
//
   centerOfMassX = 0.1181;
   centerOfMassY = -0.000236;
   centerOfMassZ = 0.006794;

   centerOfBuoyX = 0.1181;
   centerOfBuoyY = 0.0;
   centerOfBuoyZ = 0.0;
//
// We still have the 4 fin Odyssey tailcone model here.  The X displacement has
// been adjusted for the 389 vehicle.
//
   lowerRudX = -1.973;
   lowerRudY = 0.012;
   lowerRudZ = -0.152;

   upperRudX = -1.973;
   upperRudY = 0.012;
   upperRudZ = 0.152;

   portElevX = -1.973;
   portElevY = -0.152;
   portElevZ = 0.0;

   stbdElevX = -1.973;
   stbdElevY = 0.152;
   stbdElevZ = 0.0;

   ductArea       = 0.28;              //Area of propeller disk, m^2
   propEfficiency = 0.80;              //eta, unitless
