Browse Source

修改低轨双星GDOP

wyq 1 year ago
parent
commit
07e94d2344

+ 61 - 31
Common/ExtensionsDev/MapControlEx.cs

@@ -1382,26 +1382,6 @@ public static class MapControlEx
         };
         return ctrl;
     }
-    public static void Drea(this MapControl ctrl, double Lat,double Lon)
-    {
-        var innerData = ctrl.Tag as InnerData;
-        var mapItem = new MapDot()
-        {
-            Stroke = Color.FromArgb(128, 255, 93, 106),
-            ToolTipPattern = "天线",
-            EnableHighlighting = DefaultBoolean.True,
-            EnableSelection = DefaultBoolean.False,
-            CanMove = false,
-            Visible = true,
-            IsHitTestVisible = true,
-            Fill = Color.FromArgb(128, 255, 93, 106),
-            Size = 400,
-            Tag = "天线",           
-            Location = new GeoPoint(Lat, Lon),
-            StrokeWidth = 1,
-        };
-        innerData.posStorge.Items.Add(mapItem);
-    }
     public static void DrawEllipse(this MapControl ctrl, double lat, double lon, int radius)
     {
         var innerData = ctrl.Tag as InnerData;
@@ -1442,15 +1422,15 @@ public static class MapControlEx
             //Dialog.Error(ex);
         }
     }
-        /// <summary>
-        /// 绘制矩形
-        /// </summary>
-        /// <param name="ctrl"></param>
-        /// <param name="startLon"></param>
-        /// <param name="startLat"></param>
-        /// <param name="endLon"></param>
-        /// <param name="endLat"></param>
-        public static void DrawRect(this MapControl ctrl, double startLon, double startLat, double endLon, double endLat, bool recCallback = false)
+    /// <summary>
+    /// 绘制矩形
+    /// </summary>
+    /// <param name="ctrl"></param>
+    /// <param name="startLon"></param>
+    /// <param name="startLat"></param>
+    /// <param name="endLon"></param>
+    /// <param name="endLat"></param>
+    public static void DrawRect(this MapControl ctrl, double startLon, double startLat, double endLon, double endLat, bool recCallback = false)
     {
         var innerData = ctrl.Tag as InnerData;
         if (innerData.rangeItem != null)
@@ -1514,6 +1494,56 @@ public static class MapControlEx
         if (!polyLine.Points.Any()) return;
         innerData.mMapStorage.Items.Add(polyLine);
     }
+
+    public static void DrawGdopLineTwo(this MapControl ctrl, string wcKm, IEnumerable<(double lon, double lat)> dots)
+    {
+        if (dots == null || !dots.Any()) return;
+        var innerData = ctrl.Tag as InnerData;
+
+        //多条线 两个点绘制一个线段 1和2一个线段 3和4一个线段
+        List<MapPolyline> polylines = new List<MapPolyline>();
+        int index = 0;
+        int count = dots.Count();
+        int patterncount = dots.Count() / 2;
+
+        MapPolyline polyLine = null;
+        foreach (var item in dots)
+        {
+            if (index % 2 == 0)
+            {
+                if (polyLine != null)//添加线段
+                {
+                    polylines.Add(polyLine);
+                }
+                polyLine = new MapPolyline()
+                {
+                    Stroke = ColorHelper.GetColor(wcKm),
+                    StrokeWidth = 2,
+                    IsGeodesic = true,
+                    CanResize = false,
+                    CanEdit = false,
+                    CanRotate = false,
+                    IsHitTestVisible = true,
+                    CanMove = false,
+                    Tag = $"DrawGdopLine_{wcKm}",
+                };
+
+            }
+            polyLine.Points.Add(new GeoPoint(item.lat, item.lon));
+            index++;
+            if (index == count)//添加最后一个线段
+            {
+                polylines.Add(polyLine);
+            }
+            if (patterncount == index)//提示公里信息
+            {
+                polyLine.TitleOptions.Pattern = wcKm;
+            }
+        }
+        if (!polyLine.Points.Any()) return;
+        innerData.mMapStorage.Items.AddRange(polylines);
+
+    }
     public static void DrawDtoLine(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines)
     {
         if (lines == null || !lines.Any()) return;
@@ -2379,8 +2409,8 @@ public static class MapControlEx
             Ed = Ec * Math.Cos(m_RadLa);
         }
     }
