Browse Source

添加星地时差线

wyq 1 year ago
parent
commit
162216ec76
34 changed files with 2129 additions and 69 deletions
  1. 84 0
      XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/GDOP.h
  2. BIN
      XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/GDOP_Analysis.dll
  3. BIN
      XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/GDOP_Draw.dll
  4. BIN
      XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/Tle2XYZ.dll
  5. 1 0
      XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/args.txt
  6. 118 0
      XdCxRhDW.App/Api/GDOP误差椭圆/GdopConfig.cs
  7. 104 0
      XdCxRhDW.App/Api/GDOP误差椭圆/GdopHelper.cs
  8. 45 0
      XdCxRhDW.App/Api/GDOP误差椭圆/MapItem.cs
  9. 3 0
      XdCxRhDW.App/Api/GDOP误差椭圆/readme.txt
  10. 19 0
      XdCxRhDW.App/Api/PosApi.cs
  11. BIN
      XdCxRhDW.App/Api/时差线/DLL_LHDW32.dll
  12. 205 0
      XdCxRhDW.App/Api/时差线/DrawDtoLineHelper.cs
  13. 145 0
      XdCxRhDW.App/Api/时差线/DtoLineModel.cs
  14. BIN
      XdCxRhDW.App/Api/时差线/Newtonsoft.Json.dll
  15. 130 0
      XdCxRhDW.App/Api/时差线/OutputHelper.cs
  16. BIN
      XdCxRhDW.App/Api/时差线/Positioning.dll
  17. 49 0
      XdCxRhDW.App/Api/时差线/Positioning.h
  18. BIN
      XdCxRhDW.App/Api/时差线/XingDiSCX.exe
  19. BIN
      XdCxRhDW.App/Api/时差线/msvcp100.dll
  20. BIN
      XdCxRhDW.App/Api/时差线/msvcr100.dll
  21. 29 1
      XdCxRhDW.App/ExtensionsDev/GridControlEx.cs
  22. 31 0
      XdCxRhDW.App/ExtensionsDev/MapControlEx.cs
  23. 29 0
      XdCxRhDW.App/Image/DfoLine.svg
  24. 20 0
      XdCxRhDW.App/Image/DtoLine.svg
  25. 33 0
      XdCxRhDW.App/Image/GDOP.svg
  26. 0 3
      XdCxRhDW.App/Properties/licenses.licx.bak
  27. 79 34
      XdCxRhDW.App/UserControl/CtrlHome.Designer.cs
  28. 153 1
      XdCxRhDW.App/UserControl/CtrlHome.cs
  29. 21 3
      XdCxRhDW.App/UserControl/CtrlHome.resx
  30. 468 0
      XdCxRhDW.App/UserControl/X2D1GDOPParam.Designer.cs
  31. 173 0
      XdCxRhDW.App/UserControl/X2D1GDOPParam.cs
  32. 120 0
      XdCxRhDW.App/UserControl/X2D1GDOPParam.resx
  33. 12 27
      XdCxRhDW.App/WebAPI/Controllers/DetectCgController.cs
  34. 58 0
      XdCxRhDW.App/XdCxRhDW.App.csproj

+ 84 - 0
XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/GDOP.h

@@ -0,0 +1,84 @@
+#pragma once
+
+#ifdef _WIN32
+# if defined(GDOP_LIB)
+#  define GDOP_EXPORT __declspec(dllexport)
+# else
+#  define GDOP_EXPORT __declspec(dllimport)
+# endif
+#else
+#  define GDOP_EXPORT
+#endif
+
+extern "C"
+{
+	///
+	/// 获取低轨双星GDOP
+	/// mainLines :主星历双行
+	/// adajLines :邻星历双行 
+	/// captime:信号时间
+	/// refPos: 参考经度,纬度
+	/// fuHz1: 主上行
+	/// fuHz2: 邻上行
+	/// dtousErr: 时差误差
+	/// dfoHzErr: 频差误差
+	/// ephLocErr: 星历位置误差
+	/// ephVLocErr: 星历速度误差
+	/// level: gdop输出等级
+	/// levlen:level 长度
+	/// resCount:每一级的数据个数
+	/// res :数据
+	/// satllh :卫星位置
+	/// 返回值:0 成功
+	///
+	GDOP_EXPORT int GdopLeoTowSatDRef(char *mainLines, char *adajLines, long long captime, double *refPos
+		, double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr
+		, double *level, int levlen, int *resCount, double **res, double *satllh);
+
+	///
+	/// 获取低轨单星GDOP
+	/// mainLines :主星历双行
+	/// captime1:信号时间
+	/// captime2:信号时间
+	/// captime3:信号时间
+	/// fuHz: 上行
+	/// dfoHzErr: 频差误差
+	/// ephLocErr: 星历位置误差
+	/// ephVLocErr: 星历速度误差
+	/// level: gdop输出等级
+	/// levlen:level 长度
+	/// resCount:每一级的数据个数
+	/// res :数据
+	/// satllh :卫星位置  长度3
+	/// 返回值:0 成功
+	///
+	GDOP_EXPORT int GdopSingleSatD(char *mainLines, long long captime1, long long captime2, long long captime3
+		, double fuHz, double dfoHzErr, double ephLocErr, double ephVLocErr
+		, double *level, int levlen, int *resCount, double **res, double *satllh);
+
+	///
+	/// 获取低轨双星GDOP
+	/// mainLines :主星历双行
+	/// adajLines :邻星历双行 
+	/// captime:信号时间
+	/// cdbPos: 地面站经度,纬度
+	/// refPos: 参考经度,纬度
+	/// dtousErr: 时差误差
+	/// ephLocErr: 星历位置误差
+	/// level: gdop输出等级
+	/// levlen:level 长度
+	/// resCount:每一级的数据个数
+	/// res :数据
+	/// satllh :卫星位置  长度6
+	/// 返回值:0 成功
+	///
+	GDOP_EXPORT int Gdop2Sat1DRef(char *mainLines, char *adajLines, long long captime, double *cdbPos
+		, double *refPos, double dtousErr, double ephLocErr
+		, double *level, int levlen, int *resCount, double **res, double *satllh);
+
+
+	///
+	/// 释放
+	///
+	GDOP_EXPORT void FreeGDOPBuf(double *val);
+}

BIN
XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/GDOP_Analysis.dll


BIN
XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/GDOP_Draw.dll


BIN
XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/Tle2XYZ.dll


+ 1 - 0
XdCxRhDW.App/Api/GDOP误差椭圆/GDOP/args.txt

@@ -0,0 +1 @@
+68 "1 39206U 13036A   23202.42807559  .00000070  00000+0  00000+0 0  9997;2 39206   3.1191  34.4939 0054311 175.9148  65.5730  1.00271529 36651" "1 40892U 15046A   23201.78591034 -.00000153  00000+0  00000+0 0  9992;2 40892   0.0465 209.7898 0002849 182.8710 343.4998  1.00270904 28905" "2023-07-22 18:00:00.000000" 109.31 18.15 121.52 31.92 1 10000

+ 118 - 0
XdCxRhDW.App/Api/GDOP误差椭圆/GdopConfig.cs

@@ -0,0 +1,118 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace XdCxRhDW.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;
+                }
+            }
+        }
+    }
+}

+ 104 - 0
XdCxRhDW.App/Api/GDOP误差椭圆/GdopHelper.cs

@@ -0,0 +1,104 @@
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.InteropServices;
+
+namespace XdCxRhDW.App.Api.GDOP误差椭圆
+{
+    public static class GdopHelper
+    {
+
+        private const string GDOPDll = @"Api\GDOP误差椭圆\GDOP\GDOP_Draw.dll";
+
+        static readonly DateTime dtZero = new DateTime(1970, 1, 1, 8, 0, 0, 0);
+        /// <returns></returns>
+        
+        [DllImport(GDOPDll, CallingConvention = CallingConvention.Cdecl)]
+        public static extern int Gdop2Sat1DRef(string mainLines, string adajLines, Int64 captime, double[] cdbPos
+        , double[] refPos, double dtousErr, double ephLocErr
+        , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
+
+        [DllImport(GDOPDll, CallingConvention = CallingConvention.Cdecl)]
+        public static extern void FreeGDOPBuf(IntPtr val);
+
+       
+
+        public static (List<SatInfo>, List<ErrDistanceMapPoints>) Gdop2Sat1DRef(string mainLines, string adajLines, DateTime captime, double[] cdbPos, double[] refPos, double dtousErr, double ephLocErr)
+        {
+            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];
+            Gdop2Sat1DRef(mainLines, adajLines, timeSpan, cdbPos, refPos, dtousErr, ephLocErr, 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);
+            List<SatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines);
+            List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
+            for (int i = 0; i < points.Count; i++)
+            {
+                if (!points[i].Any()) continue;
+                ErrDistanceMapPoints errDistanceMap = new ErrDistanceMapPoints();
+                errDistanceMap.ErrDistance = level[i];
+                errDistanceMap.MapDots.AddRange(ParseResult(points[i]));
+                errs.Add(errDistanceMap);
+            }
+            return (satInfos, errs);
+        }
+
+
+        private static List<MapDot> ParseResult(double[] ponits)
+        {
+            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;
+
+        }
+
+
+        private static List<SatInfo> ParseResult(int satCount, double[] satllh, params string[] ephLine)
+        {
+
+            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;
+        }
+    }
+
+}

+ 45 - 0
XdCxRhDW.App/Api/GDOP误差椭圆/MapItem.cs

@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XdCxRhDW.App.Api.GDOP误差椭圆
+{
+    /// <summary>
+    /// 对应地图上一个点
+    /// </summary>
+    public class MapDot
+    {
+        public MapDot() { }
+
+        public MapDot(double lon, double lat, double alt)
+        {
+            this.Lon = lon;
+            this.Lat = lat;
+            this.Alt = alt;
+        }
+
+        public double Lon { get; set; }
+
+        public double Lat { get; set; }
+
+        public double Alt { get; set; }
+    }
+
+    
+    
+    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; }
+        public double SatLon { get; set; }
+        public double SatLat { get; set; }
+
+    }
+}

+ 3 - 0
XdCxRhDW.App/Api/GDOP误差椭圆/readme.txt

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

+ 19 - 0
XdCxRhDW.App/Api/PosApi.cs

@@ -32,6 +32,25 @@ namespace XdCxRhDW.App.Api
         public extern static void X2D1_POS_Core(double[] mainSat, double[] adjaSat, double[] cdbStation, double[] satStation1, double[] satStation2, double[] satStation3, double[] satStation4,
              double[] satStation5, double[] refStation, double[] zone, double tarSxDto, double tarXdDto, double samp_main_dto, double samp_neigh_dto, double[] res);
 
+
+        private const string XdtsDll = @"Api\时差线\Positioning.dll";
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="main_sat_pos"></param>
+        /// <param name="neigh_sat_pos"></param>
+        /// <param name="rec1_pos"></param>
+        /// <param name="rec2_pos"></param>
+        /// <param name="ref_pos"></param>
+        /// <param name="Zone"></param>
+        /// <param name="target_dto">目标时差 (s)</param>
+        /// <param name="ref_dto">参考时差 (s)</param>
+        /// <param name="LOP_Value"></param>
+        /// <param name="LOP_Len"></param>
+        [DllImport(XdtsDll, EntryPoint = "CurveByTwoTDOA", CallingConvention = CallingConvention.Cdecl)]//两星一地
+        public extern static void CurveByTwoTDOA(double[] main_sat_pos, double[] neigh_sat_pos, double[] rec1_pos, double[] rec2_pos, double[] ref_pos, double[] Zone,
+      double target_dto, double ref_dto, out IntPtr LOP_Value, ref int LOP_Len);
+
         #endregion
 
 

