public void AddCurve(GraphPane myPane, Stats dataClass, int Length, string title)
 {
     PointPairList points = new PointPairList();
     for (int i = 0; i < Length; i++)
     {
         double x = Math.Abs(dataClass.DataList[i]);
         double y = (i + 1) * (1.0 / ((double) Length));
         points.Add(x, y);
     }
     myPane.AddCurve(title, points, this.rotator.NextColor, this.rotator.NextSymbol).Symbol.Fill = new Fill(Color.White);
     myPane.YAxis.Scale.MaxAuto = false;
     myPane.YAxis.Scale.MinAuto = false;
     myPane.YAxis.Scale.Max = 1.0;
     myPane.YAxis.Scale.Min = 0.0;
     this.zedGraphControl1.AxisChange();
 }
Esempio n. 2
0
 public void AddCurveToPlot(Stats dataClass, int Length, string label, Color crveColor)
 {
     EventHandler method = null;
     try
     {
         this._myMainXaxisData = new double[Length];
         for (int i = 0; i < Length; i++)
         {
             this._myMainXaxisData[i] = dataClass.DataList[i];
         }
         this._curveColor = crveColor;
         this._curveLabel = label;
         if (this._myMainXaxisData.Length > 0)
         {
             Stats stats = new Stats();
             double[] y = new double[this._myMainXaxisData.Length];
             for (int j = 0; j < this._myMainXaxisData.Length; j++)
             {
                 y[j] = (j + 1) * (1.0 / ((double) this._myMainXaxisData.Length));
             }
             stats.SortArray(this._myMainXaxisData.Length, this._myMainXaxisData);
             this._myMainPane.AddCurve(this._curveLabel, this._myMainXaxisData, y, this._curveColor, SymbolType.Circle);
             this._myMainPane.AxisChange();
             if (method == null)
             {
                 method = delegate {
                     this.zedGraphControl1.Refresh();
                     this.zedGraphControl1.Update();
                 };
             }
             base.Invoke(method);
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
 }
Esempio n. 3
0
 public void CreateChart(ZedGraphControl zgc)
 {
     EventHandler method = null;
     this._myMainPane.YAxis.MajorGrid.IsVisible = true;
     this._myMainPane.YAxis.MinorGrid.IsVisible = true;
     this._myMainPane.CurveList.Clear();
     this._myMainPane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45f);
     this._myMainPane.Title.Text = this._reportTitle;
     this._myMainPane.XAxis.Title.Text = "Data";
     this._myMainPane.YAxis.Title.Text = "Probability";
     this._myMainPane.YAxis.Scale.MaxAuto = false;
     this._myMainPane.YAxis.Scale.MinAuto = false;
     this._myMainPane.YAxis.Scale.Max = 1.0;
     this._myMainPane.YAxis.Scale.Min = 0.0;
     if ((this._myMainXaxisData != null) && (this._myMainXaxisData.Length > 0))
     {
         Stats stats = new Stats();
         double[] y = new double[this._myMainXaxisData.Length];
         for (int i = 0; i < this._myMainXaxisData.Length; i++)
         {
             y[i] = (i + 1) * (1.0 / ((double) this._myMainXaxisData.Length));
         }
         stats.SortArray(this._myMainXaxisData.Length, this._myMainXaxisData);
         this._myMainPane.AddCurve(this._curveLabel, this._myMainXaxisData, y, this._curveColor, SymbolType.Diamond);
         this._myMainPane.AxisChange();
         if (method == null)
         {
             method = delegate {
                 zgc.Update();
                 zgc.Refresh();
             };
         }
         base.Invoke(method);
     }
     zgc.Size = new Size(base.ClientRectangle.Width - 0x19, base.ClientRectangle.Height - 0x2d);
 }
Esempio n. 4
0
 public void SetPlotData(Stats dataClass, int Length, string title, string label, Color crveColor)
 {
     try
     {
         this._myMainXaxisData = new double[Length];
         for (int i = 0; i < Length; i++)
         {
             this._myMainXaxisData[i] = dataClass.DataList[i];
         }
         this._curveColor = crveColor;
         this._curveLabel = label;
         this._reportTitle = title;
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
 }
Esempio n. 5
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.isDisposed && disposing)
     {
         this.MyStats.Dispose();
         this.MyStats = null;
     }
     this.isDisposed = true;
 }