-        #region ImageLayer数据源接口实现(本地和Http接口)
-        class ImageTileSource : IImageTileSource
+    #region ImageLayer数据源接口实现(本地和Http接口)
+    class ImageTileSource : IImageTileSource
     {
         SQLiteConnection con;
         public ImageTileSource()

BIN
XzDw.App/Api/星地GDOP误差椭圆/GDOP/GDOP_Analysis.dll


BIN
XzDw.App/Api/星地GDOP误差椭圆/GDOP/GDOP_Draw.dll


BIN
XzDw.App/Api/星地GDOP误差椭圆/GDOP/Tle2XYZ.dll


+ 118 - 0
XzDw.App/Api/星地GDOP误差椭圆/GdopConfig.cs

@@ -0,0 +1,118 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace XzXdDw.App.Api.星地GDOP误差椭圆
+{
+    
+    /// <summary>
+    /// 误差分布参数
+    /// </summary>
+    public class GdopParam
+    {
+        private static GdopParam _误差配置 = new GdopParam();
+
+        public static GdopParam 误差配置
+        {
+            get { return GdopParam._误差配置; }
+            set { GdopParam._误差配置 = value; }
+        }
+
+        private double[] _误差距离km = new double[]
+                    { 10
+                    , 20
+                    , 30
+                    , 40
+                    , 60
+                    , 80
+                    , 100
+                    , 200
+                    , 300
+                    , 400
+                    , 600
+                    , 800
+                    , 1000
+                    , 2000
+                    , 3000
+                    , 4000
+                    , 6000
+                    , 8000
+                    , 10000
+                    , 20000
+                    //, 30000
+                    //, 40000
+                    };
+
+        public double[] 误差距离km
+        {
+            get { return _误差距离km; }
+            set { _误差距离km = value; }
+        }
+
+        public double[] 误差距离m
+        {
+            get
+            {
+                if (_误差距离km == null)
+                {
+                    return null;
+                }
+                else
+                {
+                    double[] distance = new double[_误差距离km.Length];
+                    for (int i = 0; i < _误差距离km.Length; i++)
+                    {
+                        distance[i] = _误差距离km[i] * 1e3;
+                    }
+                    return distance;
+                }
+            }
+        }
+
+        private double[] _小误差距离km = new double[]
+             {
+                      1
+                    , 2
+                    , 3
+                    , 4
+                    , 6
+                    , 8
+                    , 10
+                    , 20
+                    , 30
+                    , 40
+                    , 60
+                    , 80
+                    , 100
+                    , 200
+                    , 300
+                    , 400
+                    , 600
+                    , 800
+                    , 1000
+                    , 2000
+                 //, 30000
+                 //, 40000
+             };
+        public double[] 小误差距离m
+        {
+            get
+            {
+                if (_小误差距离km == null)
+                {
+                    return null;
+                }
+                else
+                {
+                    double[] distance = new double[_小误差距离km.Length];
+                    for (int i = 0; i < _小误差距离km.Length; i++)
+                    {
+                        distance[i] = _小误差距离km[i] * 1e3;
+                    }
+                    return distance;
+                }
+            }
+        }
+    }
+}

+ 92 - 471
XzDw.App/Api/星地GDOP误差椭圆/GdopHelper.cs

@@ -4,9 +4,11 @@ using DevExpress.XtraPrinting;
 using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
+using System.Data.Entity.Core.Common.EntitySql;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Runtime.InteropServices;
 using System.Text;
 using System.Threading.Tasks;
 using XdCxRhDW.App.DTO;
@@ -24,350 +26,72 @@ namespace XzXdDw.App.Api.星地GDOP误差椭圆
         private static string exePath = "Api\\星地GDOP误差椭圆\\GDOP";
         private const string exeName = "GdopCore.exe";
 
-        /// <summary>
-        /// 三星双时差GDOP误差分布带参
-        /// </summary>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainSatTle">主星双行根数</param>
-        /// <param name="adja1SatTle">邻1星双行根数</param>
-        /// <param name="adja2SatTle">邻2星双行根数</param>
-        /// <param name="time">采集时刻</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop3Sat2DtoRef(double[] refLonLat, string mainSatTle, string adja1SatTle, string adja2SatTle, DateTime time, double dtousErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"60 \"{mainSatTle}\" \"{adja1SatTle}\" \"{adja2SatTle}\" \"{time:yyyy-MM-dd HH:mm:ss.000000}\" {string.Join(" ", refLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(3, sb.ToString());
-        }
-
-        /// <summary>
-        /// 三星双时差GDOP误差分布带参
-        /// </summary>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainSatEph">主星xyz星历,数组长度=3</param>
-        /// <param name="adja1SatEph">邻1星xyz星历,数组长度=3</param>
-        /// <param name="adja2SatEph">邻2星xyz星历,数组长度=3</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        /// <exception cref="Exception"></exception>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop3Sat2DtoRef(double[] refLonLat, double[] mainSatEph, double[] adja1SatEph, double[] adja2SatEph, double dtousErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"61 {string.Join(" ", mainSatEph)} {string.Join(" ", adja1SatEph)} {string.Join(" ", adja2SatEph)} {string.Join(" ", refLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(3, sb.ToString());
-        }
-
-        /// <summary>
-        /// 三星双时差GDOP误差分布无参
-        /// </summary>
-        /// <param name="recLonLat">接收站经纬度,数组长度=2</param>
-        /// <param name="mainSatTle">主星双行根数</param>
-        /// <param name="adja1SatTle">邻1星双行根数</param>
-        /// <param name="adja2SatTle">邻2星双行根数</param>
-        /// <param name="time">采集时刻</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop3Sat2Dto(double[] recLonLat, string mainSatTle, string adja1SatTle, string adja2SatTle, DateTime time, double dtousErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"62 \"{mainSatTle}\" \"{adja1SatTle}\" \"{adja2SatTle}\" \"{time:yyyy-MM-dd HH:mm:ss.000000}\" {string.Join(" ", recLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(3, sb.ToString());
-        }
-
-        /// <summary>
-        /// 三星双时差GDOP误差分布无参
-        /// </summary>
-        /// <param name="recLonLat">接收站经纬度,数组长度=2</param>
-        /// <param name="mainSatEph">主星xyz星历,数组长度=3</param>
-        /// <param name="adja1SatEph">邻1星xyz星历,数组长度=3</param>
-        /// <param name="adja2SatEph">邻2星xyz星历,数组长度=3</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        /// <exception cref="Exception"></exception>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop3Sat2Dto(double[] recLonLat, double[] mainSatEph, double[] adja1SatEph, double[] adja2SatEph, double dtousErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"63 {string.Join(" ", mainSatEph)} {string.Join(" ", adja1SatEph)} {string.Join(" ", adja2SatEph)} {string.Join(" ", recLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(3, sb.ToString());
-        }
-
-
-        /// <summary>
-        /// 双星时频差GDOP误差分布带参
-        /// </summary>
-        /// <param name="tarFreqUpMHz">目标上行频点MHz</param>
-        /// <param name="refFreqUpMHz">参考上行频点MHz</param>
-        /// <param name="mainSatTransMHz">主星转发器本振MHz</param>
-        /// <param name="adjaSatTransMHz">邻星转发器本振MHz</param>
-        /// <param name="recLonLat">接收站经纬度,数组长度=2</param>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainTle">主星双行根数</param>
-        /// <param name="adjaTle">邻星双行根数</param>
-        /// <param name="time">采集时刻</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="dfoHzErr">频差误差(单位Hz)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop2SatDtoDfoRef(double tarFreqUpMHz, double refFreqUpMHz, double mainSatTransMHz, double adjaSatTransMHz, double[] recLonLat, double[] refLonLat, string mainTle, string adjaTle, DateTime time, double dtousErr = 1, double dfoHzErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"64 \"{mainTle}\" \"{adjaTle}\" \"{time:yyyy-MM-dd HH:mm:ss.000000}\" {string.Join(" ", recLonLat)} {string.Join(" ", refLonLat)} {tarFreqUpMHz} {refFreqUpMHz} {mainSatTransMHz} {adjaSatTransMHz} {dtousErr} {dfoHzErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(2, sb.ToString());
-        }
+        private const string GDOPDll = @"Api\星地GDOP误差椭圆\GDOP\GDOP_Draw.dll";
 