BIN
XdCxRhDW.App/Api/时差线/DLL_LHDW32.dll


+ 205 - 0
XdCxRhDW.App/Api/时差线/DrawDtoLineHelper.cs

@@ -0,0 +1,205 @@
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices;
+
+namespace XdCxRhDW.App.Api.时差线
+{
+    public class DrawDtoLineHelper
+    {
+        #region 未使用
+        /*
+        static double[] HandleX2D1(X2D1Option opt)
+        {
+            var target_llh = DLL_LXYDApi.XingDi_DW(
+                    opt.MsEph
+                    , opt.NsEph
+                    , opt.MsAnt
+                    , opt.NsAnt
+                    , opt.CDBMsAnt
+                    , opt.CDBAnt
+                    , opt.RefGeod
+                    , opt.Zone
+                    , opt.SxDto * 1e-6
+                    , opt.xdDto * 1e-6
+                    , -opt.SampMsDto * 1e-6
+                    , -opt.SampNsDto * 1e-6
+                    , -opt.CDBpMsDto * 1e-6
+                    );
+            double[] result = new double[6];
+            Marshal.Copy(target_llh, result, 0, result.Length);
+            return result;
+        }
+       
+        static void HandleX1D2(X1D2Option opt)
+        {
+            var target_llh = DLL_YXLDApi.XingDi_DW_YXLD(
+                opt.MsEph
+                , opt.Ms1Ant
+                , opt.Ms2Ant
+                , opt.Nd1Ant
+                , opt.Nd2Ant
+                , opt.RefGeod1
+                , opt.RefGeod2
+                , opt.Zone
+                , opt.DtXd1 * 1e-6
+                , opt.DtXd2 * 1e-6
+                , -opt.DtRef1 * 1e-6
+                , -opt.DtRef2 * 1e-6
+                );
+            double[] result = new double[6];
+            Marshal.Copy(target_llh, result, 0, result.Length);
+            // OutputHelper.WritePos(result);
+        }
+         */
+        #endregion
+        private const string exeName = "XingDiSCX.exe";
+        private static double[] zone = new double[] { -85, 85, -180, 180 }; //定位区域
+        /// <summary>
+        /// 星地时差线
+        /// </summary>
+        /// <param name="opt"></param>
+        /// <returns></returns>
+        /// <exception cref="Exception"></exception>
+        public static IEnumerable<(double lon, double lat)> DtoLineXd(DtoLineXdOption opt)
+        {
+            List<DtoLinePoint> list = new List<DtoLinePoint>();
+
+            string file = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "API\\时差线\\DtoLine.dat");
+            string exePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "API\\时差线");
+            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}]不存在");
+            List<string> arguments = new List<string>();
+            arguments.Add(file);
+            arguments.Add($"{opt.MsEph[0]}");
+            arguments.Add($"{opt.MsEph[1]}");
+            arguments.Add($"{opt.MsEph[2]}");
+
+            arguments.Add($"{opt.MsAnt[0]}");
+            arguments.Add($"{opt.MsAnt[1]}");
+
+            arguments.Add($"{opt.CDBAnt[0]}");
+            arguments.Add($"{opt.CDBAnt[1]}");
+
+            arguments.Add($"{opt.RefGeod[0]}");
+            arguments.Add($"{opt.RefGeod[1]}");
+
+            arguments.Add($"{opt.xdDto}");
+            arguments.Add($"{opt.RefDto}");
+
+
+            arguments.Add($"{opt.PosLon}");
+            arguments.Add($"{opt.PosLat}");
+            Process p = new Process();
+            p.StartInfo.WorkingDirectory = exePath;
+            p.StartInfo.FileName = exeFile;
+            p.StartInfo.Arguments = string.Join(" ", arguments);
+            p.StartInfo.CreateNoWindow = true;
+            p.StartInfo.RedirectStandardError = true;
+            p.StartInfo.RedirectStandardOutput = true;
+            p.StartInfo.UseShellExecute = false;
+            p.Start();
+            var succeed = p.WaitForExit(10000);
+            if (!succeed)
+            {
+                throw new Exception($"进程[{exeName}]超时未完成!");
+            }
+            string result = p.StandardOutput.ReadToEnd();
+            if (string.IsNullOrWhiteSpace(result))
+            {
+                throw new Exception("计算时差线出现未知错误!");
+            }
+            var array = result.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
+            if (array[0] == "1")
+            {
+                throw new Exception(array[1]);
+            }
+            if (File.Exists(file))
+            {
+                var dtostr = File.ReadAllText(file);
+                list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<DtoLinePoint>>(dtostr);
+            }
+            var Lines = list.Select(s => (s.Lon, s.Lat));
+            return Lines;
+        }
+
+        /// <summary>
+        /// 星地双星时差线
+        /// </summary>
+        /// <param name="opt"></param>
+        /// <returns></returns>
+        public static IEnumerable<(double lon, double lat)> DtoLineXDTwoStart(DtoLineTwoStartOption opt)
+        {
+
+            List<DtoLinePoint> list = new List<DtoLinePoint>();
+            IntPtr LOP_ValuePtr;
+            int LOP_Len = 0;
+
+
+            PosApi.CurveByTwoTDOA(
+                opt.MsEph,
+                 opt.NsEph,
+                 opt.MsAnt,
+                 opt.NsAnt,
+                opt.RefGeod,
+                 zone,
+                opt.TargetDto * 1e-6,
+                opt.RefDto * 1e-6, out LOP_ValuePtr, ref LOP_Len);
+
+
+            double[] LOP_Value = new double[LOP_Len * 3];
+            if (LOP_Len > 0)
+            {
+                Marshal.Copy(LOP_ValuePtr, LOP_Value, 0, LOP_Value.Length);
+
+                list = OutputHelper.WriteDtoLine(LOP_Value, LOP_Len);
+            }
+            var Lines = list.Select(p => (p.Lon, p.Lat));
+            return Lines;
+        }
+
+        private static IEnumerable<(double lon, double lat)> ParseResult(IntPtr LOP_ValuePtr, int LOP_Len)
+        {
+            List<DtoLinePoint> list = new List<DtoLinePoint>();
+            double[] LOP_Value = new double[LOP_Len * 3];
+            if (LOP_Len > 0)
+            {
+                Marshal.Copy(LOP_ValuePtr, LOP_Value, 0, LOP_Value.Length);
+                for (int idx = 0; idx < LOP_Len; ++idx)
+                {
+                    if (LOP_Value[3 * idx + 1] != -1)
+                    {
+                        list.Add(new DtoLinePoint()
+                        {
+                            Lon = LOP_Value[3 * idx + 1],
+                            Lat = LOP_Value[3 * idx]
+                        });
+                    }
+                }
+                for (int idx = 0; idx < LOP_Len; ++idx)
+                {
+                    if (LOP_Value[3 * idx + 2] != -1)
+                    {
+                        list.Add(new DtoLinePoint()
+                        {
+                            Lon = LOP_Value[3 * idx + 2],
+                            Lat = LOP_Value[3 * idx]
+                        });
+                    }
+                }
+            }
+            var Lines = list.Select(p => (p.Lon, p.Lat));
+            return Lines;
+        }
+
+
+    }
+}

+ 145 - 0
XdCxRhDW.App/Api/时差线/DtoLineModel.cs

@@ -0,0 +1,145 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XdCxRhDW.App.Api.时差线
+{
+    public class DtoLinePoint 
+    {
+        /// <summary>
+        /// 经度
+        /// </summary>
+        public double Lon { get; set; }
+        /// <summary>
+        /// 纬度
+        /// </summary>
+        public double Lat { get; set; }
+    }
+    public class DtoLineXdOption
+    {
+        /// <summary>
+        /// 主星星历
+        /// </summary>
+        public double[] MsEph { get; set; }
+      
+
+        /// <summary>
+        /// 主星接收站
+        /// </summary>
+        public double[] MsAnt { get; set; }
+       
+      
+        /// <summary>
+        /// 超短波接收站
+        /// </summary>
+        public double[] CDBAnt { get; set; }
+        /// <summary>
+        /// 参考站位置
+        /// </summary>
+        public double[] RefGeod { get; set; }
+        
+        /// <summary>
+        /// 星地时差 (us)
+        /// </summary>
+        public double xdDto { get; set; }
+        /// <summary>
+        /// 参考时差 (us)
+        /// </summary>
+        public double RefDto { get; set; }
+
+        /// <summary>
+        /// 经度
+        /// </summary>
+        public double PosLon { get; set; }
+
+        public double PosLat { get; set; }
+
+    }
+
+
+    public class DtoLineTwoStartOption
+    {
+        /// <summary>
+        /// 主星星历
+        /// </summary>
+        public double[] MsEph { get; set; }
+
+        /// <summary>
+        /// 邻星星历
+        /// </summary>
+        public double[] NsEph { get; set; }
+
+        /// <summary>
+        /// 主星接收站
+        /// </summary>
+        public double[] MsAnt { get; set; }
+
+        /// <summary>
+        /// 邻星接收站
+        /// </summary>
+        public double[] NsAnt { get; set; }
+
+        /// <summary>
+        /// 参考站位置
+        /// </summary>
+        public double[] RefGeod { get; set; }
+
+        /// <summary>
+        /// 目标时差 (us)
+        /// </summary>
+        public double TargetDto { get; set; }
+        /// <summary>
+        /// 参考时差 (us)
+        /// </summary>
+        public double RefDto { get; set; }
+
+        /// <summary>
+        /// 经度
+        /// </summary>
+        public double PosLon { get; set; }
+
+        public double PosLat { get; set; }
+
+    }
+
+    public class DfoLineTwoStartOption
+    {
+        /// <summary>
+        /// 主星星历
+        /// </summary>
+        public double[] MsEph { get; set; }
+
+        /// <summary>
+        /// 邻星星历
+        /// </summary>
+        public double[] NsEph { get; set; }
+
+        /// <summary>
+        /// 参考站位置
+        /// </summary>
+        public double[] RefGeod { get; set; }
+
+        /// <summary>
+        /// 目标频差(Hz)
+        /// </summary>
+        public double TargetDfo { get; set; }
+        /// <summary>
+        /// 参考频差 (Hz)
+        /// </summary>
+        public double RefDfo { get; set; }
+
+        /// <summary>
+        /// 上行频点1(Hz)
+        /// </summary>
+        public double fu1 { get; set; }
+        /// <summary>
+        /// 上行频点2(Hz)
+        /// </summary>
+        public double fu2 { get; set; }
+
+    }
+
+  
+}

BIN
XdCxRhDW.App/Api/时差线/Newtonsoft.Json.dll


+ 130 - 0
XdCxRhDW.App/Api/时差线/OutputHelper.cs

