using System; using Microsoft.SPOT; //TODO move all these parameters into appropriate classes namespace CPF { public static class configFile { public const double bellowsLowerLimit = 25.0; public const double bellowsUpperLimit = 185.0; public static double lowerDescendBellowsLimit = bellowsLowerLimit + 3.0; public static double upperDescendBellowsLimit = bellowsUpperLimit - 3.0; public static TimeSpan SMSleepPeriod = new TimeSpan(0, 0, 0, 0, SBE41SamplePeriod); //msec public const double SOSetBellowsPosition = 155.0; //public const int SOSetBellowsJV = 20000; public const int SOSetBellowsJV = 60000; public const double RMSetBellowsPosition = 175.0; // public const double RMSetBellowsPosition = 135.0; public const double ABSetBellowsPosition = 110.0; public const int ABSetBellowsJV = 15000; public static int ABRetractJV = 2500; public const double ABPressureThreshold = 0.3; //Buoyancy control stuff public const double surfacePressure = 0.35; //Anchor stuff public const double deanchorVelocityThreshold = 0.007; public const int deanchorJV = 4000; public const double deanchorVelocityLimit = 0.02; public const int anchorPressureCountThreshold = 3; public const double anchorPressureMinimum = 4.0; public const double anchorVelocityLimit = 0.025; public const double exitAnchorPressureThreshold = 5.0; //nudge control public const double approachVel = 0.01; //FLBB Stuff public static int flbbPkt = 2; public static int flbbAve = 3; //SBE41 stuff public const int cpPressureCutoff = 1; //CP mode stops below this pressure in deciBars public const int cpRunPumpTime = 2; //run the pump for this many seconds before starting CP mode public static bool CPMode = true; //Puts SBE41 in CP mode during ascend state only public const int SBE41SamplePeriod = 3000; //msec public const int SBE41CPSamplePeriod = 1000; //msec public const double maxPressure = 150.0; //dBar static public readonly TimeSpan cpDelay = new TimeSpan(0, 0, 20); //EngrLogger stuff public static int verbosityLevel = 5; //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.0, // Time constant for D term of PID TfPlatVel = 10.0, // filter time constant TtPlatVel = 100.0, // Anti-windup time constant BPlatVel = 1.0, // Setpoint weight uLowPlatVel = -2500.0 / 60.0, // minimum possible output (RPS) uHighPlatVel = 2500.0 / 60.0, // maximum possible output (RPS) hPlatVel = SBE41SamplePeriod / 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 //ADC stuff public const int aducEnqueueDecimator = 15; //public const double minBatteryBusVolts = 26.0; //public const double minBatteryBusVolts = 30.5; public const int ADCSamplePeriod = 3000; public const int PTHSamplePeriod = 60000; } }