//Запис висот геоїда і аномалій для сітки в текстовий файл public static void writeGeoidHeightsAndAnomalysToTxt(List <double[]> greed, double[] heights, double[] anomalies, ReferenceSystem rs, string file) { System.IO.TextWriter w = new System.IO.StreamWriter(file, false); for (int i = 0; i < greed.Count; i++) { w.WriteLine(string.Format("{0} {1} {2,10:0.0000} {3,10:0.0000}", MathFunc.rad2deg(MathFunc.convertThethaToB(greed[i][0], rs)), MathFunc.rad2deg(greed[i][1]), heights[i], anomalies[i])); } w.Close(); }
//Записує усереднені градієнти для кожної клітинки сітки public static void writeGreedToCsvFileWithMeasureS(List <double[]> greed, double[] data, string file) { System.IO.TextWriter tw = new System.IO.StreamWriter(file, false); int i = 0; foreach (var item in greed) { tw.WriteLine("{2:0.000};{1:0.000};{0}", data[i], MathFunc.rad2deg((Math.PI / 2D) - item[0]), MathFunc.rad2deg(item[1] - Math.PI)); i++; } tw.Flush(); tw.Close(); }
//Записує кількість вимірів для кожної клітинки сітки public static void writeGreedToCsvFileWithMeasureCount(List <double[]> greed, List <int>[] map, string file) { System.IO.TextWriter tw = new System.IO.StreamWriter(file, false); int i = 0; int ii = 0; foreach (var item in greed) { if (item[1] > Math.PI) { ii++; } ; tw.WriteLine("{2:0.000};{1:0.000};{0}", map[i].Count, MathFunc.rad2deg((Math.PI / 2D) - item[0]), MathFunc.rad2deg(item[1] - Math.PI)); i++; } tw.Flush(); tw.Close(); }