@@ -0,0 +1,130 @@
+using DevExpress.Map.Kml.Model;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XdCxRhDW.App.Api.时差线
+{
+    public class OutputHelper
+    {
+        public const double WGS84a = 6378137.0;
+        public const double f = 1.0 / 298.257224;
+
+        public static List<DtoLinePoint> WriteDtoLine(double[] LOP_Value, int LOP_Len)
+        {
+            List<DtoLinePoint> list = new List<DtoLinePoint>();
+
+            if (LOP_Len == 0) return list;
+            var len = LOP_Len * 2;
+            Lla[] line = new Lla[len + 1];
+            double? prevLon = null, prevLat = null;
+            for (int i = 0; i < LOP_Len; i++)
+            {
+                var lon1 = LOP_Value[3 * i + 1];
+                var lon2 = LOP_Value[3 * i + 2];
+                var lat = LOP_Value[3 * i];
+                var p2Idx = len - 1 - i;
+                if (lon1 != -1 && lon2 != -1)
+                {
+                    if (prevLon == null)
+                    {
+                        line[i] = new Lla(lon1, lat);
+                        line[p2Idx] = new Lla(lon2, lat);
+                    }
+                    else
+                    {
+                        var disLon1 = DisLon(prevLon.Value, prevLat.Value, lon1, lat);
+                        var disLon2 = DisLon(prevLon.Value, prevLat.Value, lon2, lat);
+                        if (disLon1 < disLon2)
+                        {
+                            line[i] = new Lla(lon1, lat);
+                            line[p2Idx] = new Lla(lon2, lat);
+                        }
+                        else
+                        {
+                            line[i] = new Lla(lon2, lat);
+                            line[p2Idx] = new Lla(lon1, lat);
+                        }
+                    }
+                    prevLon = line[i].Lon;
+                    prevLat = line[i].Lat;
+                }
+            }
+            var firstPoint = line.FirstOrDefault(m => m != null);
+            if (firstPoint != null)
+            {
+                line[line.Length - 1] = new Lla(firstPoint.Lon, firstPoint.Lat);
+            }
+            Array.ForEach(line, lla =>
+            {
+                if (lla != null)
+                {
+                    DtoLinePoint dtoLine = new DtoLinePoint();
+                    dtoLine.Lon = lla.Lon;
+                    dtoLine.Lat = lla.Lat;
+                    list.Add(dtoLine);
+                }
+            });
+            return list;
+        }
+
+        public static double DisLon(double lon1, double lat1, double lon2, double lat2)
+        {
+            return DistinceLla(new double[] { lon1, lat1, 0 }, new double[] { lon2, lat2, 0 });
+        }
+
+        public static double DistinceLla(double[] lla1, double[] lla2)
+        {
+            double[] xyz1 = LLA2XYZ(lla1[0], lla1[1], lla1[2]), xyz2 = LLA2XYZ(lla2[0], lla2[1], lla2[2]);
+            return Distince(xyz1[0], xyz1[1], xyz1[2], xyz2[0], xyz2[1], xyz2[2]);
+        }
+
+        public static double Distince(double x1, double y1, double z1, double x2, double y2, double z2)
+        {
+            double x = (x1 - x2);
+            double y = (y1 - y2);
+            double z = (z1 - z2);
+            double dist = Math.Sqrt(x * x + y * y + z * z);
+            return dist;
+        }
+
+        public static double[] LLA2XYZ(double lon, double lat, double alt)
+        {
+            lat = Math.PI * lat / 180.0;
+            lon = Math.PI * lon / 180.0;
+
+            double cosLat = Math.Cos(lat);
+            double sinLat = Math.Sin(lat);
+
+            double cosLong = Math.Cos(lon);
+            double sinLong = Math.Sin(lon);
+
+            double c = 1 / Math.Sqrt(cosLat * cosLat + (1 - f) * (1 - f) * sinLat * sinLat);
+            double s = (1 - f) * (1 - f) * c;
+
+            double x = (WGS84a * c + alt) * cosLat * cosLong;
+            double y = (WGS84a * c + alt) * cosLat * sinLong;
+            double z = (WGS84a * s + alt) * sinLat;
+
+            return new double[3] { x, y, z };
+        }
+    }
+
+    public class Lla
+    {
+        public Lla(double lon, double lat)
+        {
+            this.Lon = lon;
+            this.Lat = lat;
+        }
+
+        public double Lon { get; set; }
+
+        public double Lat { get; set; }
+
+        public double Alt { get; set; } = 0;
+    }
+
+}

BIN
XdCxRhDW.App/Api/时差线/Positioning.dll


+ 49 - 0
XdCxRhDW.App/Api/时差线/Positioning.h

@@ -0,0 +1,49 @@
+#pragma once
+
+#ifdef _WIN32
+# if defined(Positioning_LIB)
+#  define Positioning_EXPORT __declspec(dllexport)
+# else
+#  define Positioning_EXPORT __declspec(dllimport)
+# endif
+#else
+#  define Positioning_EXPORT
+#endif
+
+extern "C"
+{
+	/*
+	双星时差线
+	LOP_Value 返回值 结构参考DTO_Plot
+	LOP_Len*3为LOP_Value的长度
+	*/
+	Positioning_EXPORT void CurveByTwoTDOA(double *main_sat_pos, double *neigh_sat_pos, double *rec_pos1, double *rec_pos2, double *ref_pos,
+		double *Zone, double target_dto, double ref_dto, double **LOP_Value, int *LOP_Len);
+
+	/*
+	双星时差线-无参
+	LOP_Value 返回值 结构参考DTO_Plot
+	LOP_Len*3为LOP_Value的长度
+	*/
+	Positioning_EXPORT void CurveByTwoTDOAWithNoRef(double *main_sat_pos, double *neigh_sat_pos, double *rec_pos1, double *rec_pos2,
+		double *Zone, double target_dto, double **LOP_Value, int *LOP_Len);
+
+	/*
+	三星定位
+	target_llh,长度固定为6  经度、纬度、高;(镜像)经度、纬度、高
+	*/
+	Positioning_EXPORT void HyperbolicPositioning(double *main_sat, double *neigh_sat1, double *neigh_sat2, double *Sat_Station_LLH1, double *Sat_Station_LLH2, double *Sat_Station_LLH3,
+		double *Ref_Station_LLH, double *Zone, double target_dto1, double target_dto2, double ref_dto1, double ref_dto2, double *target_llh);
+
+	/*
+	三星定位
+	target_llh,长度固定为6	经度、纬度、高;(镜像)经度、纬度、高
+	*/
+	Positioning_EXPORT void HyperbolicPositioningWithNoRef(double *main_sat, double *neigh_sat1, double *neigh_sat2, double *Sat_Station_LLH1, double *Sat_Station_LLH2, double *Sat_Station_LLH3,
+		double *Zone, double target_dto1, double target_dto2, double *target_llh);
+
+	/*
+	用于释放时差线缓存
+	*/
+	Positioning_EXPORT void Destory(void *buf);
+};

BIN
XdCxRhDW.App/Api/时差线/XingDiSCX.exe


BIN
XdCxRhDW.App/Api/时差线/msvcp100.dll


BIN
XdCxRhDW.App/Api/时差线/msvcr100.dll


+ 29 - 1
XdCxRhDW.App/ExtensionsDev/GridControlEx.cs

@@ -1,5 +1,6 @@
 using DevExpress.Utils;
 using DevExpress.Utils.Menu;
+using DevExpress.Utils.Svg;
 using DevExpress.XtraBars;
 using DevExpress.XtraBars.Commands.Internal;
 using DevExpress.XtraEditors;
@@ -287,5 +288,32 @@ public static class GridControlEx
         tag?.PopupMenu?.ShowPopup(p);
     }
 
-
+    public static GridControl AddMenu(this GridControl grid, string menuText, SvgImage meunImage, Action onClick)
+    {
+        GridTag tag = grid.Tag as GridTag;
+        if (tag.BarM == null)
+        {
+            tag.BarM = new BarManager();
+            tag.BarM.Form = grid;
+        }
+        if (tag.PopupMenu == null)
+        {
+            tag.PopupMenu = new PopupMenu();
+        }
+        PopupMenu popupMenu = tag.PopupMenu;
+        BarButtonItem item = new BarButtonItem();
+        item.ItemClick += (sender, e) =>
+        {
+            item.Enabled = false;
+            onClick?.Invoke();
+            item.Enabled = true;
+        };
+        item.ImageOptions.SvgImage = meunImage;
+        item.Caption = menuText;
+        tag.BarM.Items.Add(item);
+        popupMenu.AddItem(item);
+        popupMenu.Manager = tag.BarM;
+        tag.PopupMenu = popupMenu;
+        return grid;
+    }
 }

+ 31 - 0
XdCxRhDW.App/ExtensionsDev/MapControlEx.cs

@@ -1379,7 +1379,38 @@ public static class MapControlEx
         if (recCallback)
             innerData.mOnRectChanged?.Invoke(ctrl.GetCurrentRect());
     }