Esempio n. 6
0
 protected virtual void Dispose(bool disposing)
 {
     if (!this.isDisposed && disposing)
     {
         this.TTFFSamples.Dispose();
         this.TTFFSamples = null;
         this.Position2DErrorSamples.Dispose();
         this.Position2DErrorSamples = null;
         this.Position3DErrorSamples.Dispose();
         this.Position3DErrorSamples = null;
         this.VerticalErrorSamples.Dispose();
         this.VerticalErrorSamples = null;
         this.CNOSamples.Dispose();
         this.CNOSamples = null;
     }
     this.isDisposed = true;
 }
Esempio n. 7
0
 private void printSampleData(StreamWriter f, Stats s, string percentile, string limitStr, double exclude, string reportType, string unit)
 {
     if (f != null)
     {
         int index = 0;
         string[] strArray = percentile.Split(new char[] { ',' });
         string[] strArray2 = limitStr.Split(new char[] { ',' });
         this.percentileList = new List<double>();
         foreach (string str in strArray)
         {
             double p = Convert.ToDouble(str);
             double item = s.GetPercentile(p, exclude);
             if (strArray2.Length >= strArray.Length)
             {
                 this.percentileList.Add(item);
                 f.WriteLine("\t\t\t\t<field name=\"{0:F1}% {1}\" value=\"{2:F2}\" criteria=\"{3:F2}\" direction=\"&lt;\" units=\"{4}\"/>", new object[] { p, reportType, item, strArray2[index], unit });
             }
             else
             {
                 this.percentileList.Add(item);
                 f.WriteLine("\t\t\t\t<field name=\"{0:F1}% {1}\" value=\"{2:F2}\" criteria=\"\" direction=\"\" units=\"{3}\"/>", new object[] { p, reportType, item, unit });
             }
             index++;
         }
         double num4 = s.Stats_Max(exclude);
         f.WriteLine("\t\t\t\t<field name=\"Max {0}\" value=\"{1:F2}\" criteria=\"\" direction=\"\" units=\"{2}\"/>", reportType, num4, unit);
     }
 }
