using System; using Microsoft.SPOT; namespace miniCPF { class MissionConfigFile { public struct DepthTable { public double depth; public double PV; public TimeSpan parkTime; } public static DepthTable[] ascendTable = new DepthTable[2]; public static DepthTable[] descendTable = new DepthTable[1]; public static TimeSpan parkSamplePeriod = new TimeSpan(0, 0, 60); //hours, minutes, seconds private static bool usbCable = true; public static void init() { usbCable = false; //usbCable = true; if (usbCable) { //Ascend table ascendTable[0].depth = 1; ascendTable[0].PV = 0.05; ascendTable[0].parkTime = new TimeSpan(0, 0, 0, 20); //days, hours, minutes, seconds ascendTable[1].depth = 0; ascendTable[1].PV = 0.02; 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 don't matter, //ascendTable[2].depth = 0.0; //ascendTable[2].PV = 0.03; //ascendTable[2].parkTime = new TimeSpan(0, 0, 0, 0); descendTable[0].depth = 2.0; descendTable[0].PV = -0.05; descendTable[0].parkTime = new TimeSpan(0, 0, 0, 10); //descendTable[1].depth = 1.0; //descendTable[1].PV = -0.01; //descendTable[1].parkTime = new TimeSpan(0, 0, 1, 00); } else { //Ascend table ascendTable[0].depth = 4; ascendTable[0].PV = 0.05; ascendTable[0].parkTime = new TimeSpan(0, 0, 5, 0); //days, hours, minutes, seconds ascendTable[1].depth = 0.0; ascendTable[1].PV = 0.05; 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 don't matter, //ascendtable[2].depth = 0.0; //ascendtable[2].pv = 0.3; //ascendTable[2].parkTime = new TimeSpan(0, 0, 0, 0); descendTable[0].depth = 7; descendTable[0].PV = -0.05; descendTable[0].parkTime = new TimeSpan(0, 0, 5, 0); } } } }