+    public static void DrawDtoPonit(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines)
+    {
+        if (lines == null || !lines.Any()) return;
+        var innerData = ctrl.Tag as InnerData;
 
+        List<MapDot> list = new List<MapDot>();
+        var color = ColorHelper.GetColor(title);
+        for (int i = 0; i < lines.Count(); i++)
+        {
+            var p = lines.ElementAt(i);
+            if (p.lon < -180 || p.lon > 180) continue;
+            if (p.lon == 0 && p.lon == 0) continue;
+            var mapItem = new MapDot()
+            {
+                EnableHighlighting = DefaultBoolean.True,
+                EnableSelection = DefaultBoolean.False,
+                CanMove = false,
+                Visible = true,
+                IsHitTestVisible = true,
+                Fill = color,
+                Size = 4,
+                Tag = $"DrawPoint_{title}{lines.ElementAt(i).lon}",
+                Location = new GeoPoint(p.lat, p.lon),
+                ToolTipPattern = $"{title}",
+
+            };
+            list.Add(mapItem);
+        }
+
+        if (!list.Any()) return;
+        innerData.mMapStorage.Items.AddRange(list);
+    }
     public static void DrawGdopLine(this MapControl ctrl, IEnumerable<(string wcKm, double lon, double lat)> lines)
     {
         if (lines == null || !lines.Any()) return;

+ 29 - 0
XdCxRhDW.App/Image/DfoLine.svg

@@ -0,0 +1,29 @@
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
+<style type="text/css">
+	.Red{fill:#D11C1C;}
+	.Yellow{fill:#FFB115;}
+	.Blue{fill:#1177D7;}
+	.Green{fill:#039C23;}
+	.Black{fill:#727272;}
+	.White{fill:#FFFFFF;}
+	.st0{opacity:0.5;}
+	.st1{opacity:0.75;}
+	.st2{opacity:0.35;}
+	.st3{opacity:0.65;}
+</style>
+<g id="Spline3D">
+	<g class="st1">
+		<path class="Green" d="M20.6,8.6C17.8,10.8,16,14.2,16,18c0,0.6-0.1,1.1-0.4,1.6C15,21,13.6,22,12,22c-2.2,0-4-1.8-4-4
+			c0-3.3-2.7-6-6-6v2v2c1.1,0,2,0.9,2,2c0,4.4,3.6,8,8,8c0.7,0,1.4-0.1,2-0.3c0,0,0.1,0,0.1,0c0.2-0.1,0.5-0.1,0.7-0.2
+			c0.1,0,0.1,0,0.2-0.1c0.3-0.1,0.5-0.2,0.8-0.4c0.1-0.1,0.3-0.2,0.4-0.2c0.1-0.1,0.2-0.1,0.3-0.2c0.2-0.1,0.3-0.2,0.4-0.3
+			c0.1-0.1,0.2-0.2,0.3-0.2c1.7-1.5,2.7-3.6,2.7-6c0-2.7,1.4-5.1,3.4-6.6c1.3-0.9,2.9-1.4,4.6-1.4V8.3V6C25.2,6,22.6,7,20.6,8.6z"/>
+	</g>
+	<path class="Green" d="M14,20c0.6,0,1.1-0.1,1.6-0.4C15,21,13.6,22,12,22c-2.2,0-4-1.8-4-4c0-3.3-2.7-6-6-6l2-2c3.3,0,6,2.7,6,6
+		C10,18.2,11.8,20,14,20z M20,18c0,2.4-1.1,4.5-2.7,6c0.1-0.1,0.3-0.2,0.4-0.3l2-2c1.4-1.4,2.3-3.4,2.3-5.7c0-1.7,0.5-3.3,1.4-4.6
+		C21.4,12.9,20,15.3,20,18z M28,6v2.3V10l2-2V4L28,6z"/>
+	<g class="st0">
+		<path class="Green" d="M20.6,8.6C22.6,7,25.2,6,28,6l2-2C26.2,4,22.8,5.8,20.6,8.6z"/>
+	</g>
+</g>
+</svg>

+ 20 - 0
XdCxRhDW.App/Image/DtoLine.svg

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
+<style type="text/css">
+	.Green{fill:#039C23;}
+	.Black{fill:#727272;}
+	.Red{fill:#D11C1C;}
+	.Yellow{fill:#FFB115;}
+	.Blue{fill:#1177D7;}
+	.White{fill:#FFFFFF;}
+	.st0{opacity:0.5;}
+	.st1{opacity:0.75;}
+</style>
+<g id="EnableClustering">
+	<path class="Green" d="M32,16c0,4.4-3.6,8-8,8c-0.2,0-0.3,0-0.5,0c1.6-2.3,2.5-5.1,2.5-8s-0.9-5.6-2.5-8c0.2,0,0.3,0,0.5,0
+		C28.4,8,32,11.6,32,16z M14,16c0-3.9,2.3-7.5,5.8-9.1C17.7,5.1,15,4,12,4C5.4,4,0,9.4,0,16c0,6.6,5.4,12,12,12c3,0,5.7-1.1,7.8-2.9
+		C16.3,23.5,14,19.9,14,16z M21.3,8.5C18.2,9.6,16,12.5,16,16s2.2,6.4,5.3,7.5C23,21.5,24,18.9,24,16S23,10.5,21.3,8.5z"/>
+</g>
+</svg>

+ 33 - 0
XdCxRhDW.App/Image/GDOP.svg

@@ -0,0 +1,33 @@
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
+<style type="text/css">
+	.Red{fill:#D11C1C;}
+	.Yellow{fill:#FFB115;}
+	.Blue{fill:#1177D7;}
+	.Green{fill:#039C23;}
+	.Black{fill:#727272;}
+	.White{fill:#FFFFFF;}
+	.st0{opacity:0.5;}
+	.st1{opacity:0.75;}
+	.st2{opacity:0.35;}
+	.st3{opacity:0.65;}
+</style>
+<g id="RadarLine_1_">
+	<g class="st2">
+		<path class="Black" d="M23.7,9.7C23.5,9.9,23.3,10,23,10c-0.6,0-1-0.4-1-1c0-0.3,0.1-0.5,0.3-0.7C20.6,6.9,18.4,6,16,6
+			c-5,0-9.2,3.7-9.9,8.6C6.3,14.2,6.6,14,7,14c0.6,0,1,0.4,1,1s-0.4,1-1,1c-0.5,0-0.9-0.3-1-0.8c0,0.3,0,0.5,0,0.8
+			c0,5.5,4.5,10,10,10c0.3,0,0.5,0,0.8,0c-0.5-0.1-0.8-0.5-0.8-1c0-0.6,0.4-1,1-1s1,0.4,1,1c0,0.4-0.2,0.7-0.6,0.9
+			C22.3,25.2,26,21,26,16C26,13.6,25.1,11.4,23.7,9.7z M16,24c-4.4,0-8-3.6-8-8c0-3,1.6-5.5,4-6.9V9c0-0.6,0.4-1,1-1
+			c0.3,0,0.6,0.1,0.7,0.3C14.5,8.1,15.2,8,16,8c4.4,0,8,3.6,8,8S20.4,24,16,24z M16,0C7.2,0,0,7.2,0,16s7.2,16,16,16s16-7.2,16-16
+			S24.8,0,16,0z M16,30C8.3,30,2,23.7,2,16S8.3,2,16,2s14,6.3,14,14S23.7,30,16,30z M16,12c-2.2,0-4,1.8-4,4s1.8,4,4,4s4-1.8,4-4
+			S18.2,12,16,12z M16,18c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S17.1,18,16,18z"/>
+	</g>
+	<path class="Blue" d="M23,6c-1.3,0-2.4,0.8-2.8,2h-4.4c-0.4-1.2-1.5-2-2.8-2c-1.7,0-3,1.3-3,3c0,0.5,0.1,0.9,0.3,1.3l-2,2
+		C7.9,12.1,7.5,12,7,12c-1.7,0-3,1.3-3,3s1.3,3,3,3c0.5,0,0.9-0.1,1.3-0.3l6,6C14.1,24.1,14,24.5,14,25c0,1.7,1.3,3,3,3s3-1.3,3-3
+		c0-0.9-0.4-1.8-1.1-2.3L23,12c1.6,0,3-1.4,3-3C26,7.3,24.7,6,23,6z M7,16c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1s1,0.4,1,1
+		C8,15.6,7.6,16,7,16z M13,8c0.6,0,1,0.4,1,1c0,0.6-0.4,1-1,1s-1-0.4-1-1C12,8.4,12.4,8,13,8z M17,26c-0.6,0-1-0.4-1-1
+		c0-0.6,0.4-1,1-1s1,0.4,1,1C18,25.6,17.6,26,17,26z M17,22C17,22,17,22,17,22c-0.5,0-0.9,0.1-1.3,0.3l-6-6C9.9,15.9,10,15.5,10,15
+		s-0.1-0.9-0.3-1.3l2-2c0.4,0.2,0.8,0.3,1.3,0.3c1.3,0,2.4-0.8,2.8-2h4.4c0.2,0.5,0.5,1,1,1.3L17,22z M23,10c-0.6,0-1-0.4-1-1
+		c0-0.6,0.4-1,1-1s1,0.4,1,1C24,9.6,23.6,10,23,10z"/>
+</g>
+</svg>

+ 0 - 3
XdCxRhDW.App/Properties/licenses.licx.bak

@@ -1,3 +0,0 @@
-DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v23.1, Version=23.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraBars.Docking2010.DocumentManager, DevExpress.XtraBars.v23.1, Version=23.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v23.1, Version=23.1.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

+ 79 - 34
XdCxRhDW.App/UserControl/CtrlHome.Designer.cs

@@ -34,16 +34,16 @@ namespace XdCxRhDW.App.UserControl
         private void InitializeComponent()
         {
             this.components = new System.ComponentModel.Container();
-            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions4 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
+            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions10 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CtrlHome));
-            DevExpress.Utils.SuperToolTip superToolTip4 = new DevExpress.Utils.SuperToolTip();
-            DevExpress.Utils.ToolTipItem toolTipItem4 = new DevExpress.Utils.ToolTipItem();
-            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions5 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
-            DevExpress.Utils.SuperToolTip superToolTip5 = new DevExpress.Utils.SuperToolTip();
-            DevExpress.Utils.ToolTipItem toolTipItem5 = new DevExpress.Utils.ToolTipItem();
-            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions6 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
-            DevExpress.Utils.SuperToolTip superToolTip6 = new DevExpress.Utils.SuperToolTip();
-            DevExpress.Utils.ToolTipItem toolTipItem6 = new DevExpress.Utils.ToolTipItem();
+            DevExpress.Utils.SuperToolTip superToolTip10 = new DevExpress.Utils.SuperToolTip();
+            DevExpress.Utils.ToolTipItem toolTipItem10 = new DevExpress.Utils.ToolTipItem();
+            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions11 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
+            DevExpress.Utils.SuperToolTip superToolTip11 = new DevExpress.Utils.SuperToolTip();
+            DevExpress.Utils.ToolTipItem toolTipItem11 = new DevExpress.Utils.ToolTipItem();
+            DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions buttonImageOptions12 = new DevExpress.XtraEditors.ButtonsPanelControl.ButtonImageOptions();
+            DevExpress.Utils.SuperToolTip superToolTip12 = new DevExpress.Utils.SuperToolTip();
+            DevExpress.Utils.ToolTipItem toolTipItem12 = new DevExpress.Utils.ToolTipItem();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.mapControl1 = new DevExpress.XtraMap.MapControl();
             this.gridHomePosRes = new DevExpress.XtraGrid.GridControl();
@@ -69,11 +69,15 @@ namespace XdCxRhDW.App.UserControl
             this.btnStart = new DevExpress.XtraBars.BarButtonItem();
             this.btnStop = new DevExpress.XtraBars.BarButtonItem();
             this.btnDelPos = new DevExpress.XtraBars.BarButtonItem();
+            this.btnTar = new DevExpress.XtraBars.BarButtonItem();
             this.popupMenu1 = new DevExpress.XtraBars.PopupMenu(this.components);
             this.htmlTemplateCollection1 = new DevExpress.Utils.Html.HtmlTemplateCollection();
             this.htmlTemplate1 = new DevExpress.Utils.Html.HtmlTemplate();
             this.popupMenu2 = new DevExpress.XtraBars.PopupMenu(this.components);
-            this.btnTar = new DevExpress.XtraBars.BarButtonItem();
+            this.btnDrawDto = new DevExpress.XtraBars.BarButtonItem();
+            this.btnDrawDfo = new DevExpress.XtraBars.BarButtonItem();
+            this.btnDrawCX = new DevExpress.XtraBars.BarButtonItem();
+            this.btnGDOP = new DevExpress.XtraBars.BarButtonItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.mapControl1)).BeginInit();
@@ -191,22 +195,22 @@ namespace XdCxRhDW.App.UserControl
             // 
             // layoutControlGroup1
             // 
-            buttonImageOptions4.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions4.SvgImage")));
-            buttonImageOptions4.SvgImageSize = new System.Drawing.Size(20, 20);
-            toolTipItem4.Text = "新建任务";
-            superToolTip4.Items.Add(toolTipItem4);
-            buttonImageOptions5.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions5.SvgImage")));
-            buttonImageOptions5.SvgImageSize = new System.Drawing.Size(20, 20);
-            toolTipItem5.Text = "编辑任务";
-            superToolTip5.Items.Add(toolTipItem5);
-            buttonImageOptions6.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions6.SvgImage")));
-            buttonImageOptions6.SvgImageSize = new System.Drawing.Size(20, 20);
-            toolTipItem6.Text = "删除任务";
-            superToolTip6.Items.Add(toolTipItem6);
+            buttonImageOptions10.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions10.SvgImage")));
+            buttonImageOptions10.SvgImageSize = new System.Drawing.Size(20, 20);
+            toolTipItem10.Text = "新建任务";
+            superToolTip10.Items.Add(toolTipItem10);
+            buttonImageOptions11.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions11.SvgImage")));
+            buttonImageOptions11.SvgImageSize = new System.Drawing.Size(20, 20);
+            toolTipItem11.Text = "编辑任务";
+            superToolTip11.Items.Add(toolTipItem11);
+            buttonImageOptions12.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("buttonImageOptions12.SvgImage")));
+            buttonImageOptions12.SvgImageSize = new System.Drawing.Size(20, 20);
+            toolTipItem12.Text = "删除任务";
+            superToolTip12.Items.Add(toolTipItem12);
             this.layoutControlGroup1.CustomHeaderButtons.AddRange(new DevExpress.XtraEditors.ButtonPanel.IBaseButton[] {
-            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("新建任务", false, buttonImageOptions4, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "", -1, true, superToolTip4, true, false, true, null, -1),
-            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("编辑任务", false, buttonImageOptions5, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "", -1, true, superToolTip5, true, false, true, null, -1),
-            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("删除任务", false, buttonImageOptions6, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "", -1, true, superToolTip6, true, false, true, null, -1)});
+            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("新建任务", false, buttonImageOptions10, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "", -1, true, superToolTip10, true, false, true, null, -1),
+            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("编辑任务", false, buttonImageOptions11, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "", -1, true, superToolTip11, true, false, true, null, -1),
+            new DevExpress.XtraEditors.ButtonsPanelControl.GroupBoxButton("删除任务", false, buttonImageOptions12, DevExpress.XtraBars.Docking2010.ButtonStyle.PushButton, "", -1, true, superToolTip12, true, false, true, null, -1)});
             this.layoutControlGroup1.HeaderButtonsLocation = DevExpress.Utils.GroupElementLocation.AfterText;
             this.layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
             this.layoutControlItem1});
@@ -276,8 +280,12 @@ namespace XdCxRhDW.App.UserControl
             this.btnStart,
             this.btnStop,
             this.btnDelPos,
-            this.btnTar});
-            this.barManager1.MaxItemId = 4;
+            this.btnTar,
+            this.btnDrawDto,
+            this.btnDrawDfo,
+            this.btnDrawCX,
+            this.btnGDOP});
+            this.barManager1.MaxItemId = 11;
             // 
             // barDockControlTop
             // 
@@ -339,6 +347,14 @@ namespace XdCxRhDW.App.UserControl
             this.btnDelPos.Name = "btnDelPos";
             this.btnDelPos.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnDelPos_ItemClick);
             // 
+            // btnTar
+            // 
+            this.btnTar.Caption = "编辑目标";
+            this.btnTar.Id = 3;
+            this.btnTar.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnTar.ImageOptions.SvgImage")));
+            this.btnTar.Name = "btnTar";
+            this.btnTar.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnTar_ItemClick);
+            // 
             // popupMenu1
             // 
             this.popupMenu1.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
@@ -362,17 +378,42 @@ namespace XdCxRhDW.App.UserControl
             // 
             this.popupMenu2.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
             new DevExpress.XtraBars.LinkPersistInfo(this.btnDelPos),
-            new DevExpress.XtraBars.LinkPersistInfo(this.btnTar)});
+            new DevExpress.XtraBars.LinkPersistInfo(this.btnTar),
+            new DevExpress.XtraBars.LinkPersistInfo(this.btnDrawDto),
+            new DevExpress.XtraBars.LinkPersistInfo(this.btnDrawDfo),
+            new DevExpress.XtraBars.LinkPersistInfo(this.btnDrawCX),
+            new DevExpress.XtraBars.LinkPersistInfo(this.btnGDOP)});
             this.popupMenu2.Manager = this.barManager1;
             this.popupMenu2.Name = "popupMenu2";
             // 