Esempio n. 8
0
 private void printTIA916Summary(StreamWriter f, Stats posStats, Stats ttffStats, List<int> data)
 {
     int[] numArray = new int[] { 60, 0x19, 50, 60, 0x23 };
     int[] numArray2 = new int[] { 180, 0x4b, 150, 180, 0x69 };
     string str = string.Empty;
     int num = 0;
     int index = data[num];
     int num3 = data[num++];
     int num4 = data[num++];
     int num5 = data[num++];
     int num6 = data[num++];
     int num7 = data[num++];
     int num8 = data[num];
     double ascendingValueByIndex = 0.0;
     double num10 = 0.0;
     double num11 = 0.0;
     double num12 = 0.0;
     bool flag = true;
     if (f != null)
     {
         int samples = posStats.Samples;
         ascendingValueByIndex = posStats.GetAscendingValueByIndex(0x4a, -9999.0);
         num10 = posStats.GetAscendingValueByIndex(0x62, -9999.0);
         if ((ascendingValueByIndex < 0.0) || (num10 < 0.0))
         {
             flag = false;
         }
         else if ((ascendingValueByIndex > numArray[index]) || (num10 > numArray2[index]))
         {
             flag = false;
         }
         double excludedVal = 31.0;
         double num15 = 16.0;
         try
         {
             excludedVal = Convert.ToDouble(this.TimeoutVal);
             num15 = Convert.ToDouble(this._limitVal);
         }
         catch
         {
         }
         num11 = ttffStats.GetAscendingValueByIndex(0x4a, excludedVal);
         num12 = ttffStats.GetAscendingValueByIndex(0x62, excludedVal);
         if ((num11 < 0.0) || (num12 < 0.0))
         {
             flag = false;
         }
         else if ((num11 > num15) || (num12 > num15))
         {
             flag = false;
         }
         double num16 = (((double) (samples - num4)) / ((double) samples)) * 100.0;
         double num17 = 95.0;
         if (flag && (num16 > num17))
         {
             str = "Pass";
         }
         else
         {
             str = "Fail";
         }
         f.WriteLine("\t\t\t\t<field name=\"Pass/Fail\" value=\"{0}\" criteria=\"Pass/Fail\" direction=\"\" units=\"\"/>", str);
         f.WriteLine("\t\t\t\t<field name=\"Yield %\" value=\"{0:F2}\" criteria=\"{1:F2}\" direction=\"&gt;=\" units=\"\"/>", num16, num17);
         f.WriteLine("\t\t\t\t<field name=\"Samples\" value=\"{0}\" criteria=\"\" direction=\"\" units=\"\"/>", samples);
         f.WriteLine("\t\t\t\t<field name=\"Misses\" value=\"{0}\" criteria=\"\" direction=\"\" units=\"\"/>", num4);
         f.WriteLine("\t\t\t\t<field name=\"# Miss TTFF\" value=\"{0}\" criteria=\"\" direction=\"\" units=\"\"/>", num5);
         f.WriteLine("\t\t\t\t<field name=\"# Over Limit TTFF\" value=\"{0}\" criteria=\"\" direction=\"\" units=\"\"/>", num6);
         f.WriteLine("\t\t\t\t<field name=\"# Miss Position\" value=\"{0}\" criteria=\"\" direction=\"\" units=\"\"/>", num7);
         f.WriteLine("\t\t\t\t<field name=\"# Over Limit Position\" value=\"{0}\" criteria=\"\" direction=\"\" units=\"\"/>", num8);
         f.WriteLine("\t\t\t\t<field name=\"75th TTFF\" value=\"{0}\" criteria=\"{1}\" direction=\"&lt;\" units=\"\"/>", (num11 > 0.0) ? num11 : 9999.0, this._limitVal);
         f.WriteLine("\t\t\t\t<field name=\"99th TTFF\" value=\"{0}\" criteria=\"{1}\" direction=\"&lt;\" units=\"\"/>", (num12 > 0.0) ? num12 : 9999.0, this._limitVal);
         f.WriteLine("\t\t\t\t<field name=\"75th 2-D\" value=\"{0}\" criteria=\"{1}\" direction=\"&lt;\" units=\"\"/>", (ascendingValueByIndex > 0.0) ? ascendingValueByIndex : 9999.0, numArray[index]);
         f.WriteLine("\t\t\t\t<field name=\"99th 2-D\" value=\"{0}\" criteria=\"{1}\" direction=\"&lt;\" units=\"\"/>", (num10 > 0.0) ? num10 : 9999.0, numArray2[index]);
         if (num3 >= 0)
         {
             f.WriteLine("\t\t\t\t<field name=\"3SVs Fix Count\" value=\"{0}\" criteria=\"\" direction=\"\" units=\"\"/>", num3);
         }
     }
 }
Esempio n. 9
0
 private void printCDFHelper(StreamWriter f, Stats s, string name)
 {
     f.WriteLine("\t\t<test name=\"{0}\">\r\n", name);
     double percentile = s.GetPercentile((double) 50.0, 0.0);
     double num2 = s.GetPercentile((double) 95.0, 0.0);
     double num3 = s.GetPercentile((double) 100.0, 0.0);
     int samplesExcludingThese = s.GetSamplesExcludingThese(0.0);
     f.WriteLine("\t\t\t<field name=\"Num Samples\" value=\"{0}\" criteria=\"1\" direction=\"&gt;\" />\r\n", samplesExcludingThese);
     f.WriteLine("\t\t\t<field name=\"{0} (50%)\" value=\"{1}\" criteria=\"10\" direction=\"&lt;\" />\r\n", name, percentile);
     f.WriteLine("\t\t\t<field name=\"{0} (95%)\" value=\"{1}\" criteria=\"10\" direction=\"&lt;\" />\r\n", name, num2);
     f.WriteLine("\t\t\t<field name=\"{0} (MAX)\" value=\"{1}\" criteria=\"10\" direction=\"&lt;\" />\r\n", name, num3);
     f.WriteLine("\t\t</test>\r\n");
 }