-        /// <summary>
-        /// 双星时频差GDOP误差分布带参
-        /// </summary>
-        /// <param name="tarFreqUpMHz">目标上行频点MHz</param>
-        /// <param name="refFreqUpMHz">参考上行频点MHz</param>
-        /// <param name="mainSatTransMHz">主星转发器本振MHz</param>
-        /// <param name="adjaSatTransMHz">邻星转发器本振MHz</param>
-        /// <param name="recLonLat">接收站经纬度,数组长度=2</param>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainSatEph">主星星历xyz vx vy vz,数组长度=6</param>
-        /// <param name="adjaSatEph">邻星星历xyz vx vy vz,数组长度=6</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="dfoHzErr">频差误差(单位Hz)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
+        static readonly DateTime dtZero = new DateTime(1970, 1, 1, 8, 0, 0, 0);
         /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop2SatDtoDfoRef(double tarFreqUpMHz, double refFreqUpMHz, double mainSatTransMHz, double adjaSatTransMHz, double[] recLonLat, double[] refLonLat, double[] mainSatEph, double[] adjaSatEph, double dtousErr = 1, double dfoHzErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"65 {string.Join(" ", mainSatEph)} {string.Join(" ", adjaSatEph)} {string.Join(" ", recLonLat)} {string.Join(" ", refLonLat)} {tarFreqUpMHz} {refFreqUpMHz} {mainSatTransMHz} {adjaSatTransMHz} {dtousErr} {dfoHzErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(2, sb.ToString());
-        }
+        [DllImport(GDOPDll, CallingConvention = CallingConvention.Cdecl)]
+        public static extern int GdopLeoTowSatDRef(string mainLines, string adajLines, Int64 captime, double[] refPos
+        , double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr
+        , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
-        /// <summary>
-        /// 双星时频差GDOP误差分布无参
-        /// </summary>
-        /// <param name="tarFreqUpMHz">目标上行频点MHz</param>
-        /// <param name="refFreqUpMHz">参考上行频点MHz</param>
-        /// <param name="mainSatTransMHz">主星转发器本振MHz</param>
-        /// <param name="adjaSatTransMHz">邻星转发器本振MHz</param>
-        /// <param name="recLonLat">接收站经纬度,数组长度=2</param>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainTle">主星双行根数</param>
-        /// <param name="adjaTle">邻星双行根数</param>
-        /// <param name="time">采集时刻</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="dfoHzErr">频差误差(单位Hz)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop2SatDtoDfo(double tarFreqUpMHz, double mainSatTransMHz, double adjaSatTransMHz, double[] recLonLat, string mainTle, string adjaTle, DateTime time, double dtousErr = 1, double dfoHzErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"66 \"{mainTle}\" \"{adjaTle}\" \"{time:yyyy-MM-dd HH:mm:ss.000000}\" {string.Join(" ", recLonLat)} {tarFreqUpMHz} {mainSatTransMHz} {adjaSatTransMHz} {dtousErr} {dfoHzErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(2, sb.ToString());
-        }
+        [DllImport(GDOPDll, CallingConvention = CallingConvention.Cdecl)]
+        public static extern void FreeGDOPBuf(IntPtr val);
 
         /// <summary>