-            // btnTar
+            // btnDrawDto
             // 
-            this.btnTar.Caption = "编辑目标";
-            this.btnTar.Id = 3;
-            this.btnTar.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnTar.ImageOptions.SvgImage")));
-            this.btnTar.Name = "btnTar";
-            this.btnTar.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnTar_ItemClick);
+            this.btnDrawDto.Caption = "绘制时差线";
+            this.btnDrawDto.Id = 7;
+            this.btnDrawDto.Name = "btnDrawDto";
+            this.btnDrawDto.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnDrawDto_ItemClick);
+            // 
+            // btnDrawDfo
+            // 
+            this.btnDrawDfo.Caption = "绘制频差线";
+            this.btnDrawDfo.Id = 8;
+            this.btnDrawDfo.Name = "btnDrawDfo";
+            this.btnDrawDfo.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnDrawDfo_ItemClick);
+            // 
+            // btnDrawCX
+            // 
+            this.btnDrawCX.Caption = "绘制测向线";
+            this.btnDrawCX.Id = 9;
+            this.btnDrawCX.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnDrawCX.ImageOptions.SvgImage")));
+            this.btnDrawCX.Name = "btnDrawCX";
+            this.btnDrawCX.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnDrawCX_ItemClick);
+            // 
+            // btnGDOP
+            // 
+            this.btnGDOP.Caption = "GDOP分析";
+            this.btnGDOP.Id = 10;
+            this.btnGDOP.Name = "btnGDOP";
+            this.btnGDOP.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.btnGDOP_ItemClick);
             // 
             // CtrlHome
             // 
@@ -443,5 +484,9 @@ namespace XdCxRhDW.App.UserControl
         private DevExpress.XtraBars.BarButtonItem btnDelPos;
         private DevExpress.XtraBars.PopupMenu popupMenu2;
         private DevExpress.XtraBars.BarButtonItem btnTar;
+        private DevExpress.XtraBars.BarButtonItem btnDrawDto;
+        private DevExpress.XtraBars.BarButtonItem btnDrawDfo;
+        private DevExpress.XtraBars.BarButtonItem btnDrawCX;
+        private DevExpress.XtraBars.BarButtonItem btnGDOP;
     }
 }

+ 153 - 1
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -41,6 +41,8 @@ using Microsoft.Owin.Hosting;
 using XdCxRhDW.App.App.Properties;
 using System.Web.Http;
 using System.Data.Entity.Migrations;
+using XdCxRhDW.App.Api.时差线;
+using System.Windows.Documents;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -52,6 +54,9 @@ namespace XdCxRhDW.App.UserControl
             InitializeComponent();
             gridHomeTask.Init();
             gridHomePosRes.Init().UseMultiSelect().UseRowNumber();
+            btnDrawDto.ImageOptions.SvgImage = SvgHelper.LoadFromFile("Image\\DtoLine.svg");
+            btnDrawDfo.ImageOptions.SvgImage = SvgHelper.LoadFromFile("Image\\DfoLine.svg");
+            btnGDOP.ImageOptions.SvgImage = SvgHelper.LoadFromFile("Image\\GDOP.svg");
             var mapService = string.Empty;//http://ows.mundialis.de/services/service
             using (RHDWContext db = new RHDWContext())
             {
@@ -153,6 +158,16 @@ namespace XdCxRhDW.App.UserControl
                 }
 
 
+            
+                mapControl1.AddPosMenu<PosRes>("绘制时差线", SvgHelper.LoadFromFile("Image\\DtoLine.svg"), item =>
+                {
+                    Draw2X1DDtoLine(item);
+                })
+               .AddPosMenu<PosRes>("绘制频差线", SvgHelper.LoadFromFile("Image\\DfoLine.svg"), item =>
+                      {
+                          // DrawDfoLine(item);
+                      });
+
             }
             catch (Exception ex)
             {
@@ -189,6 +204,85 @@ namespace XdCxRhDW.App.UserControl
             WaitHelper.CloseForm();
         }
 
+      
+        private async void Draw2X1DDtoLine(PosRes item)
+        {
+            try
+            {
+                List<TxInfo> listTx = new List<TxInfo>();
+                List<SatInfo> listSat = new List<SatInfo>();
+                CgRes cg;
+                using (RHDWContext db = new RHDWContext())
+                {
+                    listTx = db.TxInfos.ToList();
+                    listSat = db.SatInfos.ToList();
+                    cg = await db.CgRes.Where(m => m.ID == item.CgResID).FirstOrDefaultAsync();
+
+                }
+                if (cg == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowWarning($"未找到定位相关的计算[{item.CgResID}]信息");
+                    return;
+                }
+
+                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
+                if (satTx == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowWarning($"主星天线信息为空!");
+                    return;
+                }
+                var satNTx = listTx.Find(p => p.TxType == EnumTxType.AdjaSat);
+                if (satNTx == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowWarning($"邻星天线信息为空!");
+                    return;
+                }
+                var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
+                if (cdbTx == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowWarning($"超短波信息为空!");
+                    return;
+                }
+                var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
+                if (refTx == null)
+                {
+                    DxHelper.MsgBoxHelper.ShowWarning($"参考站信息为空!");
+                    return;
+                }
+                DtoLineXdOption dtoLineXd = new DtoLineXdOption();
+                dtoLineXd.MsEph = new double[] { cg.MainX, cg.MainY, cg.MainZ, 0, 0, 0 };
+                dtoLineXd.MsAnt = new double[] { satTx.Lon, satTx.Lat, 0 };
+                dtoLineXd.CDBAnt = new double[] { cdbTx.Lon, cdbTx.Lat, 0 };
+                dtoLineXd.RefGeod = new double[] { refTx.Lon, refTx.Lat, 0 };
+                dtoLineXd.xdDto = cg.DtoCdb;
+                dtoLineXd.RefDto = cg.YbMain;
+                dtoLineXd.PosLon = item.PosLon;
+                dtoLineXd.PosLat = item.PosLat;
+                var xdDtoLine = DrawDtoLineHelper.DtoLineXd(dtoLineXd);
+                mapControl1.DrawDtoPonit($"星地[{listSat.FirstOrDefault(m => m.ID == satTx.ID)?.Sat},{listSat.FirstOrDefault(m => m.ID == cdbTx.ID)?.Sat}]时差线", xdDtoLine);
+
+                DtoLineTwoStartOption twoStartOption = new DtoLineTwoStartOption();
+                twoStartOption.MsEph = new double[] { cg.MainX, cg.MainY, cg.MainZ, 0, 0, 0 };
+                twoStartOption.NsEph = new double[] { cg.AdjaX, cg.AdjaY, cg.AdjaZ, 0, 0, 0 };
+                twoStartOption.MsAnt = new double[] { satTx.Lon, satTx.Lat, 0 };
+                twoStartOption.NsAnt = new double[] { satNTx.Lon, satNTx.Lat, 0 };
+                twoStartOption.RefGeod = new double[] { refTx.Lon, refTx.Lat, 0 };
+                twoStartOption.TargetDto = cg.DtoSx;
+                twoStartOption.RefDto = cg.YbMain - cg.YbAdja;
+                twoStartOption.PosLon = item.PosLon;
+                twoStartOption.PosLat = item.PosLat;
+                var tsDtoLine = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);
+                mapControl1.DrawDtoPonit($"双星[{listSat.FirstOrDefault(m => m.ID == satTx.ID)?.Sat},{listSat.FirstOrDefault(m => m.ID == satNTx.ID)?.Sat}]时差线", tsDtoLine);
+
+
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error("绘制时差线失败", ex);
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制时差线失败,失败信息:{ex.Message}");
+            }
+        }
+
         private void GridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e)
         {
             if (e.Column.FieldName == "TaskName" && (EnumTaskState)gridView1.GetRowCellValue(e.RowHandle, "TaskState") == EnumTaskState.Running)
@@ -627,7 +721,7 @@ namespace XdCxRhDW.App.UserControl
                         var tarItem = await db.PosRes.Where(p => p.ID == item.ID).FirstOrDefaultAsync();
                         if (tarItem != null)
                         {
-                            item.TargetID= tarItem.TargetID = tar.ID;
+                            item.TargetID = tarItem.TargetID = tar.ID;
                             item.TarName = tarItem.TarName = tar.TargetName;
                         }
 
@@ -641,6 +735,64 @@ namespace XdCxRhDW.App.UserControl
                 DxHelper.MsgBoxHelper.ShowError("编辑定位目标异常");
             }
         }