Esempio n. 10
0
 private void printE911Summary(StreamWriter f, Stats s)
 {
     double num = 0.0;
     if (f != null)
     {
         double num2 = Convert.ToDouble(this._limitVal);
         int samples = s.Samples;
         int inBoundCount = s.GetInBoundCount(num2);
         int outBoundCount = s.GetOutBoundCount(Convert.ToDouble(this._timeoutVal));
         int num6 = s.GetOutBoundCount(num2);
         if (samples > 0)
         {
             num = (((double) inBoundCount) / ((double) samples)) * 100.0;
         }
         f.WriteLine("\t\t\t\t<field name=\"Yield\" value=\"{0:F2}\" criteria=\"99\" direction=\"&gt;\" units=\"%\"/>", num);
         f.WriteLine("\t\t\t\t<field name=\"Samples\" value=\"{0}\" criteria=\"\" direction=\"\" units=\"\"/>", samples);
         f.WriteLine("\t\t\t\t<field name=\"TTFF &gt;{0:F2}s\" value=\"{1}\" criteria=\"\" direction=\"&lt; TBD\" units=\"sec\"/>", num2, num6);
         f.WriteLine("\t\t\t\t<field name=\"TTFF Timeout &gt;{0:F2}s\" value=\"{1}\" criteria=\"\" direction=\"&lt; TBD\" units=\"sec\"/>", this._timeoutVal, outBoundCount);
     }
 }
Esempio n. 11
0
 public void Tunnels_Summary(string dir)
 {
     try
     {
         if (!Directory.Exists(dir))
         {
             MessageBox.Show(string.Format("Directory Not Found!\n\n{0}", dir), "Report Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
         }
         else
         {
             DirectoryInfo info = new DirectoryInfo(dir);
             FileInfo[] files = info.GetFiles("*.csv");
             if (files.Length != 0)
             {
                 Stats s = new Stats();
                 Stats stats2 = new Stats();
                 Stats stats3 = new Stats();
                 string str = "SW Version: Not detected";
                 foreach (FileInfo info2 in files)
                 {
                     LogManager manager = new LogManager();
                     manager.OpenFileRead(info.FullName + info2.Name);
                     string str2 = manager.ReadLine();
                     for (str2 = manager.ReadLine(); str2 != null; str2 = manager.ReadLine())
                     {
                         string[] strArray = str2.Split(new char[] { ',' });
                         if (strArray.Length >= 11)
                         {
                             int num = Convert.ToInt32(strArray[8]);
                             int num2 = Convert.ToInt32(strArray[9]);
                             int num3 = Convert.ToInt32(strArray[10]);
                             s.InsertSample((double) num);
                             stats2.InsertSample((double) num2);
                             stats3.InsertSample((double) num3);
                         }
                     }
                     manager.CloseFile();
                 }
                 string path = dir + @"\summary_tunnels.xml";
                 StreamWriter f = new StreamWriter(path);
                 f.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                 f.WriteLine("<tunnels>");
                 f.WriteLine("\t<swVersion name=\"{0}\">", str);
                 this.printCDFHelper(f, s, "Time to Lose One SV");
                 this.printCDFHelper(f, stats2, "Time to Lose All SVs");
                 this.printCDFHelper(f, stats3, "Time to Re-Acquire Signal");
                 f.WriteLine("\t</swVersion>");
                 f.WriteLine("</tunnels>");
                 f.Close();
                 string outputFile = dir + @"\summary_tunnels.html";
                 this.GenerateHTMLReport(path, outputFile, ConfigurationManager.AppSettings["InstalledDirectory"] + @"\scripts\tunnelsReport.xsl");
             }
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, "Error");
     }
 }
Esempio n. 12
0
 public void PseudoRangeError_Summary(string filename)
 {
     int num = 0x20;
     int num2 = 0;
     Stats s = new Stats();
     Stats stats2 = new Stats();
     Stats[] statsArray = new Stats[num];
     Stats[] statsArray2 = new Stats[num];
     string str = "SW Version: Not detected";
     try
     {
         LogManager manager = new LogManager();
         manager.OpenFileRead(filename);
         string str2 = manager.ReadLine();
         for (str2 = manager.ReadLine(); str2 != null; str2 = manager.ReadLine())
         {
             string[] strArray = str2.Split(new char[] { ',' });
             if (strArray.Length >= 8)
             {
                 double num3 = Convert.ToDouble(strArray[7]);
                 int index = Convert.ToInt32(strArray[0]) - 1;
                 if (num3 != -1.0)
                 {
                     s.InsertSample(Math.Abs(num3));
                     if ((index < num) && (index >= 0))
                     {
                         if (statsArray[index] == null)
                         {
                             statsArray[index] = new Stats();
                         }
                         statsArray[index].InsertSample(Math.Abs(num3));
                     }
                 }
                 else
                 {
                     num2++;
                 }
             }
         }
         manager.CloseFile();
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, "Exception while generating PR error report");
     }
     try
     {
         string[] strArray2 = filename.Split(new char[] { '\\' });
         string str3 = "";
         if (strArray2.GetLength(0) > 1)
         {
             for (int k = 0; k < (strArray2.GetLength(0) - 1); k++)
             {
                 str3 = str3 + strArray2[k] + '\\';
             }
         }
         StreamWriter f = new StreamWriter(str3 + @"\summary_PRError.xml");
         f.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
         f.WriteLine("<PseudoRangeError>");
         f.WriteLine("\t<swVersion name=\"{0}\">", str);
         this.printCDFHelper(f, s, "Pseudo Range Error - Overall");
         for (int i = 0; i < num; i++)
         {
             if ((statsArray[i] != null) && (statsArray[i].Samples > 0))
             {
                 this.printCDFHelper(f, statsArray[i], "Pseudo Range Error - Per SV (SV=" + i.ToString() + ")");
             }
         }
         this.printCDFHelper(f, stats2, "Pseudo Range Error - Overall at Tunnel Exit");
         for (int j = 0; j < num; j++)
         {
             if ((statsArray2[j] != null) && (statsArray2[j].Samples > 0))
             {
                 this.printCDFHelper(f, statsArray2[j], "Pseudo Range Error - Per SV at Tunnel Exit (SV=" + j.ToString() + ")");
             }
         }
         f.WriteLine("\t</swVersion>");
         f.WriteLine("</PseudoRangeError>");
         f.Close();
     }
     catch (Exception exception2)
     {
         MessageBox.Show(exception2.Message, "Exception while generating PR error report");
     }
 }
