using System; using Microsoft.SPOT; namespace miniCPF { class configFile { //State timeout values static public readonly TimeSpan RunEngrTestTimeout = new TimeSpan(0, 20, 0); static public readonly TimeSpan preMissionDelayTimeout = new TimeSpan(0, 0, 15); static public readonly TimeSpan SOSetBellowsTimeout = new TimeSpan(0, 20, 0); static public readonly TimeSpan surfaceOpsTimeout = new TimeSpan(0, 5, 0); static public readonly TimeSpan ABSetBellowsTimeout = new TimeSpan(0, 20, 0); static public readonly TimeSpan ABRetractTimeout = new TimeSpan(0, 20, 0); static public readonly TimeSpan descendTimeout = new TimeSpan(1, 20, 0); static public readonly TimeSpan anchorTimeout = new TimeSpan(0, 10, 0); static public readonly TimeSpan deAnchorTimeout = new TimeSpan(0, 5, 0); static public readonly TimeSpan ascendTimeout = descendTimeout; //static public readonly TimeSpan surfaceTimeout = 300000; static public readonly TimeSpan timeoutDefaultPeriod = new TimeSpan(0, 0, 10); //pressure stuff public const int DGHSamplePeriod = 1000; //msec public const int SBE41SamplePeriod = 1000; public const double maxPressure = 20.0; //dBar //bellows position sensor public const int MTSSamplePeriod = 1000; //msec public const int SMSleepPeriod = DGHSamplePeriod; //msec //Buoyancy control holdVelocity constants public const double KPlatVel = 80.0, //Constant for P term of PID TiPlatVel = 50000.0, // Time constant for I term of PID (in denominator, bigger values less I term in output TdPlatVel = 10.1, // Time constant for D term of PID TfPlatVel = 1.59, // Derivative filter time constant TtPlatVel = 100.0, // Anti-windup time constant BPlatVel = 1.0, // Setpoint weight uLowPlatVel = -3000.0 / 60.0, // minimum possible output (RPS) uHighPlatVel = 3000.0 / 60.0, // maximum possible output (RPS) hPlatVel = DGHSamplePeriod / 1000.0; // Sample period (seconds) //Buoyancy control holdDepth constants public const double KDepth = 0.6, //Constant for P term of PID TiDepth = 1000000.0, // Time constant for I term of PID (in denominator, bigger values less I term in output TdDepth = 0.2, // Time constant for D term of PID TfDepth = 2.0, // Derivative filter time constant TtDepth = 1000000.0, // Anti-windup time constant BDepth = 1.0, // Setpoint weight uLowDepth = -3000.0 / 60.0, // minimum possible output (RPS) uHighDepth = 3000.0 / 60.0, // maximum possible output (RPS) hDepth = DGHSamplePeriod / 1000.0; // Sample period (seconds) //Pump motor encoder counts per revolution public const double COUNTSperREV = 500.0 * 4.0; //500 Counts per Revolution *4 for quadrature interpolation //autoballast (AB) stuff public const double ABSetBellowsPosition = 72.4; //72mm - slightly pos, no add ballast. 7/9/14 public const int ABSetBellowsJV = 20000; public const int ABRetractJV = 1000; public const double ABVelocityThreshold = -0.02; public const double ABDepthThreshold = 0.1; //ADUC stuff public const int aducEnqueueDecimator = 15; public const double aducCH1Scale = 55.646; public const double aducCH1Offset = -11.525; public const double minBatteryBusVolts = 28.0; //CN0254 stuff public const double cn0254CH0Scale = 22.81250; public const double cn0254CH0Offset = -2.28125; public const double cn0254CH1Scale = 9.304; public const double cn0254CH1Offset = -1.734; public const double cn0254CH2Scale = 1.6956; public const double cn0254CH2Offset = -0.0794; public const double cn0254CH3Scale = 2.5; public const double cn0254CH3Offset = 0.0; public const double cn0254CH4Scale = 2.5; public const double cn0254CH4Offset = 0.0; //Emergency Ascend (EA) stuff public const int EAJV = 40000; public const double bellowsEAPosition = 100; public static TimeSpan EASendPeriod = new TimeSpan(0, 0, 15, 0); //Buoyancy control stuff public const double surfacePressure = 0.35; public const double minBellowsPosition = 68.0; public const double maxBellowsPosition = 110.0; //public const double SOSetBellowsPosition = 68.5; public const double SOSetBellowsPosition = 77.0; //use this for quicker tests public const int SOSetBellowsJV = 40000; //Anchor stuff public const double anchorPressureMinimum = 10.0; public const double deanchorVelocityThreshold = 0.02; public const int deanchorJV = 10000; //nudge control bands public const double OB = 2; //"outer band" in meters public const double IB = 0.75; //"inner band" in meters public const double approachVel = 0.01; } }