-        /// 双星时频差GDOP误差分布无参
+        /// 低轨双星GDOP
         /// </summary>
-        /// <param name="tarFreqUpMHz">目标上行频点MHz</param>
-        /// <param name="refFreqUpMHz">参考上行频点MHz</param>
-        /// <param name="mainSatTransMHz">主星转发器本振MHz</param>
-        /// <param name="adjaSatTransMHz">邻星转发器本振MHz</param>
-        /// <param name="recLonLat">接收站经纬度,数组长度=2</param>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainSatEph">主星星历xyz vx vy vz,数组长度=6</param>
-        /// <param name="adjaSatEph">邻星星历xyz vx vy vz,数组长度=6</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="dfoHzErr">频差误差(单位Hz)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop2SatDtoDfo(double tarFreqUpMHz, double mainSatTransMHz, double adjaSatTransMHz, double[] recLonLat, double[] mainSatEph, double[] adjaSatEph, double dtousErr = 1, double dfoHzErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"67 {string.Join(" ", mainSatEph)} {string.Join(" ", adjaSatEph)} {string.Join(" ", recLonLat)} {tarFreqUpMHz} {mainSatTransMHz} {adjaSatTransMHz} {dtousErr} {dfoHzErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(2, sb.ToString());
-        }
+        /// <param name="mainLines">主星星历</param>
+        /// <param name="adajLines">邻星星历</param>
+        /// <param name="captime">采集时间</param>
+        /// <param name="refPos">参考站位置 长度3</param>
+        /// <param name="fuHz1">目标上行频点 Hz</param>
+        /// <param name="fuHz2">参考上行频点 Hz</param>
+        /// <param name="dtousErr">时差误差</param>
+        /// <param name="dfoHzErr">频差误差</param>
+        /// <param name="ephLocErr">星历位置误差</param>
+        /// <param name="ephVLocErr">星历速度误差</param>
+        /// <param name="level"></param>
+        /// <param name="satllh"></param>
+        /// <param name="points"></param>
+        public static (List<SatInfo>, List<ErrDistanceMapPoints>) GdopLeoTowSatDRef(string mainLines, string adajLines, DateTime captime, double[] refPos
+        , double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr)
+        {
+            int satCount = 2;
+            //该值和points 一一对应
+            double[] level = GdopParam.误差配置.小误差距离m;
+            double[] satllh = new double[satCount*3];
+            var timeSpan = (long)(captime - dtZero).TotalSeconds;
+            IntPtr res = IntPtr.Zero;
+            int[] resCount = new int[level.Length];
+            GdopLeoTowSatDRef(mainLines, adajLines, timeSpan, refPos
+                , fuHz1, fuHz2, dtousErr, dfoHzErr, ephLocErr, ephVLocErr, level, level.Length, resCount, out res, satllh);
+
+            IntPtr tmp = res;
+
+            //用于绘制的数据
+            List<double[]> points = new List<double[]>();
+            for (int idx = 0; idx < level.Length; ++idx)
+            {
+                double[] levelval = new double[resCount[idx]];
+                Marshal.Copy(tmp, levelval, 0, resCount[idx]);
+                tmp += (resCount[idx] * sizeof(double));
+                points.Add(levelval);
+            }
+            FreeGDOPBuf(res);
 
-        /// <summary>
-        /// 两星一地GDOP带参
-        /// </summary>
-        /// <param name="cdbLonLat">超短波天线经纬度,数组长度=2</param>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainTle">主星双行根数</param>
-        /// <param name="adjaTle">邻星双行根数</param>
-        /// <param name="time">采集时刻</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop2Sat1DRef(double[] cdbLonLat, double[] refLonLat, string mainTle, string adjaTle, DateTime time, double dtousErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"68 \"{mainTle}\" \"{adjaTle}\" \"{time:yyyy-MM-dd HH:mm:ss.000000}\" {string.Join(" ", cdbLonLat)} {string.Join(" ", refLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(2, sb.ToString());
+            List<SatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines);
+            List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
+            for (int i = 0; i < points.Count; i++)
+            {
+                ErrDistanceMapPoints errDistanceMap = new ErrDistanceMapPoints();
+                errDistanceMap.ErrDistance = level[i];
+                errDistanceMap.MapDots.AddRange(ParseResult(points[i]));
+                errs.Add(errDistanceMap);
+            }
+            return (satInfos, errs);
         }
 