Esempio n. 13
0
 public void PointToPointErrorCalculation(string dataFile, string refFile, double startPoint, double endPoint)
 {
     ArrayList list = this._helperFunctions.ReadIMUFile(dataFile, startPoint, endPoint);
     ArrayList list2 = this._helperFunctions.ReadIMUFile(refFile, startPoint, endPoint);
     Stats stats = new Stats();
     Stats stats2 = new Stats();
     Stats stats3 = new Stats();
     Stats stats4 = new Stats();
     Stats stats5 = new Stats();
     Stats stats6 = new Stats();
     Stats stats7 = new Stats();
     Stats stats8 = new Stats();
     PositionErrorCalc calc = new PositionErrorCalc();
     List<string> list3 = new List<string>();
     string item = string.Empty;
     List<double> positionDataList = new List<double>(8);
     for (int i = 0; i < 8; i++)
     {
         positionDataList.Add(0.0);
     }
     PositionInfo.PositionStruct struct2 = new PositionInfo.PositionStruct();
     PositionInfo.PositionStruct struct3 = new PositionInfo.PositionStruct();
     int num2 = 0;
     int num3 = 0;
     double tOW = 0.0;
     double num5 = 0.0;
     double sample = 0.0;
     double num7 = 0.0;
     double num8 = 0.0;
     double num9 = 0.0;
     double num10 = 0.0;
     double num11 = 0.0;
     double num12 = 0.0;
     int num13 = 0;
     int num14 = 0;
     int num15 = 0;
     int num16 = 0;
     int num17 = 0;
     int num18 = 0;
     int num19 = 0;
     int num20 = 0;
     int num21 = 0;
     string str2 = "Not detected";
     if ((list.Count > 0) && (list2.Count > 0))
     {
         for (num2 = 0; (num2 < list.Count) && (num3 < list2.Count); num2++)
         {
             struct2 = (PositionInfo.PositionStruct) list[num2];
             struct3 = (PositionInfo.PositionStruct) list2[num3];
             if (struct2.SW_Version != string.Empty)
             {
                 str2 = struct2.SW_Version.TrimStart(new char[] { ':' });
             }
             if (struct2.NavType > 0)
             {
                 tOW = struct2.TOW;
                 num5 = struct3.TOW;
                 while (tOW > num5)
                 {
                     num3++;
                     if (num3 >= list2.Count)
                     {
                         break;
                     }
                     struct3 = (PositionInfo.PositionStruct) list2[num3];
                     num5 = struct3.TOW;
                 }
                 if (num8 == 0.0)
                 {
                     num8 = tOW;
                 }
                 num9 = tOW;
                 if (tOW == num5)
                 {
                     positionDataList[0] = struct2.Latitude;
                     positionDataList[1] = struct2.Longitude;
                     positionDataList[2] = struct2.Altitude;
                     positionDataList[3] = struct2.Heading;
                     positionDataList[4] = struct3.Latitude;
                     positionDataList[5] = struct3.Longitude;
                     positionDataList[6] = struct3.Altitude;
                     positionDataList[7] = struct3.Heading;
                     calc.GetPositionErrorsInMeter(positionDataList);
                     sample = calc.HorizontalError;
                     stats.InsertSample(sample);
                     num7 = Math.Abs(calc.VerticalErrorInMeter);
                     stats2.InsertSample(num7);
                     num11 = Math.Abs(calc.AlongTrackErrorInMeter);
                     stats7.InsertSample(num11);
                     num12 = Math.Abs(calc.XTrackErrorInMeter);
                     stats8.InsertSample(num12);
                     num10 = Math.Abs((double) (struct2.Heading - struct3.Heading));
                     if (num10 > 180.0)
                     {
                         num10 = 360.0 - num10;
                     }
                     stats6.InsertSample(num10);
                     stats3.InsertSample(struct2.HDOP);
                     stats4.InsertSample((double) struct2.NumSVInFix);
                     stats5.InsertSample(struct2.MaxCN0);
                     if (sample > 50.0)
                     {
                         num13++;
                         num19++;
                         if (num13 == 4)
                         {
                             num16++;
                         }
                     }
                     else
                     {
                         num13 = 0;
                     }
                     if (sample > 25.0)
                     {
                         num14++;
                         num20++;
                         if (num14 == 4)
                         {
                             num17++;
                         }
                     }
                     else
                     {
                         num14 = 0;
                     }
                     if (sample > 10.0)
                     {
                         num15++;
                         num21++;
                         if (num15 == 4)
                         {
                             num18++;
                         }
                     }
                     else
                     {
                         num15 = 0;
                     }
                     item = string.Format("{0},{1}, {2:F6},{3:F6},{4:F6},{5:F6},{6:F6},{7:F6},{8:F6}, {9:F6}, {10:F2}, {11:F2}, {12:F2}, {13:F2},{14:F2},{15:F2},{16},{17},{18},{19},{20},{21},{22},{23},{24},{25}, {26},{27}", new object[] {
                         tOW, num5, struct2.Latitude, struct2.Longitude, struct2.Altitude, struct3.Latitude, struct3.Longitude, struct3.Altitude, struct2.Heading, struct3.Heading, sample, num7, num12, num11, struct2.HDOP, struct2.NumSVInFix,
                         struct2.MaxCN0, struct2.NavType, num19, num16, num20, num17, num21, num18, num13, num14, num15, num10
                      });
                     list3.Add(item);
                     num3++;
                 }
             }
         }
         if (stats.Samples > 0)
         {
             double percentile = stats.GetPercentile((double) 50.0, -9999.0);
             double num23 = stats.GetPercentile((double) 68.0, -9999.0);
             double num24 = stats.GetPercentile((double) 95.0, -9999.0);
             double num25 = stats.Stats_Max((double) -9999.0);
             stats.Stats_Min((double) -9999.0);
             stats.Stats_Mean((double) -9999.0);
             double num26 = stats2.GetPercentile((double) 50.0, -9999.0);
             double num27 = stats2.GetPercentile((double) 68.0, -9999.0);
             double num28 = stats2.GetPercentile((double) 95.0, -9999.0);
             double num29 = stats2.Stats_Max((double) -9999.0);
             stats2.Stats_Min((double) -9999.0);
             stats2.Stats_Mean((double) -9999.0);
             double num30 = stats8.GetPercentile((double) 50.0, -9999.0);
             double num31 = stats8.GetPercentile((double) 68.0, -9999.0);
             double num32 = stats8.GetPercentile((double) 95.0, -9999.0);
             double num33 = stats8.Stats_Max((double) -9999.0);
             stats8.Stats_Min((double) -9999.0);
             stats8.Stats_Mean((double) -9999.0);
             double num34 = stats7.GetPercentile((double) 50.0, -9999.0);
             double num35 = stats7.GetPercentile((double) 68.0, -9999.0);
             double num36 = stats7.GetPercentile((double) 95.0, -9999.0);
             double num37 = stats7.Stats_Max((double) -9999.0);
             stats7.Stats_Min((double) -9999.0);
             stats7.Stats_Mean((double) -9999.0);
             int samples = stats.Samples;
             double num39 = stats3.Stats_Mean((double) -9999.0);
             double num40 = stats4.Stats_Mean((double) -9999.0);
             double num41 = (((double) samples) / ((num9 - num8) + 1.0)) * 100.0;
             double num42 = stats5.Stats_Mean((double) -9999.0);
             double num43 = stats6.Stats_Max((double) -9999.0);
             stats6.Stats_Min((double) -9999.0);
             stats6.Stats_Mean((double) -9999.0);
             double num44 = stats6.GetPercentile((double) 50.0, -9999.0);
             double num45 = stats6.GetPercentile((double) 68.0, -9999.0);
             double num46 = stats6.GetPercentile((double) 95.0, -9999.0);
             string path = dataFile.Replace(".gps", "_PointToPointAccuracy.csv");
             FileInfo info = new FileInfo(dataFile);
             StreamWriter writer = new StreamWriter(path);
             FileInfo info2 = new FileInfo(refFile);
             writer.WriteLine("IMU file path= {0}", info2.Name);
             writer.WriteLine("Data file path= {0}", info.Name);
             writer.WriteLine("SW Version= {0}", str2);
             writer.WriteLine("MaxCN0 Ave|dBHz= {0:F1}", num42);
             writer.WriteLine("Samples= {0:}", samples);
             writer.WriteLine("Tracking Availability= {0:F1}%", num41);
             writer.WriteLine("HDOP Ave= {0:F1}", num39);
             writer.WriteLine("Satellite Number Ave= {0:F1}", num40);
             writer.WriteLine("Horizontal Error 50% CEP|m= {0:F1}", percentile);
             writer.WriteLine("Horizontal Error 68% CEP|m= {0:F1}", num23);
             writer.WriteLine("Horizontal Error 95% CEP|m= {0:F1}", num24);
             writer.WriteLine("Horizontal Error Max|m= {0:F1}", num25);
             writer.WriteLine("Altitude Error 50% CEP|m= {0:F1}", num26);
             writer.WriteLine("Altitude Error 68% CEP|m= {0:F1}", num27);
             writer.WriteLine("Altitude Error 95% CEP|m= {0:F1}", num28);
             writer.WriteLine("Altitude Error Max|m= {0:F1}", num29);
             writer.WriteLine("Cross Track Error 50% CEP|m= {0:F1}", num30);
             writer.WriteLine("Cross Track Error 68% CEP|m= {0:F1}", num31);
             writer.WriteLine("Cross Track Error 95% CEP|m= {0:F1}", num32);
             writer.WriteLine("Cross Track Error Max|m= {0:F1}", num33);
             writer.WriteLine("Along Track Error 50% CEP|m= {0:F1}", num34);
             writer.WriteLine("Along Track Error 68% CEP|m= {0:F1}", num35);
             writer.WriteLine("Along Track Error 95% CEP|m= {0:F1}", num36);
             writer.WriteLine("Along Track Error Max|m= {0:F1}", num37);
             writer.WriteLine("Exceed50mCount= {0}", num19);
             writer.WriteLine("Exceed50m3sNotPullInCount= {0}", num16);
             writer.WriteLine("Exceed25mCount= {0}", num20);
             writer.WriteLine("Exceed25m3sNotPullInCount= {0}", num17);
             writer.WriteLine("Exceed10mCount= {0}", num21);
             writer.WriteLine("Exceed10m3sNotPullInCount= {0}", num18);
             writer.WriteLine("Heading Error 50% CEP|m= {0:F1}", num44);
             writer.WriteLine("Heading Error 68% CEP|m= {0:F1}", num45);
             writer.WriteLine("Heading Error 95% CEP|m= {0:F1}", num46);
             writer.WriteLine("Heading Error Max|m= {0:F1}", num43);
             writer.WriteLine("End Summary");
             writer.WriteLine("Tow,RefTow,Latitude,Longitude,Altitude,RefLatitude,RefLongitude,RefAltitude,Heading,RefHeading,HzError,AltError,CrossTrackError,AlongTrackError,HDOP,NumSVInFix,MaxCN0,NavType,Exceed50mCount,Exceed50m3sNotPullInCount,Exceed25mCount,Exceed25m3sNotPullInCount,Exceed10mCount,Exceed10m3sNotPullInCount,PullInTime50m,PullInTime25m,ullInTime10m,headingError");
             foreach (string str4 in list3)
             {
                 writer.WriteLine(str4);
             }
             writer.Close();
         }
         list.Clear();
         list2.Clear();
     }
     stats.Dispose();
     stats = null;
     stats2.Dispose();
     stats2 = null;
     stats3.Dispose();
     stats3 = null;
     stats4.Dispose();
     stats4 = null;
     stats5.Dispose();
     stats5 = null;
     stats8.Dispose();
     stats8 = null;
     stats7.Dispose();
     stats7 = null;
     stats6.Dispose();
     stats6 = null;
     calc = null;
     list3.Clear();
     list3 = null;
 }