+
+        private async void btnDrawDto_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            var ids = gridView2.GetSelectedRows();
+            if (ids.Length <= 0)
+            {
+                DxHelper.MsgBoxHelper.ShowWarning("请选择需要绘制时差线的定位数据信息!");
+                return;
+            }
+            var item = gridView2.GetRow(ids[0]) as PosRes;
+           var taskInfo= list.Find(m => m.ID == item.TaskID);
+            if (taskInfo == null)
+            {
+                DxHelper.MsgBoxHelper.ShowWarning($"未找到任务[{item.TaskID}]!");
+                return;
+            }
+            await Task.Run(() =>
+            {
+                try
+                {
+                    switch (taskInfo.PosType)
+                    {
+                        case EnumPosType.X1D1CX:
+                            throw new Exception("未实现一星一地类型绘制时差线");
+                            break;
+                        case EnumPosType.X2D1:
+                            Draw2X1DDtoLine(item);
+                            break;
+                        case EnumPosType.RH:
+                            throw new Exception("未实现融合类型绘制时差线");
+                            break;
+                        default:
+                            break;
+                    }
+                }
+                catch (Exception ex)
+                {
+                    this.Invoke(new Action(() => DxHelper.MsgBoxHelper.ShowWarning($"绘制时差线失败,{ex.Message}")));
+                   
+                }
+               
+            });
+        }
+
+        private void btnDrawDfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            DxHelper.MsgBoxHelper.ShowWarning("未实现");
+        }
+
+        private void btnDrawCX_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            DxHelper.MsgBoxHelper.ShowWarning("未实现");
+        }
+
+        private void btnGDOP_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            DxHelper.MsgBoxHelper.ShowWarning("未实现");
+        }
     }
 
 

+ 21 - 3
XdCxRhDW.App/UserControl/CtrlHome.resx

@@ -121,7 +121,7 @@
     <value>391, 17</value>
   </metadata>
   <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
-  <data name="buttonImageOptions4.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="buttonImageOptions10.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
         LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
@@ -140,7 +140,7 @@
         DQogIDwvZz4NCjwvc3ZnPgs=
 </value>
   </data>
-  <data name="buttonImageOptions5.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="buttonImageOptions11.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
         LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
@@ -161,7 +161,7 @@
         ICA8L2c+DQo8L3N2Zz4L
 </value>
   </data>
-  <data name="buttonImageOptions6.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="buttonImageOptions12.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
         LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
@@ -279,6 +279,24 @@
         YWNrIiAvPg0KICA8cGF0aCBkPSJNMjksMTdsLTgsOGwtNC00bDgtOEwyOSwxN3ogTTMwLDE2bDEuNy0x
         LjdjMC40LTAuNCwwLjQtMSwwLTEuM0wyOSwxMC4zYy0wLjQtMC40LTEtMC40LTEuMywwTDI2LDEyTDMw
         LDE2eiAgIE0xNiwyMnY0aDRMMTYsMjJ6IiBjbGFzcz0iQmx1ZSIgLz4NCjwvc3ZnPgs=
+</value>
+  </data>
+  <data name="btnDrawCX.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
+        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
+        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHACAAAC77u/
+        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
+        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
+        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
+        Y2U9InByZXNlcnZlIiBpZD0iUnVsZXJIb3Jpem9udGFsIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6
+        bmV3IDAgMCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmxhY2t7ZmlsbDojNzI3
+        MjcyO30KCS5ZZWxsb3d7ZmlsbDojRkZCMTE1O30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTI5LDIySDFj
+        LTAuNiwwLTEtMC41LTEtMVY5YzAtMC42LDAuNC0xLDEtMWgyOGMwLjUsMCwxLDAuNCwxLDF2MTJDMzAs
+        MjEuNSwyOS41LDIyLDI5LDIyeiIgY2xhc3M9IlllbGxvdyIgLz4NCiAgPHBhdGggZD0iTTQsMjJIMnYt
+        NmgyVjIyeiBNOCwxOEg2djRoMlYxOHogTTEyLDE2aC0ydjZoMlYxNnogTTE2LDE4aC0ydjRoMlYxOHog
+        TTIwLDE2aC0ydjZoMlYxNnogTTI0LDE4aC0ydjRoMlYxOHogICBNMjgsMTZoLTJ2NmgyVjE2eiIgY2xh
+        c3M9IkJsYWNrIiAvPg0KPC9zdmc+Cw==
 </value>
   </data>
   <metadata name="popupMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">

+ 468 - 0
XdCxRhDW.App/UserControl/X2D1GDOPParam.Designer.cs