-
         /// <summary>
         /// 低轨两星GDOP
         /// </summary>
@@ -383,7 +107,7 @@ namespace XzXdDw.App.Api.星地GDOP误差椭圆
         /// <param name="fu2">邻星上行频点</param>
         /// <returns></returns>
         /// <exception cref="Exception"></exception>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) GdopLeoTowSatDRef( double[] refLonLat, string mainTle, string adjaTle, DateTime time, double dtousErr,double dfoHzErr, double ephLocErr,double ephVLocErr,double fuHz1,double fuHz2)
+        public static (List<SatInfo>, List<ErrDistanceMapLines>) GdopLeoTowSatDRef(double[] refLonLat, string mainTle, string adjaTle, DateTime time, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr, double fuHz1, double fuHz2)
         {
             if (string.IsNullOrWhiteSpace(exePath))
                 throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
@@ -446,147 +170,44 @@ namespace XzXdDw.App.Api.星地GDOP误差椭圆
             return ParseResult(1, sb.ToString());
         }
 
-
-        /// <summary>
-        /// 两星一地GDOP带参
-        /// </summary>
-        /// <param name="cdbLonLat">超短波天线经纬度,数组长度=2</param>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainSatEph">主星星历xyz,数组长度=3</param>
-        /// <param name="adjaSatEph">邻星星历xyz,数组长度=3</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop2Sat1DRef(double[] cdbLonLat, double[] refLonLat, double[] mainSatEph, double[] adjaSatEph, double dtousErr = 1, double satLocErr = 10000)
+        private static List<MapDot> ParseResult(double[] ponits)
         {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"69 {string.Join(" ", mainSatEph)} {string.Join(" ", adjaSatEph)} {string.Join(" ", cdbLonLat)} {string.Join(" ", refLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(2, sb.ToString());
-        }
+            List<MapDot> mapDots = new List<MapDot>();
+            int count = 2;
+            for (int i = 0; i < ponits.Length / count; i++)
+            {
+                MapDot mapDot = new MapDot();
+                mapDot.Lat = ponits[count * i + 1];
+                mapDot.Lon = ponits[count * i];
+                mapDots.Add(mapDot);
+               
+            }
+            return mapDots;
 
-        /// <summary>
-        /// 一星两地GDOP带参
-        /// </summary>
-        /// <param name="cdb1LonLat">超短波阵地1天线经纬度,数组长度=2</param>
-        /// <param name="cdb2LonLat">超短波阵地2天线经纬度,数组长度=2</param>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainTle">主星双行根数</param>
-        /// <param name="time">采集时刻</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop1Sat2DRef(double[] cdb1LonLat, double[] cdb2LonLat, double[] refLonLat, string mainTle, DateTime time, double dtousErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"70 \"{mainTle}\" \"{time:yyyy-MM-dd HH:mm:ss.000000}\" {string.Join(" ", cdb1LonLat)} {string.Join(" ", cdb2LonLat)} {string.Join(" ", refLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(1, sb.ToString());
-        }
-        /// <summary>
-        /// 一星两地GDOP带参
-        /// </summary>
-        /// <param name="cdb1LonLat">超短波阵地1天线经纬度,数组长度=2</param>
-        /// <param name="cdb2LonLat">超短波阵地2天线经纬度,数组长度=2</param>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainSatEph">主星星历xyz,数组长度=3</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop1Sat2DRef(double[] cdb1LonLat, double[] cdb2LonLat, double[] refLonLat, double[] mainSatEph, double dtousErr = 1, double satLocErr = 10000)
-        {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"71 {string.Join(" ", mainSatEph)} {string.Join(" ", cdb1LonLat)} {string.Join(" ", cdb2LonLat)} {string.Join(" ", refLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(1, sb.ToString());
         }
 
-        /// <summary>
-        /// 高低轨两高一低GDOP带参
-        /// </summary>
-        /// <param name="refLonLat">参考站经纬度,数组长度=2</param>
-        /// <param name="mainSatEph">主星星历xyz,数组长度=3</param>
-        /// <param name="adjaSatEph">邻星星历xyz,数组长度=3</param>
-        /// <param name="lowSatEph">低轨卫星星历xyz,数组长度=3</param>
-        /// <param name="time">采集时刻</param>
-        /// <param name="dtousErr">时差误差(单位us)</param>
-        /// <param name="satLocErr">星历位置误差(单位米)</param>
-        /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapLines>) Gdop3Sat2High1LowRef(double[] refLonLat, double[] mainSatEph, double[] adjaSatEph, double[] lowSatEph, double dtousErr = 1, double satLocErr = 10000)
+
+        private static List<SatInfo> ParseResult(int satCount, double[] satllh, params string[] ephLine)
         {
-            if (string.IsNullOrWhiteSpace(exePath))
-                throw new Exception($"请先调用SetExePath指定{exeName}进程所在路径,支持相对路径");
-            if (!Directory.Exists(exePath))
-                throw new Exception($"路径[{exePath}]不存在");
-            var exeFile = Path.Combine(exePath, exeName);
-            if (!File.Exists(exeFile))
-                throw new Exception($"文件[{exeFile}]不存在");
-            Process p = new Process();
-            p.StartInfo.WorkingDirectory = exePath;
-            p.StartInfo.FileName = exeFile;
-            p.StartInfo.Arguments = $"72 {string.Join(" ", mainSatEph)} {string.Join(" ", adjaSatEph)} {string.Join(" ", lowSatEph)} {string.Join(" ", refLonLat)} {dtousErr} {satLocErr}";
-            p.StartInfo.CreateNoWindow = true;
-            p.StartInfo.RedirectStandardError = true;
-            p.StartInfo.RedirectStandardOutput = true;
-            p.StartInfo.UseShellExecute = false;
-            StringBuilder sb = new StringBuilder();
-            p.OutputDataReceived += (sender, e) => sb.Append(e.Data);
-            p.Start();
-            p.BeginOutputReadLine();
-            p.WaitForExit();//WaitForExit加了超时时间的话进程退出后不能保证异步流已经读取完成,这是.NET框架的BUG
-            return ParseResult(3, sb.ToString());
+
+            List<SatInfo> list = new List<SatInfo>();
+            int len = 3;
+            for (int i = 0; i < satCount; i++)
+            {
+                SatInfo satInfo = new SatInfo();
+                var ephstrs = ephLine[i].Split(new string[] { " ", "U" }, StringSplitOptions.RemoveEmptyEntries);
+                if (ephstrs.Length == 16)
+                {
+                    satInfo.SatCode = Convert.ToInt32(ephstrs[1]);
+                }
+                satInfo.SatLon = Convert.ToDouble(satllh[len * i]);
+                satInfo.SatLat = Convert.ToDouble(satllh[len * i + 1]);
+                list.Add(satInfo);
+            }
+
+            return list;
         }