Esempio n. 14
0
 private void ttfsPlotBtn_Click(object sender, EventArgs e)
 {
     this.ttfsPlotBtn.Enabled = false;
     if (this._CDFPlotWin == null)
     {
         this._CDFPlotWin = new frmCDFPlots();
         this._CDFPlotWin.MdiParent = base.MdiParent;
         this._CDFPlotWin.UpdateStatusToParentWin += new frmCDFPlots.UpdateParentEventHandler(this.updatePlotStatus);
         this._CDFPlotWin.UpdateStatsData += new frmCDFPlots.UpdateParentEventHandler(this.RefreshCDFPlot);
     }
     Stats dataClass = new Stats();
     for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
     {
         try
         {
             dataClass.InsertSample(Convert.ToDouble(this.dataGridView1["TTFS", i].Value.ToString()));
         }
         catch
         {
             this.ttfsPlotBtn.Enabled = true;
         }
     }
     string label = "Time To First Sync";
     if ((dataClass != null) && (dataClass.Samples > 0))
     {
         this._CDFPlotWin.SetPlotData(dataClass, dataClass.Samples, "CDF Plot", label, Color.Blue);
         this._CDFPlotWin.Show();
         this._CDFPlotWin.SetXAxisTitle("Time To First Frame Sync(s)");
     }
 }
Esempio n. 15
0
 private void RefreshCDFPlot()
 {
     if (this._CDFPlotWin != null)
     {
         Stats dataClass = new Stats();
         for (int i = 0; i < this.dataGridView1.Rows.Count; i++)
         {
             try
             {
                 dataClass.InsertSample(Convert.ToDouble(this.dataGridView1["TTFS", i].Value.ToString()));
             }
             catch
             {
             }
         }
         string label = "Time To First Sync";
         if ((dataClass != null) && (dataClass.Samples > 0))
         {
             this._CDFPlotWin.SetPlotData(dataClass, dataClass.Samples, "CDF Plot", label, Color.Blue);
             this._CDFPlotWin.RefreshPlot();
             this._CDFPlotWin.SetXAxisTitle("Time To First Frame Sync(s)");
         }
     }
 }