@@ -0,0 +1,468 @@
+namespace XdCxRhDW.App.UserControl
+{
+    partial class X2D1GDOPParam
+    {
+        /// <summary> 
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Component Designer generated code
+
+        /// <summary> 
+        /// Required method for Designer support - do not modify 
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
+            this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.btnOK = new DevExpress.XtraEditors.SimpleButton();
+            this.txtCapTime = new DevExpress.XtraEditors.DateEdit();
+            this.txtStationLocation1 = new DevExpress.XtraEditors.TextEdit();
+            this.txtRefLocation1 = new DevExpress.XtraEditors.TextEdit();
+            this.txtTleMain = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.txtTleAdja = new DevExpress.XtraEditors.SearchLookUpEdit();
+            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
+            this.txtDtousErr1 = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtSatLocErr1 = new DevExpress.XtraEditors.ButtonEdit();
+            this.btnClose = new DevExpress.XtraEditors.SimpleButton();
+            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
+            this.layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
+            this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
+            this.layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties.CalendarTimeProperties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtStationLocation1.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRefLocation1.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTleMain.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTleAdja.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtDtousErr1.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSatLocErr1.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // layoutControl1
+            // 
+            this.layoutControl1.Controls.Add(this.btnOK);
+            this.layoutControl1.Controls.Add(this.txtCapTime);
+            this.layoutControl1.Controls.Add(this.txtStationLocation1);
+            this.layoutControl1.Controls.Add(this.txtRefLocation1);
+            this.layoutControl1.Controls.Add(this.txtTleMain);
+            this.layoutControl1.Controls.Add(this.txtTleAdja);
+            this.layoutControl1.Controls.Add(this.txtDtousErr1);
+            this.layoutControl1.Controls.Add(this.txtSatLocErr1);
+            this.layoutControl1.Controls.Add(this.btnClose);
+            this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.layoutControl1.Location = new System.Drawing.Point(0, 0);
+            this.layoutControl1.Margin = new System.Windows.Forms.Padding(4);
+            this.layoutControl1.Name = "layoutControl1";
+            this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(993, 379, 650, 400);
+            this.layoutControl1.Root = this.Root;
+            this.layoutControl1.Size = new System.Drawing.Size(394, 716);
+            this.layoutControl1.TabIndex = 0;
+            this.layoutControl1.Text = "layoutControl1";
+            // 
+            // btnOK
+            // 
+            this.btnOK.Location = new System.Drawing.Point(199, 389);
+            this.btnOK.Margin = new System.Windows.Forms.Padding(4);
+            this.btnOK.Name = "btnOK";
+            this.btnOK.Size = new System.Drawing.Size(193, 27);
+            this.btnOK.StyleController = this.layoutControl1;
+            this.btnOK.TabIndex = 12;
+            this.btnOK.Text = "确定";
+            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
+            // 
+            // txtCapTime
+            // 
+            this.txtCapTime.EditValue = null;
+            this.txtCapTime.Location = new System.Drawing.Point(2, 132);
+            this.txtCapTime.Margin = new System.Windows.Forms.Padding(2);
+            this.txtCapTime.MaximumSize = new System.Drawing.Size(0, 28);
+            this.txtCapTime.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtCapTime.Name = "txtCapTime";
+            this.txtCapTime.Properties.AutoHeight = false;
+            this.txtCapTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtCapTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtCapTime.Size = new System.Drawing.Size(390, 28);
+            this.txtCapTime.StyleController = this.layoutControl1;
+            this.txtCapTime.TabIndex = 8;
+            // 
+            // txtStationLocation1
+            // 
+            this.txtStationLocation1.EditValue = "";
+            this.txtStationLocation1.Location = new System.Drawing.Point(2, 186);
+            this.txtStationLocation1.Margin = new System.Windows.Forms.Padding(2);
+            this.txtStationLocation1.MaximumSize = new System.Drawing.Size(0, 28);
+            this.txtStationLocation1.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtStationLocation1.Name = "txtStationLocation1";
+            this.txtStationLocation1.Properties.AutoHeight = false;
+            this.txtStationLocation1.Size = new System.Drawing.Size(390, 28);
+            this.txtStationLocation1.StyleController = this.layoutControl1;
+            this.txtStationLocation1.TabIndex = 11;
+            this.txtStationLocation1.ToolTip = "经度纬度之间用英文逗号隔开";
+            // 
+            // txtRefLocation1
+            // 
+            this.txtRefLocation1.EditValue = "";
+            this.txtRefLocation1.Location = new System.Drawing.Point(2, 240);
+            this.txtRefLocation1.Margin = new System.Windows.Forms.Padding(2);
+            this.txtRefLocation1.MaximumSize = new System.Drawing.Size(0, 28);
+            this.txtRefLocation1.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtRefLocation1.Name = "txtRefLocation1";
+            this.txtRefLocation1.Properties.AutoHeight = false;
+            this.txtRefLocation1.Size = new System.Drawing.Size(390, 28);
+            this.txtRefLocation1.StyleController = this.layoutControl1;
+            this.txtRefLocation1.TabIndex = 10;
+            this.txtRefLocation1.ToolTip = "经度纬度之间用英文逗号隔开";
+            // 
+            // txtTleMain
+            // 
+            this.txtTleMain.EditValue = "";
+            this.txtTleMain.Location = new System.Drawing.Point(2, 24);
+            this.txtTleMain.Margin = new System.Windows.Forms.Padding(2);
+            this.txtTleMain.MaximumSize = new System.Drawing.Size(0, 28);
+            this.txtTleMain.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtTleMain.Name = "txtTleMain";
+            this.txtTleMain.Properties.AutoHeight = false;
+            this.txtTleMain.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtTleMain.Properties.NullText = "";
+            this.txtTleMain.Properties.PopupSizeable = false;
+            this.txtTleMain.Properties.PopupView = this.searchLookUpEdit1View;
+            this.txtTleMain.Size = new System.Drawing.Size(390, 28);
+            this.txtTleMain.StyleController = this.layoutControl1;
+            this.txtTleMain.TabIndex = 4;
+            this.txtTleMain.ToolTip = "填写卫星的双行根数";
+            // 
+            // searchLookUpEdit1View
+            // 
+            this.searchLookUpEdit1View.DetailHeight = 450;
+            this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
+            this.searchLookUpEdit1View.OptionsEditForm.PopupEditFormWidth = 492;
+            this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
+            // 
+            // txtTleAdja
+            // 
+            this.txtTleAdja.EditValue = "";
+            this.txtTleAdja.Location = new System.Drawing.Point(2, 78);
+            this.txtTleAdja.Margin = new System.Windows.Forms.Padding(2);
+            this.txtTleAdja.MaximumSize = new System.Drawing.Size(0, 28);
+            this.txtTleAdja.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtTleAdja.Name = "txtTleAdja";
+            this.txtTleAdja.Properties.AutoHeight = false;
+            this.txtTleAdja.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+            this.txtTleAdja.Properties.NullText = "";
+            this.txtTleAdja.Properties.PopupSizeable = false;
+            this.txtTleAdja.Properties.PopupView = this.gridView1;
+            this.txtTleAdja.Size = new System.Drawing.Size(390, 28);
+            this.txtTleAdja.StyleController = this.layoutControl1;
+            this.txtTleAdja.TabIndex = 5;
+            this.txtTleAdja.ToolTip = "填写卫星的双行根数";
+            // 
+            // gridView1
+            // 
+            this.gridView1.DetailHeight = 450;
+            this.gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+            this.gridView1.Name = "gridView1";
+            this.gridView1.OptionsEditForm.PopupEditFormWidth = 492;
+            this.gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
+            this.gridView1.OptionsView.ShowGroupPanel = false;
+            // 
+            // txtDtousErr1
+            // 
+            this.txtDtousErr1.EditValue = "";
+            this.txtDtousErr1.Location = new System.Drawing.Point(2, 294);
+            this.txtDtousErr1.Margin = new System.Windows.Forms.Padding(2);
+            this.txtDtousErr1.MaximumSize = new System.Drawing.Size(0, 28);
+            this.txtDtousErr1.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtDtousErr1.Name = "txtDtousErr1";
+            this.txtDtousErr1.Properties.AutoHeight = false;
+            this.txtDtousErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtDtousErr1.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
+            this.txtDtousErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
+            this.txtDtousErr1.Properties.MaskSettings.Set("mask", "f");
+            this.txtDtousErr1.Size = new System.Drawing.Size(390, 28);
+            this.txtDtousErr1.StyleController = this.layoutControl1;
+            this.txtDtousErr1.TabIndex = 6;
+            this.txtDtousErr1.ToolTip = "ECEF坐标X";
+            // 
+            // txtSatLocErr1
+            // 
+            this.txtSatLocErr1.EditValue = "";
+            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 348);
+            this.txtSatLocErr1.Margin = new System.Windows.Forms.Padding(2);
+            this.txtSatLocErr1.MaximumSize = new System.Drawing.Size(0, 28);
+            this.txtSatLocErr1.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtSatLocErr1.Name = "txtSatLocErr1";
+            this.txtSatLocErr1.Properties.AutoHeight = false;
+            this.txtSatLocErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtSatLocErr1.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
+            this.txtSatLocErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
+            this.txtSatLocErr1.Properties.MaskSettings.Set("mask", "f");
+            this.txtSatLocErr1.Size = new System.Drawing.Size(390, 28);
+            this.txtSatLocErr1.StyleController = this.layoutControl1;
+            this.txtSatLocErr1.TabIndex = 6;
+            this.txtSatLocErr1.ToolTip = "ECEF坐标X";
+            // 
+            // btnClose
+            // 
+            this.btnClose.Location = new System.Drawing.Point(2, 390);
+            this.btnClose.Margin = new System.Windows.Forms.Padding(2);
+            this.btnClose.Name = "btnClose";
+            this.btnClose.Size = new System.Drawing.Size(193, 27);
+            this.btnClose.StyleController = this.layoutControl1;
+            this.btnClose.TabIndex = 13;
+            this.btnClose.Text = "关闭";
+            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // Root
+            // 
+            this.Root.GroupBordersVisible = false;
+            this.Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
+            this.layoutControlItem8,
+            this.layoutControlItem9,
+            this.layoutControlItem11,
+            this.layoutControlItem14,
+            this.layoutControlItem13,
+            this.layoutControlItem4,
+            this.layoutControlItem5,
+            this.layoutControlItem1,
+            this.emptySpaceItem1,
+            this.emptySpaceItem2,
+            this.layoutControlItem2});
+            this.Root.Name = "Root";
+            this.Root.Size = new System.Drawing.Size(394, 716);
+            this.Root.TextVisible = false;
+            // 
+            // layoutControlItem8
+            // 
+            this.layoutControlItem8.Control = this.txtTleMain;
+            this.layoutControlItem8.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem8.Location = new System.Drawing.Point(0, 0);
+            this.layoutControlItem8.Name = "layoutControlItem8";
+            this.layoutControlItem8.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem8.Text = "主星星历";
+            this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem8.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem9
+            // 
+            this.layoutControlItem9.Control = this.txtTleAdja;
+            this.layoutControlItem9.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem9.Location = new System.Drawing.Point(0, 54);
+            this.layoutControlItem9.Name = "layoutControlItem9";
+            this.layoutControlItem9.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem9.Text = "邻星星历";
+            this.layoutControlItem9.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem9.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem11
+            // 
+            this.layoutControlItem11.Control = this.txtCapTime;
+            this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem11.Location = new System.Drawing.Point(0, 108);
+            this.layoutControlItem11.Name = "layoutControlItem11";
+            this.layoutControlItem11.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem11.Text = "采集时刻";
+            this.layoutControlItem11.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem11.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem14
+            // 
+            this.layoutControlItem14.Control = this.txtRefLocation1;
+            this.layoutControlItem14.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem14.Location = new System.Drawing.Point(0, 216);
+            this.layoutControlItem14.Name = "layoutControlItem14";
+            this.layoutControlItem14.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem14.Text = "参考站经纬度";
+            this.layoutControlItem14.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem14.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem13
+            // 
+            this.layoutControlItem13.Control = this.txtStationLocation1;
+            this.layoutControlItem13.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem13.Location = new System.Drawing.Point(0, 162);
+            this.layoutControlItem13.Name = "layoutControlItem13";
+            this.layoutControlItem13.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem13.Text = "超短站经纬度";
+            this.layoutControlItem13.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem13.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem4
+            // 
+            this.layoutControlItem4.Control = this.txtDtousErr1;
+            this.layoutControlItem4.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem4.CustomizationFormText = "低轨卫星X";
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 270);
+            this.layoutControlItem4.Name = "layoutControlItem4";
+            this.layoutControlItem4.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem4.Text = "时差误差";
+            this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem4.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem5
+            // 
+            this.layoutControlItem5.Control = this.txtSatLocErr1;
+            this.layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem5.CustomizationFormText = "低轨卫星X";
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 324);
+            this.layoutControlItem5.Name = "layoutControlItem5";
+            this.layoutControlItem5.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem5.Text = "星历位置误差";
+            this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem5.TextSize = new System.Drawing.Size(90, 18);
+            // 
+            // layoutControlItem1
+            // 
+            this.layoutControlItem1.Control = this.btnOK;
+            this.layoutControlItem1.Location = new System.Drawing.Point(197, 378);
+            this.layoutControlItem1.Name = "layoutControlItem1";
+            this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 11, 2);
+            this.layoutControlItem1.Size = new System.Drawing.Size(197, 41);
+            this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem1.TextVisible = false;
+            // 
+            // emptySpaceItem1
+            // 
+            this.emptySpaceItem1.AllowHotTrack = false;
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 419);
+            this.emptySpaceItem1.Name = "emptySpaceItem1";
+            this.emptySpaceItem1.Size = new System.Drawing.Size(394, 297);
+            this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
+            // 
+            // emptySpaceItem2
+            // 
+            this.emptySpaceItem2.AllowHotTrack = false;
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 378);
+            this.emptySpaceItem2.Name = "emptySpaceItem2";
+            this.emptySpaceItem2.Size = new System.Drawing.Size(197, 10);
+            this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
+            // 
+            // layoutControlItem2
+            // 
+            this.layoutControlItem2.Control = this.btnClose;
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 388);
+            this.layoutControlItem2.Name = "layoutControlItem2";
+            this.layoutControlItem2.Size = new System.Drawing.Size(197, 31);
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem2.TextVisible = false;
+            // 
+            // X2D1GDOPParam
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.layoutControl1);
+            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Name = "X2D1GDOPParam";
+            this.Size = new System.Drawing.Size(394, 716);
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
+            this.layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties.CalendarTimeProperties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtStationLocation1.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRefLocation1.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTleMain.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTleAdja.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtDtousErr1.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtSatLocErr1.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem8)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+        private DevExpress.XtraLayout.LayoutControl layoutControl1;
+        private DevExpress.XtraEditors.DateEdit txtCapTime;
+        private DevExpress.XtraEditors.TextEdit txtStationLocation1;
+        private DevExpress.XtraEditors.TextEdit txtRefLocation1;
+        private DevExpress.XtraEditors.SearchLookUpEdit txtTleMain;
+        private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View;
+        private DevExpress.XtraEditors.SearchLookUpEdit txtTleAdja;
+        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
+        private DevExpress.XtraEditors.ButtonEdit txtDtousErr1;
+        private DevExpress.XtraEditors.ButtonEdit txtSatLocErr1;
+        private DevExpress.XtraLayout.LayoutControlGroup Root;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem13;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
+        private DevExpress.XtraEditors.SimpleButton btnOK;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
+        private DevExpress.XtraEditors.SimpleButton btnClose;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
+    }
+}

+ 173 - 0
XdCxRhDW.App/UserControl/X2D1GDOPParam.cs

