using System; using Microsoft.SPOT; namespace CPF { class MissionConfigFile { public struct DepthTable { public double depth; public double PV; public TimeSpan parkTime; } public enum MissionTypes : int { testTankOnCable = 0, testTankOffCable, meters60 } public static MissionTypes mission = MissionTypes.meters60; //Use this for 60 meter table public static DepthTable[] ascendTable = new DepthTable[13]; //Use this for on USB cable //public static DepthTable[] ascendTable = new DepthTable[5]; //Use this for off USB cable //public static DepthTable[] ascendTable = new DepthTable[3]; //Use this for all 3 missions public static DepthTable[] descendTable = new DepthTable[1]; public static TimeSpan parkSamplePeriod = new TimeSpan(0, 1, 0); //hours, minutes, seconds public static void init() { switch (mission) { case (MissionTypes.testTankOnCable): ascendTable[0].depth = 1.75; ascendTable[0].PV = 0.1; ascendTable[0].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[1].depth = 1.25; ascendTable[1].PV = 0.1; ascendTable[1].parkTime = new TimeSpan(0, 0, 0, 0); // The last entry in the Ascend table must have a depth of 0.0 // When the mission hits the last entry in the ascend table, it goes to the surface at this PV rate // The park time value doesn't matter, ascendTable[2].depth = 0.0; ascendTable[2].PV = 0.2; ascendTable[2].parkTime = new TimeSpan(0, 0, 0, 0); descendTable[0].depth = 2.5; descendTable[0].PV = -0.10; descendTable[0].parkTime = new TimeSpan(0, 0, 3, 0); break; case (MissionTypes.testTankOffCable): //Ascend table ascendTable[0].depth = 7.0; ascendTable[0].PV = 0.05; ascendTable[0].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[1].depth = 5.0; ascendTable[1].PV = 0.05; ascendTable[1].parkTime = new TimeSpan(0, 0, 0, 0); ascendTable[2].depth = 3.0; ascendTable[2].PV = 0.05; ascendTable[2].parkTime = new TimeSpan(0, 0, 0, 0); ascendTable[3].depth = 1.5; ascendTable[3].PV = 0.05; ascendTable[3].parkTime = new TimeSpan(0, 0, 0, 0); // The last entry in the Ascend table must have a depth of 0.0 // When the mission hits the last entry in the ascend table, it goes to the surface at this PV rate // The park time value don't matter, ascendTable[4].depth = 0.0; ascendTable[4].PV = 0.1; ascendTable[4].parkTime = new TimeSpan(0, 0, 0, 0); descendTable[0].depth = 15.0; descendTable[0].PV = -0.1; descendTable[0].parkTime = new TimeSpan(0, 0, 2, 0); break; case (MissionTypes.meters60): //Ascend table ascendTable[0].depth = 55.0; ascendTable[0].PV = 0.1; ascendTable[0].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[1].depth = 50.0; ascendTable[1].PV = 0.1; ascendTable[1].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[2].depth = 45.0; ascendTable[2].PV = 0.1; ascendTable[2].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[3].depth = 40.0; ascendTable[3].PV = 0.1; ascendTable[3].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[4].depth = 35.0; ascendTable[4].PV = 0.1; ascendTable[4].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[5].depth = 30.0; ascendTable[5].PV = 0.1; ascendTable[5].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[6].depth = 25.0; ascendTable[6].PV = 0.1; ascendTable[6].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[7].depth = 20.0; ascendTable[7].PV = 0.1; ascendTable[7].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[8].depth = 15.0; ascendTable[8].PV = 0.1; ascendTable[8].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[9].depth = 10.0; ascendTable[9].PV = 0.1; ascendTable[9].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[10].depth = 5.0; ascendTable[10].PV = 0.1; ascendTable[10].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds ascendTable[11].depth = 2.0; ascendTable[11].PV = 0.1; ascendTable[11].parkTime = new TimeSpan(0, 0, 0, 0); //days, hours, minutes, seconds // The last entry in the Ascend table must have a depth of 0.0 // When the mission hits the last entry in the ascend table, it goes to the surface at this PV rate // The park time value don't matter, ascendTable[12].depth = 0.0; ascendTable[12].PV = 0.1; ascendTable[12].parkTime = new TimeSpan(0, 0, 0, 0); descendTable[0].depth = 60.0; descendTable[0].PV = -0.15; descendTable[0].parkTime = new TimeSpan(0, 0, 20, 0); break; } } } }