+
         private static (List<SatInfo>, List<ErrDistanceMapLines>) ParseResult(int satCount, string txt)
         {
             if (string.IsNullOrWhiteSpace(txt))

+ 2 - 2
XzDw.App/Api/星地GDOP误差椭圆/readme.txt

@@ -1,3 +1,3 @@
-GDOP -> ok
-误差椭圆 -> 你问问罗博士或黎强有没有算法,我这里用的高轨双星的GDOP
+GDOP -> 记得注册机器码
+
 

+ 7 - 0
XzDw.App/DTO/MapItem.cs

@@ -44,6 +44,13 @@ namespace XdCxRhDW.App.DTO
         public string ErrDistanceKm => $"{ErrDistance / 1e3}km";
         public List<MapLine> MapLines { get; set; } = new List<MapLine>();
     }
+
+    public class ErrDistanceMapPoints
+    {
+        public double ErrDistance { get; set; }//单位m
+        public string ErrDistanceKm => $"{ErrDistance / 1e3}km";
+        public List<MapDot> MapDots { get; set; } = new List<MapDot>();
+    }
     public class SatInfo
     {
         public int? SatCode { get; set; }

+ 13 - 14
XzDw.App/UserControl/XZGDOPParam .cs

@@ -1,6 +1,8 @@
-using DevExpress.Mvvm.ModuleInjection.Native;
+using DevExpress.ClipboardSource.SpreadsheetML;
+using DevExpress.Mvvm.ModuleInjection.Native;
 using DevExpress.XtraEditors;
 using DevExpress.XtraMap;
+using DevExpress.XtraTreeList.Data;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -8,6 +10,7 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -59,9 +62,11 @@ namespace XdCxRhDW.App.UserControl
 
         private void btnOK_Click(object sender, EventArgs e)
         {
+            
             mapControl1.ClearMap();
-            var (listSat, data) = GdopHelper.GdopLeoTowSatDRef(
-                             new double[] { Model.RefLon, Model.RefLat }, Model.TleLeo1, Model.TleLeo2, Model.CapTime, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.fu1, Model.fu2);
+           
+            var (listSat, data) = GdopHelper.GdopLeoTowSatDRef(Model.TleLeo1, Model.TleLeo2, Model.CapTime, new double[] { Model.RefLon, Model.RefLat,0 }, Model.fu1, Model.fu2, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr);
+
             if (data == null)
             {
                 return;
@@ -80,18 +85,12 @@ namespace XdCxRhDW.App.UserControl
             }
             foreach (var errLins in data)//画GDOP
             {
-                errLins.ErrDistance = errLins.ErrDistance / 10;
-                foreach (var line in errLins.MapLines)
-                {
-                    
-                    var newLine = SampleDots(line);
-                    mapControl1.Invoke(new Action(() =>
-                    {
-                        var mapLines = newLine.Line.Select(p => (errLins.ErrDistanceKm, p.Lon, p.Lat));
-                        mapControl1.DrawGdopLine(mapLines);
-                    }));
-                }
+                var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
+                mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots);
             }
+            
+          
+
         }
         public XdCxRhDW.App.DTO.MapLine SampleDots(XdCxRhDW.App.DTO.MapLine line)
         {

+ 10 - 0
XzDw.App/XzDw.App.csproj

@@ -153,6 +153,7 @@
     <Compile Include="Api\时差线\OutputHelper.cs" />
     <Compile Include="Api\星历推算\Tle2XYZ.cs" />
     <Compile Include="Api\星地GDOP误差椭圆\ErrEllipseHelper.cs" />
+    <Compile Include="Api\星地GDOP误差椭圆\GdopConfig.cs" />
     <Compile Include="Api\星地GDOP误差椭圆\GdopHelper.cs" />
     <Compile Include="DTO\MapItem.cs" />
     <Compile Include="EditForms\SimulationEditor.cs">
@@ -457,6 +458,15 @@
     <Content Include="Api\星地GDOP误差椭圆\GDOP\DLL_GD32.dll">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="Api\星地GDOP误差椭圆\GDOP\GDOP_Analysis.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Api\星地GDOP误差椭圆\GDOP\GDOP_Draw.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Api\星地GDOP误差椭圆\GDOP\Tle2XYZ.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="Api\星地GDOP误差椭圆\GDOP\星历推算\readme.txt">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>