@@ -0,0 +1,173 @@
+using DevExpress.XtraEditors;
+using DevExpress.XtraMap;
+using DxHelper;
+using ExtensionsDev;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using XdCxRhDW.App.Model;
+using XdCxRhDW.App.EFContext;
+using System.Data.Entity;
+using System.Windows.Documents;
+using XdCxRhDW.App.Api.GDOP误差椭圆;
+namespace XdCxRhDW.App.UserControl
+{
+    public partial class X2D1GDOPParam : DevExpress.XtraEditors.XtraUserControl
+    {
+        public MapControl mapControl1;
+        public GDOP星地两星一地接口 Model => new GDOP星地两星一地接口()
+        {
+            TleMain = txtTleMain.Text.Trim(),
+            TleAdja = txtTleAdja.Text.Trim(),
+            CapTime = txtCapTime.DateTime,
+            StationLon = Convert.ToDouble(txtStationLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
+            StationLat = Convert.ToDouble(txtStationLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
+            RefLon = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
+            RefLat = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
+            DtousErr = Convert.ToDouble(txtDtousErr1.Text),
+            SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
+        };
+        public X2D1GDOPParam(DateTime sigTime)
+        {
+            InitializeComponent();
+            txtCapTime.UseDefault();
+            txtTleMain.UseDoubleClickToSelectAll();
+            txtTleAdja.UseDoubleClickToSelectAll();
+            txtStationLocation1.UseDoubleClickToSelectAll();
+            txtRefLocation1.UseDoubleClickToSelectAll();
+
+            List<TxInfo> listTx = new List<TxInfo>();
+            using (RHDWContext db = new RHDWContext())
+            {
+                listTx = db.TxInfos.ToList();
+            }
+            var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
+            if (cdbTx != null)
+            {
+                this.txtStationLocation1.Text = $"{cdbTx.Lon},{cdbTx.Lat}";
+            }
+            var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
+            if (cdbTx != null)
+            {
+                this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
+            }
+            this.txtCapTime.DateTime = sigTime;
+
+            List<XlInfo> xlList = new List<XlInfo>();
+            using (RHDWContext db = new RHDWContext())
+            {
+                var res = db.XlInfos.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ);
+                xlList.AddRange(res.ToList());
+            }
+            this.txtDtousErr1.EditValue = 1;
+            this.txtSatLocErr1.EditValue = 1000;
+            var xlall = xlList.Select(m => m.TwoLine);
+
+            if (xlall.Count() == 0) return;
+            txtTleMain.UseDefault().SetStringData(xlall);
+            txtTleAdja.UseDefault().SetStringData(xlall);
+
+            var mainSat = listTx.Find(p => p.TxType == EnumTxType.MainSat);
+            txtTleMain.Text = mainSat != null && xlList.Any(m => m.SatCode == mainSat.SatInfoID) ?
+                xlList.Find(m => m.SatCode == mainSat.SatInfoID).TwoLine : xlList.First().TwoLine;
+
+            var adjaSat = listTx.Find(p => p.TxType == EnumTxType.AdjaSat);
+            txtTleMain.Text = adjaSat != null && xlList.Any(m => m.SatCode == adjaSat.SatInfoID) ?
+               xlList.Find(m => m.SatCode == adjaSat.SatInfoID).TwoLine : xlList.First().TwoLine;
+
+        }
+
+
+
+        private void btnOK_Click(object sender, EventArgs e)
+        {
+            mapControl1.ClearMap();
+            var (listSat, data) = GdopHelper.Gdop2Sat1DRef(Model.TleMain, Model.TleAdja, Model.CapTime, new double[] { Model.StationLon, Model.StationLat, 0 },
+                              new double[] { Model.RefLon, Model.RefLat, 0 }, Model.DtousErr, Model.SatLocErr);
+            if (data == null)
+            {
+                return;
+            }
+            if (listSat != null)//画卫星
+            {
+                foreach (var sat in listSat)
+                {
+                    mapControl1.Invoke(new Action(() =>
+                    {
+                        string satCode = sat.SatCode == null ? "未知" : sat.SatCode.ToString();
+                        mapControl1.DrawFixedImg("sat", sat.SatLat, sat.SatLon, DxHelper.SvgHelper.CreateSat(), new Size(32, 32), $"卫星编号:{satCode}\r\n轨道经度:{sat.SatLon}°\r\n轨道纬度:{sat.SatLat}°");
+                        //mapControl1.DrawEllipse(sat.SatLat, sat.SatLon, 4800);
+                    }));
+                }
+            }
+            if ((Model.StationLon >= 180 || Model.StationLon <= 180) && Model.StationLat >= -90 || Model.StationLat <= 90)//画天线
+            {
+                mapControl1.Invoke(new Action(() =>
+                {
+                    mapControl1.DrawFixedImg("cdb", Model.StationLat, Model.StationLon, SvgHelper.LoadFromFile("Image\\tx.svg"), new Size(32, 32), $"超短站经度:{Model.StationLon}°\r\n超短站纬度:{Model.StationLat}°");
+                }));
+            }
+            foreach (var errLins in data)//画GDOP
+            {
+                var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
+                //mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, 1);
+            }
+        }
+        private void btnClose_Click(object sender, EventArgs e)
+        {
+            PopupHelper.HidePopup(this);
+        }
+    }
+    public class GDOP星地两星一地接口
+    {
+        /// <summary>
+        /// 主星星历(Tle)
+        /// </summary>
+        public string TleMain { get; set; }
+
+        /// <summary>
+        /// 邻星星历(Tle)
+        /// </summary>
+        public string TleAdja { get; set; }
+
+        /// <summary>
+        /// 采集时刻
+        /// </summary>
+        public DateTime CapTime { get; set; }
+
+        /// <summary>
+        /// 超短接收站-经度
+        /// </summary>
+        public double StationLon { get; set; }
+
+        /// <summary>
+        /// 超短接收站-纬度
+        /// </summary>
+        public double StationLat { get; set; }
+
+
+        /// <summary>
+        /// 参考站位置经度
+        /// </summary>
+        public double RefLon { get; set; }
+
+        /// <summary>
+        /// 参考站位置纬度
+        /// </summary>
+        public double RefLat { get; set; }
+
+        /// <summary>
+        /// 时差误差(单位us)
+        /// </summary>
+        public double DtousErr { get; set; } = 1;
+
+        /// <summary>
+        /// 星历位置误差(单位米)
+        /// </summary>
+        public double SatLocErr { get; set; } = 10000;
+
+    }
+}

+ 120 - 0
XdCxRhDW.App/UserControl/X2D1GDOPParam.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 12 - 27
XdCxRhDW.App/WebAPI/Controllers/DetectCgController.cs

@@ -13,6 +13,7 @@ using XdCxRhDW.App.CorTools;
 using System.Web;
 using Newtonsoft.Json.Linq;
 using XdCxRhDW.App.CpuCgTools;
+using static XdCxRhDW.App.WebAPI.Startup;
 namespace XdCxRhDW.App.WebAPI
 {
     /// <summary>
@@ -66,6 +67,8 @@ namespace XdCxRhDW.App.WebAPI
         [HttpPost]
         public async Task<AjaxResult<EstimationResDto>> EstimationCalc(CalcDto dto)
         {
+            dto.file1 = Path.Combine(UploadFolder, dto.file1);
+            dto.file2 = Path.Combine(UploadFolder, dto.file2);
             var vpres = ValidateCalcParam(dto);
             if (!vpres.Item1)
             {
@@ -124,7 +127,7 @@ namespace XdCxRhDW.App.WebAPI
                 File.Delete(dto.file1);
                 File.Delete(dto.file2);
             }
-            catch 
+            catch
             {
             }
             return Success(resDto);
@@ -146,12 +149,12 @@ namespace XdCxRhDW.App.WebAPI
             {
                 return (false, $"检测计算参数数据文件[{dto.file1}]不存在!");
             }
-            bool containsValue = Enum.IsDefined(typeof(DmcType), dto.dmcType); 
+            bool containsValue = Enum.IsDefined(typeof(DmcType), dto.dmcType);
             if (!containsValue)
             {
                 return (false, $"检测计算参数[dmcType]检测类型值{dto.dmcType}不存在!");
             }
-          
+
             return (true, string.Empty);
         }
 
@@ -163,6 +166,7 @@ namespace XdCxRhDW.App.WebAPI
         [HttpPost]
         public async Task<AjaxResult<IEnumerable<DetectResDto>>> DetectCalc(DetectDto dto)
         {
+            dto.file1 = Path.Combine(UploadFolder, dto.file1);
             var vpres = ValidateDetectParam(dto);
             if (!vpres.Item1)
             {
@@ -196,7 +200,7 @@ namespace XdCxRhDW.App.WebAPI
                 {
                 }
             }
-           
+
             return Success<IEnumerable<DetectResDto>>(list);
 
         }
@@ -206,7 +210,7 @@ namespace XdCxRhDW.App.WebAPI
         /// 上传文件
         /// </summary>
         /// <returns></returns>
-        [HttpPost]
+        [HttpPost, SwaggerForm]
         public async Task<AjaxResult<string>> UploadFile()
         {
             if (!Request.Content.IsMimeMultipartContent("form-data"))
@@ -215,14 +219,9 @@ namespace XdCxRhDW.App.WebAPI
             }
             var provider = new MultipartMemoryStreamProvider();
             await Request.Content.ReadAsMultipartAsync(provider);
-
-            // 创建文件夹(如果尚未存在)
-            if (!Directory.Exists(UploadFolder))
-            {
-                Directory.CreateDirectory(UploadFolder);
-            }
+            Directory.CreateDirectory(UploadFolder);
             var content = provider.Contents.First();
-            var fileName = GetFileName(content.Headers);
+            var fileName = Guid.NewGuid().ToString()+".dat";
             var fileData = await content.ReadAsByteArrayAsync();
 
             // 将文件保存到本地文件夹中
@@ -232,21 +231,7 @@ namespace XdCxRhDW.App.WebAPI
                 await fileStream.WriteAsync(fileData, 0, fileData.Length);
             }
 
-            return Success<string>(filePath);
-        }
-
-        private string GetFileName(System.Net.Http.Headers.HttpContentHeaders headers)
-        {
-            var disposition = headers.ContentDisposition;
-            var fileName = disposition.FileName.Trim('"');
-
-            // 如果 fileName 为空,则可以根据需要生成唯一的文件名
-            if (string.IsNullOrEmpty(fileName))
-            {
-                fileName = Guid.NewGuid().ToString();
-            }
-
-            return fileName;
+            return Success<string>(fileName);
         }
     }
 }

+ 58 - 0
XdCxRhDW.App/XdCxRhDW.App.csproj

@@ -189,6 +189,12 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Api\EphHelper.cs" />
+    <Compile Include="Api\GDOP误差椭圆\GdopConfig.cs" />
+    <Compile Include="Api\GDOP误差椭圆\GdopHelper.cs" />
+    <Compile Include="Api\GDOP误差椭圆\MapItem.cs" />
+    <Compile Include="Api\时差线\DrawDtoLineHelper.cs" />
+    <Compile Include="Api\时差线\DtoLineModel.cs" />
+    <Compile Include="Api\时差线\OutputHelper.cs" />
     <Compile Include="Basic\BaseVm.cs" />
     <Compile Include="Basic\BindingData.cs" />
     <Compile Include="Basic\ColorHelper.cs" />
@@ -352,6 +358,12 @@
     <Compile Include="UserControl\CtrlXl.Designer.cs">
       <DependentUpon>CtrlXl.cs</DependentUpon>
     </Compile>
+    <Compile Include="UserControl\X2D1GDOPParam.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControl\X2D1GDOPParam.Designer.cs">
+      <DependentUpon>X2D1GDOPParam.cs</DependentUpon>
+    </Compile>
     <Compile Include="WebAPI\Controllers\BaseController.cs" />
     <Compile Include="WebAPI\Controllers\DetectCgController.cs" />
     <Compile Include="WebAPI\Controllers\XlController.cs" />
@@ -468,7 +480,52 @@
     <None Include="星历推算\Tle2XYZ.exe">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
+    <EmbeddedResource Include="UserControl\X2D1GDOPParam.resx">
+      <DependentUpon>X2D1GDOPParam.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="WebAPI\Swagger.js" />
+    <Content Include="Api\GDOP误差椭圆\GDOP\args.txt" />
+    <Content Include="Api\GDOP误差椭圆\GDOP\GDOP.h" />
+    <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误差椭圆\readme.txt" />
+    <Content Include="Api\时差线\DLL_LHDW32.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Api\时差线\msvcp100.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Api\时差线\msvcr100.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Api\时差线\Newtonsoft.Json.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Api\时差线\Positioning.dll">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Api\时差线\Positioning.h">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Api\时差线\XingDiSCX.exe">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Image\DfoLine.svg">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Image\DtoLine.svg">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="Image\GDOP.svg">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="xcorr\dmc.exe">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
@@ -477,6 +534,7 @@
     </Content>
     <Content Include="定位.ico" />
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Import Project="packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
   <Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.118.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />