Browse Source

Merge branch 'master' of http://139.155.15.221:3000/zoulei/XdCxRhDW

zoulei 1 year ago
parent
commit
306f2fa171

BIN
Service/CheckServer/AddIns/SignalProc.dll


+ 1 - 1
Service/CheckServer/AddIns/SignalProc.h

@@ -30,5 +30,5 @@ extern "C"
 	/// ffcs	: ÐÅºÅÆµÆ«ÒÆ
 	/// len		: ÐźŸöÊý
 	///
-	SignalProc_EXPORT void SigalEst(char *fileIn, __int64 fsample, int *pos, int *count, int *modes, double *rates, double *ffcs, int len);
+	SignalProc_EXPORT void SigalEst(char *fileIn, __int64 fsample, int *pos, int *count, int *modes, double *rates, double *ffcs, double *snrs, int len);
 };

BIN
Service/CheckServer/AddIns/SignalProc.lib


+ 9 - 2
Service/CheckServer/AddIns/SignalProcHelper.cs

@@ -13,7 +13,7 @@ namespace CheckServer
 
         #region cpp dll Interop 
         [DllImport(dll, EntryPoint = "SigalEst", CallingConvention = CallingConvention.Cdecl)]
-        private extern static void SigalEst(string file, long fsHz, int[] smpStart, int[] smpCount, int[] modes, double[] rates, double[] ffcs, int len);
+        private extern static void SigalEst(string file, long fsHz, int[] smpStart, int[] smpCount, int[] modes, double[] rates, double[] ffcs, double[] snrs, int len);
         #endregion
 
         static List<int> list1 = new List<int>();
@@ -32,7 +32,8 @@ namespace CheckServer
             int[] modes = new int[sigCount];//信号模式
             double[] rates = new double[sigCount];//调制速率
             double[] ffcs = new double[sigCount];//信号频偏Hz
-            SigalEst(file, fsHz, smpStart, smpCount, modes, rates, ffcs, sigCount);
+            double[] snrs = new double[sigCount];//信号信噪比dB
+            SigalEst(file, fsHz, smpStart, smpCount, modes, rates, ffcs, snrs, sigCount);
             List<SignalProcRes> list = new List<SignalProcRes>();
             for (int i = 0; i < modes.Length; i++)
             {
@@ -41,6 +42,7 @@ namespace CheckServer
                     SignalType = (EnumSignalType)modes[i],
                     Ffc = Math.Round(ffcs[i], 2),
                     Rate = Math.Round(rates[i], 2),
+                    Snr= Math.Round(snrs[i], 2),
                 };
                 list.Add(item);
             }
@@ -65,6 +67,11 @@ namespace CheckServer
         /// 频偏
         /// </summary>
         public double Ffc { get; set; }
+
+        /// <summary>
+        /// 信号信噪比
+        /// </summary>
+        public double Snr { get; set; }
     }
 
     public enum EnumSignalType

+ 1 - 0
Service/CheckServer/Controllers/CheckController.cs

@@ -160,6 +160,7 @@ namespace CheckServer.Controllers
                     {
                         SignalProcResDto resItem = new SignalProcResDto()
                         {
+                            Snr=item.Snr,
                             Ffc = item.Ffc,
                             Rate = item.Rate,
                             ModType = (EnumSignalTypeDto)(int)item.SignalType

+ 80 - 173
XdCxRhDW.Api/AddIns/GDOP误差椭圆/GDOPAPi.cs

@@ -13,26 +13,7 @@ namespace XdCxRhDW.Api
 
         private const string ErrellipDll = @"AddIns\GDOP误差椭圆\DLL_GDOP_Analysis0415";
 
-        ///
-        /// 获取三星双时差GDOP  带参考
-        /// mainLines :主星历双行
-        /// adaj1Lines :邻星历双行 
-        /// adaj2Lines :邻星历双行 
-        /// captime:信号时间
-        /// refPos: 参考经度,纬度
-        /// dtousErr: 时差误差
-        /// ephLocErr: 星历位置误差
-        /// level: gdop输出等级
-        /// levlen:level 长度
-        /// resCount:每一级的数据个数
-        /// res :数据
-        /// satllh :卫星位置
-        /// 返回值:0 成功
-        ///
-        [DllImport(GDOPDll, EntryPoint = "Gdop3SatRef", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int Gdop3SatRef(string mainLines, string adajLines, string adaj2Lines, Int64 captime, double[] refPos
-            , double dtousErr, double ephLocErr
-            , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
+        
 
         ///
         /// 获取三星双时差GDOP  带参考
@@ -55,26 +36,11 @@ namespace XdCxRhDW.Api
             , double dtousErr, double ephLocErr
             , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
-        ///
-        /// 获取三星双时差GDOP  无参考
-        /// mainLines :主星历双行
-        /// adaj1Lines :邻星历双行 
-        /// adaj2Lines :邻星历双行 
-        /// captime:信号时间
-        /// dtousErr: 时差误差
-        /// ephLocErr: 星历位置误差
-        /// level: gdop输出等级
-        /// levlen:level 长度
-        /// resCount:每一级的数据个数
-        /// res :数据
-        /// satllh :卫星位置
-        /// 返回值:0 成功
-        ///
-        [DllImport(GDOPDll, EntryPoint = "Gdop3SatNoRef", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int Gdop3SatNoRef(string mainLines, string adajLines, string adaj2Lines, Int64 captime
-            , double dtousErr, double ephLocErr
-            , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
+        [DllImport(GDOPDll, EntryPoint = "Gdop3SatRefByXyz_new", CallingConvention = CallingConvention.Cdecl)]
 
+        public static extern int Gdop3SatRefByXyz_new(double[] mainxyz, double[] adaj1xyz, double[] adaj2xyz, double[] refPos
+           , double dtousErr, double ephLocErr
+           , double[] level, int levlen, int[] resCount, out IntPtr lpoints, out IntPtr res, double[] satllh);
 
         ///
         /// 获取三星双时差GDOP  无参考
@@ -96,30 +62,12 @@ namespace XdCxRhDW.Api
             , double dtousErr, double ephLocErr
             , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
-        ///
-        /// 获取双星GDOP
-        /// mainLines :主星历双行
-        /// adajLines :邻星历双行 
-        /// captime:信号时间
-        /// refPos: 参考经度,纬度
-        /// fuHz1: 主上行
-        /// fuHz2: 邻上行
-        /// dtousErr: 时差误差
-        /// dfoHzErr: 频差误差
-        /// ephLocErr: 星历位置误差
-        /// ephVLocErr: 星历速度误差
-        /// level: gdop输出等级
-        /// levlen:level 长度
-        /// resCount:每一级的数据个数
-        /// res :数据
-        /// satllh :卫星位置
-        /// 返回值:0 成功
-        ///
-        [DllImport(GDOPDll, EntryPoint = "Gdop2SatDRef", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int Gdop2SatDRef(string mainLines, string adajLines, Int64 captime, double[] refPos
-            , double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr
-           , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
+        [DllImport(GDOPDll, EntryPoint = "Gdop3SatNoRefByXyz_new", CallingConvention = CallingConvention.Cdecl)]
+
+        public static extern int Gdop3SatNoRefByXyz_new(double[] mainxyz, double[] adaj1xyz, double[] adaj2xyz
+          , double dtousErr, double ephLocErr
+          , double[] level, int levlen, int[] resCount, out IntPtr lpoints, out IntPtr res, double[] satllh);
 
         ///
         /// 获取双星GDOP
@@ -144,30 +92,10 @@ namespace XdCxRhDW.Api
             , double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr
             , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
-        ///
-        /// 获取三星双频差GDOP
-        /// mainLines :主星历双行
-        /// adaj1Lines :邻星历双行 
-        /// adaj2Lines :邻星历双行 
-        /// captime:信号时间
-        /// refPos: 参考经度,纬度
-        /// fuHz1: 主上行
-        /// fuHz2: 邻上行
-        /// dfo_err: 频差误差
-        /// eph_pos_err: 星历位置误差
-        /// eph_vel_err: 星历速度误差
-        /// level: gdop输出等级
-        /// levlen:level 长度
-        /// resCount:每一级的数据个数
-        /// res :数据
-        /// satllh :卫星位置
-        /// 返回值:0 成功
-        ///
-        [DllImport(GDOPDll, EntryPoint = "Gdop3SatDF", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int Gdop3SatDF(string mainLines, string adajLines, string adaj2Lines, Int64 captime, double[] refPos
-            , double fuHz1, double fuHz2, double dfo_err, double eph_pos_err, double eph_vel_err
-            , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
-
+        [DllImport(GDOPDll, EntryPoint = "Gdop2SatDRefByXyz_new", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int Gdop2SatDRefByXyz_new(double[] mainxyz, double[] adajxyz, double[] refPos
+            , double fuHz1, double fuHz2, double dtousErr, double dfoHzErr, double ephLocErr, double ephVLocErr
+            , double[] level, int levlen, int[] resCount, out IntPtr lpoints, out IntPtr res, double[] satllh);
 
         ///
         /// 获取三星双频差GDOP
@@ -192,28 +120,12 @@ namespace XdCxRhDW.Api
         public static extern int Gdop3SatDFByXyz(double[] mainxyz, double[] adaj1xyz, double[] adaj2xyz, double[] refPos
             , double fuHz1, double fuHz2, double dfo_err, double eph_pos_err, double eph_vel_err
             , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
-        /// <returns></returns>
-        ///
-        /// 获取2X1D GDOP
-        /// mainLines :主星历双行
-        /// adajLines :邻星历双行 
-        /// captime:信号时间
-        /// cdbPos: 地面站经度,纬度
-        /// refPos: 参考经度,纬度
-        /// dtousErr: 时差误差
-        /// ephLocErr: 星历位置误差
-        /// level: gdop输出等级
-        /// levlen:level 长度
-        /// resCount:每一级的数据个数
-        /// res :数据
-        /// satllh :卫星位置  长度6
-        /// 返回值:0 成功
-        ///
-        [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DRef", 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, EntryPoint = "Gdop3SatDFByXyz_new", CallingConvention = CallingConvention.Cdecl)]
+
+        public static extern int Gdop3SatDFByXyz_new(double[] mainxyz, double[] adaj1xyz, double[] adaj2xyz, double[] refPos
+          , double fuHz1, double fuHz2, double dfo_err, double eph_pos_err, double eph_vel_err
+          , double[] level, int levlen, int[] resCount, out IntPtr lpoints, out IntPtr res, double[] satllh);
 
         ///
         /// 获取2X1D GDOP
@@ -236,26 +148,10 @@ namespace XdCxRhDW.Api
             , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
 
-
-        ///
-        /// 获取2X1D no ref GDOP
-        /// mainLines :主星历双行
-        /// adajLines :邻星历双行 
-        /// captime:信号时间
-        /// cdbPos: 地面站经度,纬度
-        /// dtousErr: 时差误差
-        /// ephLocErr: 星历位置误差
-        /// level: gdop输出等级
-        /// levlen:level 长度
-        /// resCount:每一级的数据个数
-        /// res :数据
-        /// satllh :卫星位置  长度6
-        /// 返回值:0 成功
-        ///
-        [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DNoRef", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int Gdop2Sat1DNoRef(string mainLines, string adajLines, Int64 captime, double[] cdbPos,
-            double dtousErr, double ephLocErr
-        , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
+        [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DRefByXyz_new", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int Gdop2Sat1DRefByXyz_new(double[] mainxyz, double[] adajxyz, double[] cdbPos
+        , double[] refPos, double dtousErr, double ephLocErr
+        , double[] level, int levlen, int[] resCount, out IntPtr lpoints, out IntPtr res, double[] satllh);
 
 
         ///
@@ -277,27 +173,11 @@ namespace XdCxRhDW.Api
             , double dtousErr, double ephLocErr
             , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
-        ///
-        /// 获取XD_CX ref GDOP
-        /// mainLines :主星历双行
-        /// captime:信号时间
-        /// cdbPos: 地面站经度,纬度
-        /// cxPos: 侧向站经度,纬度
-        /// refPos: 参考经度,纬度
-        /// dto_err: 时差误差
-        /// doa_err: 侧向误差
-        /// eph_err: 星历位置误差
-        /// level: gdop输出等级
-        /// levlen:level 长度
-        /// resCount:每一级的数据个数
-        /// res :数据
-        /// satllh :卫星位置  长度6
-        /// 返回值:0 成功
-        ///
-        [DllImport(GDOPDll, EntryPoint = "GdopXDCXRef", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int GdopXDCXRef(string mainLines, Int64 captime, double[] cdbPos, double[] cxPos, double[] refPos
-            , double dtoErr, double doaErr, double ephLocErr
-            , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
+        [DllImport(GDOPDll, EntryPoint = "Gdop2Sat1DNoRefByXyz_new", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int Gdop2Sat1DNoRefByXyz_new(double[] mainxyz, double[] adajxyz, double[] cdbPos
+        , double dtousErr, double ephLocErr
+        , double[] level, int levlen, int[] resCount, out IntPtr lpoints, out IntPtr res, double[] satllh);
+       
         ///
         /// 获取XD_CX ref GDOP
         /// mainxyz :xyz vx vy vz
@@ -320,10 +200,15 @@ namespace XdCxRhDW.Api
     , double dto_err, double doa_err, double eph_err
     , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
+        [DllImport(GDOPDll, EntryPoint = "GdopXDCXRefByXyz_new", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int GdopXDCXRefByXyz_new(double[] mainxyz, double[] cdbPos, double[] cxPos, double[] refPos
+        , double dto_err, double doa_err, double eph_err
+        , double[] level, int levlen, int[] resCount, out IntPtr lpoints, out IntPtr res, double[] satllh);
+
+
         ///
         /// 获取XD_CX no ref GDOP
-        /// mainLines :主星历双行
-        /// captime:信号时间
+        /// mainxyz :xyz vx vy vz
         /// cdbPos: 地面站经度,纬度
         /// cxPos: 侧向站经度,纬度
         /// refPos: 参考经度,纬度
@@ -337,9 +222,10 @@ namespace XdCxRhDW.Api
         /// satllh :卫星位置  长度6
         /// 返回值:0 成功
         ///
-        [DllImport(GDOPDll, EntryPoint = "GdopXDCXNoRef", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int GdopXDCXNoRef(string mainLines, Int64 captime, double[] cdbPos, double[] cxPos
-            , double dtousErr, double doaErr, double ephLocErr, double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
+        [DllImport(GDOPDll, EntryPoint = "GdopXDCXNoRefByXyz", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int GdopXDCXNoRefByXyz(double[] mainxyz, double[] cdbPos, double[] cxPos
+            , double dto_err, double doa_err, double eph_err
+            , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
 
 
         ///
@@ -358,27 +244,12 @@ namespace XdCxRhDW.Api
         /// satllh :卫星位置  长度6
         /// 返回值:0 成功
         ///
-        [DllImport(GDOPDll, EntryPoint = "GdopXDCXNoRefByXyz", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int GdopXDCXNoRefByXyz(double[] mainxyz, double[] cdbPos, double[] cxPos
-            , double dto_err, double doa_err, double eph_err
-            , double[] level, int levlen, int[] resCount, out IntPtr res, double[] satllh);
+        [DllImport(GDOPDll, EntryPoint = "GdopXDCXNoRefByXyz_new", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int GdopXDCXNoRefByXyz_new(double[] mainxyz, double[] cdbPos, double[] cxPos
+           , double dto_err, double doa_err, double eph_err
+           , double[] level, int levlen, int[] resCount, out IntPtr lpoints, out IntPtr res, double[]satllh);
+
 
-        ///
-        /// 获取XD_CX no ref GDOP
-        /// cx1Pos: 侧向站经度,纬度
-        /// cx2Pos: 侧向站经度,纬度
-        /// doa_err1: 侧向1误差
-        /// doa_err2: 侧向2误差
-        /// level: gdop输出等级
-        /// levlen:level 长度
-        /// resCount:每一级的数据个数
-        /// res :数据
-        /// satllh :卫星位置  长度6
-        /// 返回值:0 成功
-        ///
-        [DllImport(GDOPDll, EntryPoint = "Gdop2CX", CallingConvention = CallingConvention.Cdecl)]
-        public static extern int Gdop2CX(double[] cx1Pos, double[] cx2Pos
-            , double doaErr1, double doaErr2, double[] level, int levlen, int[] resCount, out IntPtr res);
 
         ///
         /// XD时差线
@@ -397,6 +268,23 @@ namespace XdCxRhDW.Api
             double target_dto, double ref_dto,ref int resCount, out IntPtr res);
 
 
+        ///
+        /// XD时差线
+        /// main_sat_pos 卫星星历 xyz
+        /// mbwx_rec_pos 目标接收站位置 llh
+        /// ckwx_rec_pos 参考接收站位置 llh
+        /// cdb_rec_pos 地面接收站位置 llh
+        /// ref_pos 参考位置 llh
+        /// target_dto 目标时差 llh
+        /// ref_dto 参考时差 llh
+        /// linecount 线条数
+        /// reslen 线条数对应点数
+        /// res 总点数
+        ///
+        [DllImport(GDOPDll, EntryPoint = "SCX_XD_new", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int SCX_XD_new(double[] mainxyz, double[] mbrecPos, double[] ckrefPos, double[] cdbPos, double[] refPos,
+            double target_dto, double ref_dto,ref int linecount, out IntPtr reslen,out IntPtr res);
+
         ///
         /// XD时差线
         /// main_sat_pos 卫星星历 xyz
@@ -412,6 +300,25 @@ namespace XdCxRhDW.Api
             double target_dto,ref int resCount, out IntPtr res);
 
 
+        ///
+        /// XD时差线
+        /// main_sat_pos 卫星星历 xyz
+        /// mbwx_rec_pos 目标接收站位置 llh
+        /// cdb_rec_pos 地面接收站位置 llh
+        /// target_dto 目标时差 llh
+        /// ref_dto 参考时差 llh
+        /// reslen 时差线个数
+        /// res 值
+        ///
+        [DllImport(GDOPDll, EntryPoint = "SCX_XD_NoRef_new", CallingConvention = CallingConvention.Cdecl)]
+        public static extern int SCX_XD_NoRef_new(double[] mainxyz, double[] mbrecPos, double[] cdbPos,
+            double target_dto, ref int linecount, out IntPtr reslen, out IntPtr res);
+
+
+        //GDOP_EXPORT int SCX_XD_NoRef_new(double* main_sat_pos, double* mbwx_rec_pos, double* cdb_rec_pos,
+        //double target_dto, int* linecount, int** reslen, double** res);
+
+
         [DllImport(GDOPDll, EntryPoint = "FreeGDOPBuf", CallingConvention = CallingConvention.Cdecl)]
         public static extern void FreeGDOPBuf(IntPtr val);
 

+ 125 - 192
XdCxRhDW.Api/AddIns/GDOP误差椭圆/GdopHelper.cs

@@ -2,6 +2,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection.Emit;
 using System.Runtime.InteropServices;
 
 namespace XdCxRhDW.Api
@@ -11,36 +12,36 @@ namespace XdCxRhDW.Api
 
         static readonly DateTime dtZero = new DateTime(1970, 1, 1, 8, 0, 0, 0);
 
+
         /// <summary>
         /// 两星一地GDOP 无参时参考位置不赋值
         /// </summary>
-        /// <param name="mainLines">主星星历</param>
-        /// <param name="adajLines">邻星星历</param>
-        /// <param name="captime">信号时间</param>
+        /// <param name="mainEph">主星星历 x y z vx vy vz</param>
+        /// <param name="adajEph">邻星星历x y z vx vy vz</param>
         /// <param name="cdbPos">超短波位置 3</param>
         /// <param name="refPos">参考站位置 3</param>
         /// <param name="dtousErr">时差误差</param>
         /// <param name="ephLocErr">星历误差</param>
+        /// <param name="refPos"></param>
         /// <returns></returns>
-        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop2Sat1D(string mainLines, string adajLines, DateTime captime, double[] cdbPos, double dtousErr, double ephLocErr, double[] refPos = null)
+        public static List<ErrDistanceMapPoints> Gdop2Sat1DByXyz(double[] mainEph, double[] adajEph, double[] cdbPos, double dtousErr, double ephLocErr, double[] refPos = null)
         {
             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];
             if (refPos == null || refPos.Length == 0)
             {
-                GDOPApi.Gdop2Sat1DNoRef(mainLines, adajLines, timeSpan, cdbPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.Gdop2Sat1DNoRefByXyz(mainEph, adajEph, cdbPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
 
             }
             else
             {
 
-                GDOPApi.Gdop2Sat1DRef(mainLines, adajLines, timeSpan, cdbPos, refPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.Gdop2Sat1DRefByXyz(mainEph, adajEph, cdbPos, refPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
 
             }
 
@@ -57,7 +58,6 @@ namespace XdCxRhDW.Api
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -67,9 +67,10 @@ namespace XdCxRhDW.Api
                 errDistanceMap.MapDots.AddRange(ParseResult(points[i]));
                 errs.Add(errDistanceMap);
             }
-            return (satInfos, errs);
+            return errs;
         }
 
+
         /// <summary>
         /// 两星一地GDOP 无参时参考位置不赋值
         /// </summary>
@@ -81,7 +82,7 @@ namespace XdCxRhDW.Api
         /// <param name="ephLocErr">星历误差</param>
         /// <param name="refPos"></param>
         /// <returns></returns>
-        public static  List<ErrDistanceMapPoints> Gdop2Sat1DByXyz(double[] mainEph, double[] adajEph, double[] cdbPos, double dtousErr, double ephLocErr, double[] refPos = null)
+        public static List<ErrDistanceMapPoints> Gdop2Sat1DByXyzNew(double[] mainEph, double[] adajEph, double[] cdbPos, double dtousErr, double ephLocErr, double[] refPos = null)
         {
             int satCount = 2;
             //该值和points 一一对应
@@ -89,43 +90,67 @@ namespace XdCxRhDW.Api
             double[] satllh = new double[satCount * 3];
 
             IntPtr res = IntPtr.Zero;
+            IntPtr lpoints = IntPtr.Zero;
             int[] resCount = new int[level.Length];
             if (refPos == null || refPos.Length == 0)
             {
-                GDOPApi.Gdop2Sat1DNoRefByXyz(mainEph, adajEph, cdbPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.Gdop2Sat1DNoRefByXyz_new(mainEph, adajEph, cdbPos, dtousErr, ephLocErr, level, level.Length, resCount, out lpoints, out res, satllh);
 
             }
             else
             {
 
-                GDOPApi.Gdop2Sat1DRefByXyz(mainEph, adajEph, cdbPos, refPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.Gdop2Sat1DRefByXyz_new(mainEph, adajEph, cdbPos, refPos, dtousErr, ephLocErr, level, level.Length, resCount, out lpoints, out res, satllh);
 
             }
 
+           var errs= ToErrDistanceMapPoints(level,resCount,lpoints,res);
+            GDOPApi.FreeGDOPBuf(res);
+            GDOPApi.FreeGDOPBuf(lpoints);
+            return errs;
+        }
+        private static List<ErrDistanceMapPoints> ToErrDistanceMapPoints(double[] level,int[] resCount, IntPtr lpoints, IntPtr res)
+        {
+            int total = resCount.Sum(r => r);
+            int[] Points_Value = new int[total];
+            Marshal.Copy(lpoints, Points_Value, 0, Points_Value.Length);
 
-            IntPtr tmp = res;
+            int totalPoint = Points_Value.Sum(p => p);
+            double[] LOP_Value = new double[totalPoint * 2];
+            Marshal.Copy(res, LOP_Value, 0, LOP_Value.Length);
 
+            var points = ParseResult(LOP_Value);
             //用于绘制的数据
-            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);
-            }
-            GDOPApi.FreeGDOPBuf(res);
+
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
-            for (int i = 0; i < points.Count; i++)
+
+            int skippointcount = 0;
+            int skipcount = 0;
+            int count = 0;
+            for (int idx = 0; idx < level.Length; ++idx)
             {
-                if (!points[i].Any()) continue;
-                ErrDistanceMapPoints errDistanceMap = new ErrDistanceMapPoints();
-                errDistanceMap.ErrDistance = level[i];
-                errDistanceMap.MapDots.AddRange(ParseResult(points[i]));
-                errs.Add(errDistanceMap);
+                int levelcount = resCount[idx];
+                skipcount = idx == 0 ? 0 : skipcount + resCount[idx - 1];
+                for (int i = skipcount; i < levelcount + skipcount; i++)
+                {
+                    int pointcount = Points_Value[i];
+                    skippointcount = count == 0 ? 0 : skippointcount + Points_Value[i - 1];
+                    var mapDots = points.Skip(skippointcount).Take(pointcount);
+                    if (!mapDots.Any()) continue;
+                    ErrDistanceMapPoints errDistanceMap = new ErrDistanceMapPoints();
+                    errDistanceMap.ErrDistance = level[idx];
+                    errDistanceMap.MapDots.AddRange(mapDots);
+                    errs.Add(errDistanceMap);
+                    count++;
+                }
+
             }
-            return  errs;
+
+            return errs;
         }
+
+
+
         /// <summary>
         /// 一星一地GDOP 
         /// </summary>
@@ -138,23 +163,23 @@ namespace XdCxRhDW.Api
         /// <param name="ephLocErr">星历误差</param>
         /// <param name="refPos">参考站位置 3</param>
         /// <returns></returns>
-        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop1Sat1D(string mainLines, DateTime captime, double[] cdbPos, double[] cxPos, double dtousErr, double doaErr, double ephLocErr, double[] refPos = null)
+        public static List<ErrDistanceMapPoints> Gdop1Sat1DByXyz(double[] mainEph, double[] cdbPos, double[] cxPos, double dtousErr, double doaErr, double ephLocErr, double[] refPos = null)
         {
             int satCount = 1;
             //该值和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];
             if (refPos == null || refPos.Length == 0)
             {
-                GDOPApi.GdopXDCXNoRef(mainLines, timeSpan, cdbPos, cxPos, dtousErr, doaErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.GdopXDCXNoRefByXyz(mainEph, cdbPos, cxPos, dtousErr, doaErr, ephLocErr, level, level.Length, resCount, out res, satllh);
             }
             else
             {
-                GDOPApi.GdopXDCXRef(mainLines, timeSpan, cdbPos, cxPos, refPos, dtousErr, doaErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.GdopXDCXRefByXyz(mainEph, cdbPos, cxPos, refPos, dtousErr, doaErr, ephLocErr, level, level.Length, resCount, out res, satllh);
             }
             IntPtr tmp = res;
 
@@ -168,7 +193,6 @@ namespace XdCxRhDW.Api
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -178,10 +202,10 @@ namespace XdCxRhDW.Api
                 errDistanceMap.MapDots.AddRange(ParseResult(points[i]));
                 errs.Add(errDistanceMap);
             }
-            return (satInfos, errs);
+            return errs;
         }
 
-        public static  List<ErrDistanceMapPoints> Gdop1Sat1DByXyz(double[] mainEph, double[] cdbPos, double[] cxPos, double dtousErr, double doaErr, double ephLocErr, double[] refPos = null)
+        public static List<ErrDistanceMapPoints> Gdop1Sat1DByXyzNew(double[] mainEph, double[] cdbPos, double[] cxPos, double dtousErr, double doaErr, double ephLocErr, double[] refPos = null)
         {
             int satCount = 1;
             //该值和points 一一对应
@@ -190,58 +214,41 @@ namespace XdCxRhDW.Api
 
 
             IntPtr res = IntPtr.Zero;
+            IntPtr lpoints = IntPtr.Zero;
             int[] resCount = new int[level.Length];
             if (refPos == null || refPos.Length == 0)
             {
-                GDOPApi.GdopXDCXNoRefByXyz(mainEph, cdbPos, cxPos, dtousErr, doaErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.GdopXDCXNoRefByXyz_new(mainEph, cdbPos, cxPos, dtousErr, doaErr, ephLocErr, level, level.Length, resCount,out lpoints, out res, satllh);
             }
             else
             {
-                GDOPApi.GdopXDCXRefByXyz(mainEph, cdbPos, cxPos, refPos, dtousErr, doaErr, 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);
+                GDOPApi.GdopXDCXRefByXyz_new(mainEph, cdbPos, cxPos, refPos, dtousErr, doaErr, ephLocErr, level, level.Length, resCount,out lpoints, out res, satllh);
             }
+            var errs = ToErrDistanceMapPoints(level, resCount, lpoints, res);
             GDOPApi.FreeGDOPBuf(res);
-            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  errs;
+            GDOPApi.FreeGDOPBuf(lpoints);
+            return errs;
         }
 
-        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop3Sat(string mainLines, string adajLines, string adajLines2,
-            DateTime captime, double dtousErr, double ephLocErr, double[] refPos = null)
+        public static List<ErrDistanceMapPoints> Gdop3SatByXyz(double[] mainEph, double[] adaj1Eph, double[] adaj2Eph,
+         double dtousErr, double ephLocErr, double[] refPos = null)
         {
             int satCount = 3;
             //该值和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];
             if (refPos == null || refPos.Length == 0)
             {
-                GDOPApi.Gdop3SatNoRef(mainLines, adajLines, adajLines2, timeSpan, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.Gdop3SatNoRefByXyz(mainEph, adaj1Eph, adaj2Eph, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
 
             }
             else
             {
-                GDOPApi.Gdop3SatRef(mainLines, adajLines, adajLines2, timeSpan, refPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.Gdop3SatRefByXyz(mainEph, adaj1Eph, adaj2Eph, refPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
 
             }
 
@@ -258,7 +265,6 @@ namespace XdCxRhDW.Api
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines, adajLines2);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -268,66 +274,52 @@ namespace XdCxRhDW.Api
                 errDistanceMap.MapDots.AddRange(ParseResult(points[i]));
                 errs.Add(errDistanceMap);
             }
-            return (satInfos, errs);
+            return errs;
         }
-        public static List<ErrDistanceMapPoints> Gdop3SatByXyz(double[] mainEph, double[] adaj1Eph, double[] adaj2Eph,
-         double dtousErr, double ephLocErr, double[] refPos = null)
+
+
+        public static List<ErrDistanceMapPoints> Gdop3SatByXyzNew(double[] mainEph, double[] adaj1Eph, double[] adaj2Eph,
+       double dtousErr, double ephLocErr, double[] refPos = null)
         {
             int satCount = 3;
             //该值和points 一一对应
             double[] level = GdopParam.误差配置.误差距离m;
             double[] satllh = new double[satCount * 3];
 
-          
+
             IntPtr res = IntPtr.Zero;
+
+            IntPtr lpoints = IntPtr.Zero;
             int[] resCount = new int[level.Length];
             if (refPos == null || refPos.Length == 0)
             {
-                GDOPApi.Gdop3SatNoRefByXyz(mainEph, adaj1Eph, adaj2Eph, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.Gdop3SatNoRefByXyz_new(mainEph, adaj1Eph, adaj2Eph, dtousErr, ephLocErr, level, level.Length, resCount,out lpoints, out res, satllh);
 
             }
             else
             {
-                GDOPApi.Gdop3SatRefByXyz(mainEph, adaj1Eph, adaj2Eph, refPos, dtousErr, ephLocErr, level, level.Length, resCount, out res, satllh);
+                GDOPApi.Gdop3SatRefByXyz_new(mainEph, adaj1Eph, adaj2Eph, refPos, dtousErr, ephLocErr, level, level.Length, resCount, out lpoints, 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);
-            }
+            var errs = ToErrDistanceMapPoints(level, resCount, lpoints, res);
             GDOPApi.FreeGDOPBuf(res);
-            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  errs;
+            GDOPApi.FreeGDOPBuf(lpoints);
+            return errs;
         }
-        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop3SatDF(string mainLines, string adajLines, string adajLines2,
-          DateTime captime, double fuHz1, double fuHz2, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
+
+
+        public static List<ErrDistanceMapPoints> Gdop3SatDFByXyz(double[] mainEph, double[] adaj1Eph, double[] adaj2Eph,
+          double fuHz1, double fuHz2, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
         {
             int satCount = 3;
             //该值和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];
-            GDOPApi.Gdop3SatDF(mainLines, adajLines, adajLines2, timeSpan, refPos, fuHz1, fuHz2, dfoErr, ephLocErr, ephVErr, level, level.Length, resCount, out res, satllh);
+            GDOPApi.Gdop3SatDFByXyz(mainEph, adaj1Eph, adaj2Eph, refPos, fuHz1, fuHz2, dfoErr, ephLocErr, ephVErr, level, level.Length, resCount, out res, satllh);
 
             IntPtr tmp = res;
 
@@ -341,7 +333,6 @@ namespace XdCxRhDW.Api
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines, adajLines2);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -351,21 +342,20 @@ namespace XdCxRhDW.Api
                 errDistanceMap.MapDots.AddRange(ParseResult(points[i]));
                 errs.Add(errDistanceMap);
             }
-            return (satInfos, errs);
+            return errs;
         }
 
-        public static List<ErrDistanceMapPoints> Gdop3SatDFByXyz(double[] mainEph, double[] adaj1Eph, double[] adaj2Eph,
-          double fuHz1, double fuHz2, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
+        public static List<ErrDistanceMapPoints> Gdop2SatDRefByXyz(double[] mainEph, double[] adajEph, double fuHz1, double fuHz2, double dtousErr, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
         {
-            int satCount = 3;
+            int satCount = 2;
             //该值和points 一一对应
             double[] level = GdopParam.误差配置.误差距离m;
             double[] satllh = new double[satCount * 3];
 
-           
+
             IntPtr res = IntPtr.Zero;
             int[] resCount = new int[level.Length];
-            GDOPApi.Gdop3SatDFByXyz(mainEph, adaj1Eph, adaj2Eph, refPos, fuHz1, fuHz2, dfoErr, ephLocErr, ephVErr, level, level.Length, resCount, out res, satllh);
+            GDOPApi.Gdop2SatDRefByXyz(mainEph, adajEph, refPos, fuHz1, fuHz2, dtousErr, dfoErr, ephLocErr, ephVErr, level, level.Length, resCount, out res, satllh);
 
             IntPtr tmp = res;
 
@@ -388,48 +378,44 @@ namespace XdCxRhDW.Api
                 errDistanceMap.MapDots.AddRange(ParseResult(points[i]));
                 errs.Add(errDistanceMap);
             }
-            return  errs;
+            return errs;
+        }
+        private static List<(double lon, double lat)> ParseResult(double[] ponits)
+        {
+            List<(double lon,double lat)> mapDots = new List<(double lon, double lat)>();
+            int count = 2;
+            for (int i = 0; i < ponits.Length / count; i++)
+            {
+                var Lon = ponits[count * i];
+                var Lat = ponits[count * i + 1];//0 1  2  3  4 5 6 7
+                mapDots.Add((Lon, Lat));
+            }
+            return mapDots;
+
         }
 
-        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop2SatDRef(string mainLines, string adajLines,
-      DateTime captime, double fuHz1, double fuHz2, double dtousErr, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
+
+        public static List<ErrDistanceMapPoints> Gdop3SatDFByXyzNew(double[] mainEph, double[] adaj1Eph, double[] adaj2Eph,
+    double fuHz1, double fuHz2, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
         {
-            int satCount = 2;
+            int satCount = 3;
             //该值和points 一一对应
             double[] level = GdopParam.误差配置.误差距离m;
             double[] satllh = new double[satCount * 3];
 
-            var timeSpan = (long)(captime - dtZero).TotalSeconds;
+
             IntPtr res = IntPtr.Zero;
+            IntPtr lpoints = IntPtr.Zero;
             int[] resCount = new int[level.Length];
-            GDOPApi.Gdop2SatDRef(mainLines, adajLines, timeSpan, refPos, fuHz1, fuHz2, dtousErr, dfoErr, ephLocErr, ephVErr, level, level.Length, resCount, out res, satllh);
-
-            IntPtr tmp = res;
+            GDOPApi.Gdop3SatDFByXyz_new(mainEph, adaj1Eph, adaj2Eph, refPos, fuHz1, fuHz2, dfoErr, ephLocErr, ephVErr, level, level.Length, resCount,out lpoints, out res, satllh);
 
-            //用于绘制的数据
-            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);
-            }
+            var errs = ToErrDistanceMapPoints(level, resCount, lpoints, res);
             GDOPApi.FreeGDOPBuf(res);
-            List<MapSatInfo> 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);
+            GDOPApi.FreeGDOPBuf(lpoints);
+            return errs;
         }
 
-        public static List<ErrDistanceMapPoints> Gdop2SatDRefByXyz(double[] mainEph, double[] adajEph, double fuHz1, double fuHz2, double dtousErr, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
+        public static List<ErrDistanceMapPoints> Gdop2SatDRefByXyzNew(double[] mainEph, double[] adajEph, double fuHz1, double fuHz2, double dtousErr, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
         {
             int satCount = 2;
             //该值和points 一一对应
@@ -438,68 +424,15 @@ namespace XdCxRhDW.Api
 
 
             IntPtr res = IntPtr.Zero;
+            IntPtr lpoints = IntPtr.Zero;
             int[] resCount = new int[level.Length];
-            GDOPApi.Gdop2SatDRefByXyz(mainEph, adajEph, refPos, fuHz1, fuHz2, dtousErr, dfoErr, ephLocErr, ephVErr, 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);
-            }
+            GDOPApi.Gdop2SatDRefByXyz_new(mainEph, adajEph, refPos, fuHz1, fuHz2, dtousErr, dfoErr, ephLocErr, ephVErr, level, level.Length, resCount, out lpoints, out res, satllh);
+            var errs = ToErrDistanceMapPoints(level, resCount, lpoints, res);
             GDOPApi.FreeGDOPBuf(res);
-            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  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.Lon = ponits[count * i];
-                mapDot.Lat = ponits[count * i + 1];//0 1  2  3  4 5 6 7
-                mapDots.Add(mapDot);
-            }
-            return mapDots;
-
+            GDOPApi.FreeGDOPBuf(lpoints);
+            return errs;
         }
 
-       
-        private static List<MapSatInfo> ParseResult(int satCount, double[] satllh, params string[] ephLine)
-        {
-
-            List<MapSatInfo> list = new List<MapSatInfo>();
-            int len = 3;
-            for (int i = 0; i < satCount; i++)
-            {
-                MapSatInfo satInfo = new MapSatInfo();
-                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;
-        }
     }
 
 }

+ 3 - 3
XdCxRhDW.Api/AddIns/GDOP误差椭圆/MapItem.cs

@@ -27,13 +27,13 @@ namespace XdCxRhDW.Api
         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 List<(double lon, double lat)> MapDots { get; set; } = new List<(double lon, double lat)>();
     }
     public class MapSatInfo
     {

+ 81 - 30
XdCxRhDW.Api/AddIns/时差线/DrawDtoLineHelper.cs

@@ -14,15 +14,6 @@ namespace XdCxRhDW.Api
     {
         private const string XdtsDll = @"AddIns\时差线\Positioning.dll";
 
-        //三星双时差带参、三星双时差无参、三星双频差带参、双星时频差带参、两星一地无参定位及时差线
-        private const string xddtodll = @"AddIns\时差线\Position-New.dll";
-
-        [DllImport(xddtodll, EntryPoint = "XingDi_SCX_NoRef", CallingConvention = CallingConvention.Cdecl)]//高轨双星有参时差线
-        public extern static void XingDi_SCX_NoRef(double[] main_sat_pos, double[] mbwx_rec_pos, double[] cdb_rec_pos,
-           double[] Zone, double target_dto, out IntPtr LOP_Value, ref int LOP_Len);
-
-
-
         [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);
@@ -114,56 +105,71 @@ namespace XdCxRhDW.Api
         }
 
         /// <summary>
-        /// 星地参时差线
+        /// 星地参时差线
         /// </summary>
         /// <param name="opt"></param>
         /// <returns></returns>
         /// <exception cref="Exception"></exception>
-        public static IEnumerable<(double lon, double lat)> DtoLineXdNoRef(DtoLineXdOption opt)
+        public static IEnumerable<(double lon, double lat)> DtoLineXdEx(DtoLineXdOption opt)
         {
-
             List<DtoLinePoint> list = new List<DtoLinePoint>();
 
             IntPtr LOP_ValuePtr;
             int LOP_Len = 0;
 
-            XingDi_SCX_NoRef(opt.MsEph, opt.MsAnt, opt.CDBAnt,
-            new double[] { -85, 85, -180, 180 }, opt.xdDto * 1e-6, out LOP_ValuePtr, ref LOP_Len);
-            double[] LOP_Value = new double[LOP_Len * 3];
+            GDOPApi.SCX_XD(opt.MsEph, opt.MsAnt, opt.MsAnt, opt.CDBAnt, opt.RefGeod, opt.xdDto * 1e-6, opt.RefDto * 1e-6, ref LOP_Len, out LOP_ValuePtr);
+            double[] LOP_Value = new double[LOP_Len];
             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;
+            GDOPApi.FreeGDOPBuf(LOP_ValuePtr);
+            var points = ParseResult(LOP_Value);
+            var mapDots = points.Select(p => p).Select(p => (p.Lon, p.Lat));
+            return mapDots;
         }
 
-
         /// <summary>
         /// 星地有参时差线
         /// </summary>
         /// <param name="opt"></param>
         /// <returns></returns>
         /// <exception cref="Exception"></exception>
-        public static IEnumerable<(double lon, double lat)> DtoLineXdEx(DtoLineXdOption opt)
+        public static IEnumerable<DtoLine> DtoLineXdNew(DtoLineXdOption opt)
         {
-            List<DtoLinePoint> list = new List<DtoLinePoint>();
+            List<DtoLine> list = new List<DtoLine>();
 
             IntPtr LOP_ValuePtr;
-            int LOP_Len = 0;
+            IntPtr ResLen;
+            int LineCount = 0;
 
-            GDOPApi.SCX_XD(opt.MsEph, opt.MsAnt, opt.MsAnt, opt.CDBAnt, opt.RefGeod, opt.xdDto * 1e-6, opt.RefDto * 1e-6, ref LOP_Len, out LOP_ValuePtr);
-            double[] LOP_Value = new double[LOP_Len];
-            if (LOP_Len > 0)
+            GDOPApi.SCX_XD_new(opt.MsEph, opt.MsAnt, opt.MsAnt, opt.CDBAnt, opt.RefGeod, opt.xdDto * 1e-6, opt.RefDto * 1e-6, ref LineCount, out ResLen, out LOP_ValuePtr);
+            int[] res_Len = new int[LineCount];
+            if (LineCount > 0)
             {
+                Marshal.Copy(ResLen, res_Len, 0, res_Len.Length);
+                int total = res_Len.Sum(r => r);
+                double[] LOP_Value = new double[total * 2];
                 Marshal.Copy(LOP_ValuePtr, LOP_Value, 0, LOP_Value.Length);
+
+                var points = ParseResult(LOP_Value);
+
+                int skipcount = 0;
+                for (int i = 0; i < LineCount; i++)
+                {
+                    int pointcount = res_Len[i];
+                    skipcount = i == 0 ? 0 : skipcount + res_Len[i-1];
+                    var mapDots=  points.Skip(skipcount).Take(pointcount);
+                    DtoLine dtoLine = new DtoLine();
+                    dtoLine.dtoLinePoints = mapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
+                    list.Add(dtoLine);
+                }
+
             }
+            GDOPApi.FreeGDOPBuf(ResLen);
             GDOPApi.FreeGDOPBuf(LOP_ValuePtr);
-            var points = ParseResult(LOP_Value);
-            var mapDots = points.Select(p => p).Select(p => (p.Lon, p.Lat));
-            return mapDots;
+
+            return list;
         }
         private static List<MapDot> ParseResult(double[] ponits)
         {
@@ -207,6 +213,51 @@ namespace XdCxRhDW.Api
             return mapDots;
         }
 
+        /// <summary>
+        /// 星地无参时差线
+        /// </summary>
+        /// <param name="opt"></param>
+        /// <returns></returns>
+        /// <exception cref="Exception"></exception>
+        public static IEnumerable<DtoLine> DtoLineXdNoRefNew(DtoLineXdOption opt)
+        {
+
+            List<DtoLine> list = new List<DtoLine>();
+
+            IntPtr LOP_ValuePtr;
+            IntPtr ResLen;
+            int LineCount = 0;
+
+            GDOPApi.SCX_XD_NoRef_new(opt.MsEph, opt.MsAnt, opt.CDBAnt, opt.xdDto * 1e-6, ref LineCount, out ResLen, out LOP_ValuePtr);
+
+            int[] res_Len = new int[LineCount];
+            if (LineCount > 0)
+            {
+                Marshal.Copy(ResLen, res_Len, 0, res_Len.Length);
+                int total = res_Len.Sum(r => r);
+                double[] LOP_Value = new double[total * 2];
+                Marshal.Copy(LOP_ValuePtr, LOP_Value, 0, LOP_Value.Length);
+
+                var points = ParseResult(LOP_Value);
+
+                int skipcount = 0;
+                for (int i = 0; i < LineCount; i++)
+                {
+                    int pointcount = res_Len[i];
+                    skipcount = i == 0 ? 0 : skipcount + res_Len[i - 1];
+                    var mapDots = points.Skip(skipcount).Take(pointcount);
+                    DtoLine dtoLine = new DtoLine();
+                    dtoLine.dtoLinePoints = mapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
+                    list.Add(dtoLine);
+                }
+
+            }
+            GDOPApi.FreeGDOPBuf(ResLen);
+            GDOPApi.FreeGDOPBuf(LOP_ValuePtr);
+
+            return list;
+        }
+
         public static IEnumerable<(double lon, double lat)> DtoLineXdNoRefZl(DtoLineXdOption opt)
         {
             double startLon = (int)opt.CDBAnt[0] - 30;
@@ -440,7 +491,7 @@ namespace XdCxRhDW.Api
                 }
                 list.Clear();
             }
-            return list2.Select(p => (p.Item1, p.Item2)).OrderBy(p=>PhysicsHelper.DistanceGeo((1,1,0),(1,1,9)));
+            return list2.Select(p => (p.Item1, p.Item2)).OrderBy(p => PhysicsHelper.DistanceGeo((1, 1, 0), (1, 1, 9)));
         }
 
     }

+ 7 - 0
XdCxRhDW.Api/AddIns/时差线/DtoLineModel.cs

@@ -6,6 +6,13 @@ using System.Threading.Tasks;
 
 namespace XdCxRhDW.Api
 {
+
+    public class DtoLine
+    {
+
+      public IEnumerable<(double lon, double lat)> dtoLinePoints { get; set; } = new List<(double lon, double lat)>();
+
+    }
     public class DtoLinePoint 
     {
         /// <summary>

+ 4 - 0
XdCxRhDW.App/App.config

@@ -28,6 +28,10 @@
 		<!--两星一地无参定位算法使用新算法-->
 		<add key="UseNewPosX2D1NoRef" value="1" />
 
+
+		<!--GDOP使用最新的版本  1:使用-->
+		<add key="UseNewGDOP" value="1" />
+
 	</appSettings>
 	<startup>
 		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />

+ 1 - 0
XdCxRhDW.App/Controllers/DetectCgController.cs

@@ -105,6 +105,7 @@ namespace XdCxRhDW.App.Controllers
                     res.data[i].ModRate = procRes.data[i].Rate;
                     res.data[i].ModType = procRes.data[i].ModType.GetEnumDisplayName();
                     res.data[i].FfcHz = procRes.data[i].Ffc;
+                    res.data[i].Snr= procRes.data[i].Snr;
                 }
             }
             return res;

+ 2 - 0
XdCxRhDW.App/CorTools/DetectToolForm.cs

@@ -168,6 +168,7 @@ namespace XdCxRhDW.App.CorTools
                                 data[i].ModType = resData[i].ModType.GetEnumDisplayName();
                                 data[i].ModRate = resData[i].Rate;
                                 data[i].FfcHz = resData[i].Ffc;
+                                data[i].SigSnr = resData[i].Snr;
                             }
                             gridView1.RefreshData();
                             gridView1.BestFitColumns();
@@ -260,6 +261,7 @@ namespace XdCxRhDW.App.CorTools
                             smpstart = dmcItem.Start,
                             smplen = dmcItem.Length,
                             DmcType = dmcItem.DmcType,
+                            SigSnr=dmcItem.Snr,
                             SigTime = sigTime,
                             tm = dmcItem.TimeMs,
                             //ModType = dmcItem.ModType,

+ 38 - 27
XdCxRhDW.App/CorTools/DetectToolForm.designer.cs

@@ -28,6 +28,11 @@
         /// </summary>
         private void InitializeComponent()
         {
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions8 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject29 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject30 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject31 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject32 = new DevExpress.Utils.SerializableAppearanceObject();
             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();
@@ -58,11 +63,6 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject22 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject23 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject24 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions7 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject25 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject26 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject27 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject28 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.txtFileTime = new DevExpress.XtraEditors.DateEdit();
             this.btnCalc = new DevExpress.XtraEditors.SimpleButton();
@@ -97,6 +97,7 @@
             this.teDfRange = new DevExpress.XtraEditors.ButtonEdit();
             this.teSnr = new DevExpress.XtraEditors.ButtonEdit();
             this.txtBand = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtTimeout = new DevExpress.XtraEditors.ButtonEdit();
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
@@ -116,8 +117,8 @@
             this.layoutItemDrawImage = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem();
             this.itemBand = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtTimeout = new DevExpress.XtraEditors.ButtonEdit();
             this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.SigSnr = new DevExpress.XtraGrid.Columns.GridColumn();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtFileTime.Properties)).BeginInit();
@@ -137,6 +138,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.teDfRange.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.teSnr.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtBand.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTimeout.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
@@ -156,7 +158,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutItemDrawImage)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemBand)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtTimeout.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
             this.SuspendLayout();
             // 
@@ -268,6 +269,7 @@
             this.DemType,
             this.modType,
             this.modRate,
+            this.SigSnr,
             this.colFFC});
             this.gridView1.DetailHeight = 169;
             this.gridView1.FooterPanelHeight = 0;
@@ -504,7 +506,7 @@
             this.tefs.Name = "tefs";
             this.tefs.Properties.AutoHeight = false;
             this.tefs.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, false, true, false, editorButtonImageOptions8, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject29, serializableAppearanceObject30, serializableAppearanceObject31, serializableAppearanceObject32, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.tefs.Size = new System.Drawing.Size(82, 20);
             this.tefs.StyleController = this.layoutControl1;
             this.tefs.TabIndex = 6;
@@ -517,7 +519,7 @@
             this.teCenter.Name = "teCenter";
             this.teCenter.Properties.AutoHeight = false;
             this.teCenter.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            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.teCenter.Size = new System.Drawing.Size(70, 20);
             this.teCenter.StyleController = this.layoutControl1;
             this.teCenter.TabIndex = 7;
@@ -530,7 +532,7 @@
             this.teRange.Name = "teRange";
             this.teRange.Properties.AutoHeight = false;
             this.teRange.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -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.teRange.Size = new System.Drawing.Size(50, 20);
             this.teRange.StyleController = this.layoutControl1;
             this.teRange.TabIndex = 8;
@@ -543,7 +545,7 @@
             this.teDfRange.Name = "teDfRange";
             this.teDfRange.Properties.AutoHeight = false;
             this.teDfRange.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.teDfRange.Size = new System.Drawing.Size(51, 20);
             this.teDfRange.StyleController = this.layoutControl1;
             this.teDfRange.TabIndex = 11;
@@ -556,7 +558,7 @@
             this.teSnr.Name = "teSnr";
             this.teSnr.Properties.AutoHeight = false;
             this.teSnr.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "dB", -1, false, true, false, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "dB", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.teSnr.Size = new System.Drawing.Size(56, 20);
             this.teSnr.StyleController = this.layoutControl1;
             this.teSnr.TabIndex = 14;
@@ -569,11 +571,24 @@
             this.txtBand.Name = "txtBand";
             this.txtBand.Properties.AutoHeight = false;
             this.txtBand.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "KHz", -1, false, true, false, editorButtonImageOptions6, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject21, serializableAppearanceObject22, serializableAppearanceObject23, serializableAppearanceObject24, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "KHz", -1, false, true, false, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtBand.Size = new System.Drawing.Size(70, 21);
             this.txtBand.StyleController = this.layoutControl1;
             this.txtBand.TabIndex = 6;
             // 
+            // txtTimeout
+            // 
+            this.txtTimeout.EditValue = "30";
+            this.txtTimeout.Location = new System.Drawing.Point(1241, 57);
+            this.txtTimeout.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
+            this.txtTimeout.Name = "txtTimeout";
+            this.txtTimeout.Properties.AutoHeight = false;
+            this.txtTimeout.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "秒", -1, false, true, false, editorButtonImageOptions6, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject21, serializableAppearanceObject22, serializableAppearanceObject23, serializableAppearanceObject24, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtTimeout.Size = new System.Drawing.Size(69, 20);
+            this.txtTimeout.StyleController = this.layoutControl1;
+            this.txtTimeout.TabIndex = 14;
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
@@ -843,19 +858,6 @@
             this.itemBand.TextToControlDistance = 5;
             this.itemBand.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
             // 
-            // txtTimeout
-            // 
-            this.txtTimeout.EditValue = "30";
-            this.txtTimeout.Location = new System.Drawing.Point(1241, 57);
-            this.txtTimeout.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
-            this.txtTimeout.Name = "txtTimeout";
-            this.txtTimeout.Properties.AutoHeight = false;
-            this.txtTimeout.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "秒", -1, false, true, false, editorButtonImageOptions7, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject25, serializableAppearanceObject26, serializableAppearanceObject27, serializableAppearanceObject28, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtTimeout.Size = new System.Drawing.Size(69, 20);
-            this.txtTimeout.StyleController = this.layoutControl1;
-            this.txtTimeout.TabIndex = 14;
-            // 
             // layoutControlItem14
             // 
             this.layoutControlItem14.Control = this.txtTimeout;
@@ -872,6 +874,14 @@
             this.layoutControlItem14.TextSize = new System.Drawing.Size(52, 14);
             this.layoutControlItem14.TextToControlDistance = 5;
             // 
+            // SigSnr
+            // 
+            this.SigSnr.Caption = "信号信噪比dB";
+            this.SigSnr.FieldName = "SigSnr";
+            this.SigSnr.Name = "SigSnr";
+            this.SigSnr.Visible = true;
+            this.SigSnr.VisibleIndex = 14;
+            // 
             // DetectToolForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
@@ -903,6 +913,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.teDfRange.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.teSnr.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtBand.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtTimeout.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
@@ -922,7 +933,6 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutItemDrawImage)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem13)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.itemBand)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtTimeout.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
             this.ResumeLayout(false);
 
@@ -985,5 +995,6 @@
         private DevExpress.XtraGrid.Columns.GridColumn colFFC;
         private DevExpress.XtraEditors.ButtonEdit txtTimeout;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem14;
+        private DevExpress.XtraGrid.Columns.GridColumn SigSnr;
     }
 }

+ 12 - 2
XdCxRhDW.App/EditForms/RHDTOParamEditor.cs

@@ -211,8 +211,18 @@ namespace XdCxRhDW.App.EditForms
                 var nsat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat;
                 if (string.IsNullOrWhiteSpace(nsat)) nsat = cg.Adja1Code.Value.ToString();
 
-                var xdDtoLine = DrawDtoLineHelper.DtoLineXd(dtoLineXd);
-                mapControl1.DrawDtoLine($"[{msat},超短{CDBAnt[0]}°]时差线", xdDtoLine);
+                var xdDtoLine = DrawDtoLineHelper.DtoLineXdNew(dtoLineXd);
+                List<MapPolyline> polylines = new List<MapPolyline>();
+                foreach (var dtoLine in xdDtoLine)
+                {
+                    var mapline = mapControl1.GetLine($"[{msat},超短{CDBAnt[0]}°]时差线", dtoLine.dtoLinePoints,true);
+                    if (mapline == null)
+                    {
+                        continue;
+                    }
+                    polylines.Add(mapline);
+                }
+                mapControl1.DrawDtoLine(polylines);
 
                 var tsDtoLine = DrawDtoLineHelper.DtoLine2XStart(twoStartOption);
                 mapControl1.DrawDtoLine($"[{msat},{nsat}]时差线", tsDtoLine);

+ 15 - 2
XdCxRhDW.App/EditForms/X1D1DTOParamEditor.cs

@@ -181,8 +181,21 @@ namespace XdCxRhDW.App.EditForms
 
                 var msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
                 if (string.IsNullOrWhiteSpace(msat)) msat = cg.MainCode.Value.ToString();
-                var xdDtoLine = DrawDtoLineHelper.DtoLineXdEx(dtoLineXd);
-                mapControl1.DrawDtoLineTwo($"[{msat},超短{CDBAnt[0]}°]带参时差线", xdDtoLine);
+
+                
+
+                var xdDtoLine = DrawDtoLineHelper.DtoLineXdNew(dtoLineXd);
+                List<MapPolyline> polylines = new List<MapPolyline>();
+                foreach (var dtoLine in xdDtoLine)
+                {
+                    var mapline = mapControl1.GetLine($"[{msat},超短{CDBAnt[0]}°]带参时差线", dtoLine.dtoLinePoints, true);
+                    if (mapline == null)
+                    {
+                        continue;
+                    }
+                    polylines.Add(mapline);
+                }
+                mapControl1.DrawDtoLine(polylines);
 
                 //var xdDtoLine1 = DrawDtoLineHelper.DtoLineXd(dtoLineXd);
                 //mapControl1.DrawDtoLine($"[{msat},超短{CDBAnt[0]}°]带参时差线", xdDtoLine1);

+ 41 - 12
XdCxRhDW.App/EditForms/X2D1DTOParamEditor.cs

@@ -207,34 +207,63 @@ namespace XdCxRhDW.App.EditForms
                 if (string.IsNullOrWhiteSpace(msat)) msat = cg.MainCode.Value.ToString();
                 var nsat = listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat;
                 if (string.IsNullOrWhiteSpace(nsat)) nsat = cg.Adja1Code.Value.ToString();
+                string useNewGDOP = ConfigurationManager.AppSettings["UseNewGDOP"];
                 if (info.PosResType == EnumPosResType.X2D1)
                 {
                     //var xdDtoLine = DrawDtoLineHelper.DtoLineXd(dtoLineXd);
                     //mapControl1.DrawDtoLine($"[{msat},超短{CDBAnt[0]}°]时差线", xdDtoLine);
+                    if (useNewGDOP == null || useNewGDOP == "0")
+                    {
+                        var xdDtoLine1 = DrawDtoLineHelper.DtoLineXdEx(dtoLineXd);
+                        mapControl1.DrawDtoLineTwo($"[{msat},超短{CDBAnt[0]}°]带参时差线", xdDtoLine1);
 
-                    var xdDtoLine1 = DrawDtoLineHelper.DtoLineXdEx(dtoLineXd);
-                    mapControl1.DrawDtoLineTwo($"[{msat},超短{CDBAnt[0]}°]带参时差线", xdDtoLine1);
+                    }
+                    else
+                    {
+                        var xdDtoLine = DrawDtoLineHelper.DtoLineXdNew(dtoLineXd);
+                        List<MapPolyline> polylines = new List<MapPolyline>();
+                        foreach (var dtoLine in xdDtoLine)
+                        {
+                            var mapline = mapControl1.GetLine($"[{msat},超短{CDBAnt[0]}°]带参时差线", dtoLine.dtoLinePoints, true);
+                            if (mapline == null)
+                            {
+                                continue;
+                            }
+                            polylines.Add(mapline);
+                        }
+                        mapControl1.DrawDtoLine(polylines);
 
+                    }
                     var tsDtoLine = DrawDtoLineHelper.DtoLine2XStart(twoStartOption);
                     mapControl1.DrawDtoLine($"[{msat},{nsat}]带参时差线", tsDtoLine);
                 }
                 else
                 {
-                    //var xdDtoLine = DrawDtoLineHelper.DtoLineXdNoRef(dtoLineXd);
-                    //mapControl1.DrawDtoLine($"[{msat},超短{CDBAnt[0]}°]无参时差线", xdDtoLine);
-
-                    var xdDtoLine1 = DrawDtoLineHelper.DtoLineXdNoRefEx(dtoLineXd);
-                    mapControl1.DrawDtoLineTwo($"[{msat},超短{CDBAnt[0]}°]无参时差线", xdDtoLine1);
-
-                    //var xdDtoLine2 = DrawDtoLineHelper.DtoLineXdNoRefZl(dtoLineXd);
-                    //mapControl1.DrawDtoLine($"[{msat},超短{CDBAnt[0]}°]无参时差线zl", xdDtoLine2);
+                    if (useNewGDOP == null || useNewGDOP == "0")
+                    {
+                        var xdDtoLine1 = DrawDtoLineHelper.DtoLineXdNoRefEx(dtoLineXd);
+                        mapControl1.DrawDtoLineTwo($"[{msat},超短{CDBAnt[0]}°]无参时差线", xdDtoLine1);
 
+                    }
+                    else
+                    {
+                        var xdDtoLine = DrawDtoLineHelper.DtoLineXdNoRefNew(dtoLineXd);
+                        List<MapPolyline> polylines = new List<MapPolyline>();
+                        foreach (var dtoLine in xdDtoLine)
+                        {
+                            var mapline = mapControl1.GetLine($"[{msat},超短{CDBAnt[0]}°]无参时差线", dtoLine.dtoLinePoints, true);
+                            if (mapline == null)
+                            {
+                                continue;
+                            }
+                            polylines.Add(mapline);
+                        }
+                        mapControl1.DrawDtoLine(polylines);
+                    }
 
                     var tsDtoLine = DrawDtoLineHelper.DtoLine2XNoRefStart(twoStartOption);
                     mapControl1.DrawDtoLine($"[{msat},{nsat}]无参时差线", tsDtoLine);
 
-                    //var tsDtoLine2 = DrawDtoLineHelper.DtoLine2XNoRefStartZl(twoStartOption);
-                    //mapControl1.DrawDtoLine($"[{msat},{nsat}]无参时差线zl", tsDtoLine2);
                 }
             }
             catch (Exception ex)

+ 99 - 8
XdCxRhDW.App/ExtensionsDev/MapControlEx.cs

@@ -1,9 +1,7 @@
 using DevExpress.Export.Xl;
-using DevExpress.Internal;
 using DevExpress.Map;
 using DevExpress.Map.Native;
 using DevExpress.Utils;
-using DevExpress.Utils.About;
 using DevExpress.Utils.Helpers;
 using DevExpress.Utils.Svg;
 using DevExpress.XtraBars;
@@ -17,22 +15,16 @@ using DxHelper;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel.DataAnnotations;
-using System.Configuration;
 using System.Data.Common;
-using System.Data.Entity.Core.Metadata.Edm;
 using System.Data.SQLite;
 using System.Drawing;
 using System.Drawing.Imaging;
 using System.IO;
 using System.Linq;
 using System.Reflection;
-using System.Security.Policy;
 using System.Text;
-using System.Threading;
 using System.Windows.Forms;
-using XdCxRhDW.App;
 using XdCxRhDW.Entity;
-using XdCxRhDW.Repostory;
 
 public enum GoogleMapType
 {
@@ -1659,6 +1651,103 @@ public static class MapControlEx
         innerData.mMapStorage.Items.AddRange(list);
     }
 
+
+    public static MapPolyline GetLine(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines)
+    {
+        if (lines == null || !lines.Any()) return null;
+        var polyLine = new MapPolyline()
+        {
+            EnableSelection = DefaultBoolean.False,
+            EnableHighlighting = DefaultBoolean.True,
+            Stroke = ColorHelper.GetColor(title),
+            StrokeWidth = 2,
+            HighlightedStrokeWidth = 4,
+            IsGeodesic = true,
+            CanResize = false,
+            CanEdit = false,
+            CanRotate = false,
+            IsHitTestVisible = true,
+            CanMove = false,
+            Tag = $"DrawDtoLine_{title}",
+            ToolTipPattern = $"{title}",
+
+
+        };
+        bool isShowPattern = lines.Count() > 400;
+        if (isShowPattern)
+        {
+            polyLine.TitleOptions.Pattern = title;
+        }
+        
+        foreach (var item in lines)
+        {
+            if (double.IsNaN(item.lat) || double.IsNaN(item.lon)) continue;
+            polyLine.Points.Add(new GeoPoint(item.lat, item.lon));
+            
+        }
+        if (!polyLine.Points.Any())
+        {
+            return null;
+        }
+        else
+        {
+            return polyLine;
+        }
+       
+
+    }
+
+    public static MapPolyline GetLine(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines,bool isShowPattern=false)
+    {
+        if (lines == null || !lines.Any()) return null;
+        var polyLine = new MapPolyline()
+        {
+            EnableSelection = DefaultBoolean.False,
+            EnableHighlighting = DefaultBoolean.True,
+            Stroke = ColorHelper.GetColor(title),
+            StrokeWidth = 2,
+            HighlightedStrokeWidth = 4,
+            IsGeodesic = true,
+            CanResize = false,
+            CanEdit = false,
+            CanRotate = false,
+            IsHitTestVisible = true,
+            CanMove = false,
+            Tag = $"DrawDtoLine_{title}",
+            ToolTipPattern = $"{title}",
+
+
+        };
+        if (isShowPattern)
+        {
+            polyLine.TitleOptions.Pattern = title;
+        }
+
+        foreach (var item in lines)
+        {
+            if (double.IsNaN(item.lat) || double.IsNaN(item.lon)) continue;
+            polyLine.Points.Add(new GeoPoint(item.lat, item.lon));
+
+        }
+        if (!polyLine.Points.Any())
+        {
+            return null;
+        }
+        else
+        {
+            return polyLine;
+        }
+
+
+    }
+
+
+    public static void DrawDtoLine(this MapControl ctrl, List<MapPolyline> polylines)
+    {
+        if (polylines == null || !polylines.Any()) return;
+        var innerData = ctrl.Tag as InnerData;
+        innerData.mMapStorage.Items.AddRange(polylines);
+    }
     public static void DrawDtoLine(this MapControl ctrl, string title, IEnumerable<(double lon, double lat)> lines)
     {
         if (lines == null || !lines.Any()) return;
@@ -1678,7 +1767,9 @@ public static class MapControlEx
             CanMove = false,
             Tag = $"DrawDtoLine_{title}",
             ToolTipPattern = $"{title}",
+
         };
+        polyLine.TitleOptions.Pattern = title;
         foreach (var item in lines)
         {
             if (double.IsNaN(item.lat) || double.IsNaN(item.lon)) continue;

+ 29 - 11
XdCxRhDW.App/UserControl/X1D1GDOPParam.cs

@@ -11,6 +11,7 @@ using System.Drawing;
 using DevExpress.XtraCharts.Design;
 using System.Runtime.ConstrainedExecution;
 using XdCxRhDW.Dto;
+using System.Configuration;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -69,7 +70,7 @@ namespace XdCxRhDW.App.UserControl
             {
                 return false;
             }
-            if (!txtStationLocation1.CheckLonLat(dxErrorProvider,"超短波"))
+            if (!txtStationLocation1.CheckLonLat(dxErrorProvider, "超短波"))
             {
                 return false;
             }
@@ -77,7 +78,7 @@ namespace XdCxRhDW.App.UserControl
             {
                 return false;
             }
-            if (!txtRefLocation1.CheckLonLat(dxErrorProvider,"参考站"))
+            if (!txtRefLocation1.CheckLonLat(dxErrorProvider, "参考站"))
             {
                 return false;
             }
@@ -102,18 +103,35 @@ namespace XdCxRhDW.App.UserControl
             try
             {
                 mapControl1.ClearMap();
-                var data = GdopHelper.Gdop1Sat1DByXyz(Model.EphMain, Model.CDBStation, Model.CXStation,
-                                 Model.DtousErr, Model.CXErr, Model.SatLocErr, Model.RefStation);
-                if (data == null)
+
+                string useNewGDOP = ConfigurationManager.AppSettings["UseNewGDOP"];
+                if (useNewGDOP == null || useNewGDOP == "0")
                 {
-                    return;
+                    var data = GdopHelper.Gdop1Sat1DByXyz(Model.EphMain, Model.CDBStation, Model.CXStation,
+                                     Model.DtousErr, Model.CXErr, Model.SatLocErr, Model.RefStation);
+                    foreach (var errLins in data)//画GDOP
+                    {
+                        mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, errLins.MapDots, 1);
+                    }
                 }
-                foreach (var errLins in data)//画GDOP
+                else
                 {
-                    var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
-                    mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, 1);
+                    var data = GdopHelper.Gdop1Sat1DByXyzNew(Model.EphMain, Model.CDBStation, Model.CXStation,
+                                      Model.DtousErr, Model.CXErr, Model.SatLocErr, Model.RefStation);
+
+                    List<MapPolyline> polylines = new List<MapPolyline>();
+                    for (int i = 0; i < data.Count; i++)
+                    {
+                        var errLins = data[i];
+                        var mapline = mapControl1.GetLine(errLins.ErrDistanceKm, errLins.MapDots);
+                        if (mapline == null)
+                        {
+                            continue;
+                        }
+                        polylines.Add(mapline);
+                    }
+                    mapControl1.DrawDtoLine(polylines);
                 }
-
             }
             catch (Exception ex)
             {
@@ -145,7 +163,7 @@ namespace XdCxRhDW.App.UserControl
                     DxHelper.MsgBoxHelper.ShowWarning($"卫星:{mainCode}未找到对应的星历信息,请导入星历");
                     return;
                 }
-                var XlCalcDto = new XlCalcDto() { tleStr = mainxlInfo.TwoLine, SigTime = sigTime};
+                var XlCalcDto = new XlCalcDto() { tleStr = mainxlInfo.TwoLine, SigTime = sigTime };
                 var maineph = await HttpHelper.PostRequestAsync<SatEphResDto>(SysConfig.GetUrl("Xl/Calc"), XlCalcDto);
                 ucEphXYZMain.SetParam("主星", mainCode, (maineph.data.X, maineph.data.Y, maineph.data.Z, maineph.data.VX, maineph.data.VY, maineph.data.VZ), Color.Red);
             }

+ 27 - 7
XdCxRhDW.App/UserControl/X2D1GDOPParam.cs

@@ -12,6 +12,7 @@ using System.Drawing;
 using DevExpress.Utils.About;
 using DevExpress.XtraEditors.DXErrorProvider;
 using XdCxRhDW.Dto;
+using System.Configuration;
 
 namespace XdCxRhDW.App.UserControl
 {
@@ -107,17 +108,36 @@ namespace XdCxRhDW.App.UserControl
             {
 
                 mapControl1.ClearMap();
-                var data = GdopHelper.Gdop2Sat1DByXyz(Model.EphMain, Model.EphAdja, Model.CDBStation
-                         , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X2D1NoRef ? null : Model.RefStation);
-                if (data == null)
+                string useNewGDOP = ConfigurationManager.AppSettings["UseNewGDOP"];
+                if (useNewGDOP == null || useNewGDOP == "0")
                 {
-                    return;
+                    var data = GdopHelper.Gdop2Sat1DByXyz(Model.EphMain, Model.EphAdja, Model.CDBStation
+                             , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X2D1NoRef ? null : Model.RefStation);
+                    foreach (var errLins in data)//画GDOP
+                    {
+                        mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, errLins.MapDots, 1);
+                    }
                 }
-                foreach (var errLins in data)//画GDOP
+                else
                 {
-                    var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
-                    mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, 1);
+
+                    var data = GdopHelper.Gdop2Sat1DByXyzNew(Model.EphMain, Model.EphAdja, Model.CDBStation
+                      , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X2D1NoRef ? null : Model.RefStation);
+
+                    List<MapPolyline> polylines = new List<MapPolyline>();
+                    for (int i = 0; i < data.Count; i++)
+                    {
+                        var errLins = data[i];
+                        var mapline = mapControl1.GetLine(errLins.ErrDistanceKm, errLins.MapDots);
+                        if (mapline == null)
+                        {
+                            continue;
+                        }
+                        polylines.Add(mapline);
+                    }
+                    mapControl1.DrawDtoLine(polylines);
                 }
+
             }
             catch (Exception ex)
             {

+ 23 - 8
XdCxRhDW.App/UserControl/X2DFGDOPParam.cs

@@ -5,6 +5,7 @@ using DxHelper;
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
+using System.Configuration;
 using System.Data;
 using System.Drawing;
 using System.Linq;
@@ -115,17 +116,31 @@ namespace XdCxRhDW.App.UserControl
 
 
                 mapControl1.ClearMap();
-                var data = GdopHelper.Gdop2SatDRefByXyz(Model.EphMain, Model.EphAdja, Model.fu1, Model.fu2, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.RefStation);
-
-                if (data == null)
+                string useNewGDOP = ConfigurationManager.AppSettings["UseNewGDOP"];
+                if (useNewGDOP == null || useNewGDOP == "0")
                 {
-                    return;
+                    var data = GdopHelper.Gdop2SatDRefByXyz(Model.EphMain, Model.EphAdja, Model.fu1, Model.fu2, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.RefStation);
+                    foreach (var errLins in data)//画GDOP
+                    {
+                        var mapDots = errLins.MapDots;
+                        mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, mapDots.Count() / 2);
+                    }
                 }
-
-                foreach (var errLins in data)//画GDOP
+                else
                 {
-                    var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
-                    mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, mapDots.Count() / 2);
+                    var data = GdopHelper.Gdop2SatDRefByXyzNew(Model.EphMain, Model.EphAdja, Model.fu1, Model.fu2, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.RefStation);
+                    List<MapPolyline> polylines = new List<MapPolyline>();
+                    for (int i = 0; i < data.Count; i++)
+                    {
+                        var errLins = data[i];
+                        var mapline = mapControl1.GetLine(errLins.ErrDistanceKm, errLins.MapDots);
+                        if (mapline == null)
+                        {
+                            continue;
+                        }
+                        polylines.Add(mapline);
+                    }
+                    mapControl1.DrawDtoLine(polylines);
                 }
             }
             catch (Exception ex)

+ 24 - 7
XdCxRhDW.App/UserControl/X3DFGDOPParam .cs

@@ -3,6 +3,7 @@ using DxHelper;
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
+using System.Configuration;
 using System.Data;
 using System.Drawing;
 using System.Linq;
@@ -112,16 +113,32 @@ namespace XdCxRhDW.App.UserControl
             try
             {
                 mapControl1.ClearMap();
-                var data = GdopHelper.Gdop3SatDFByXyz(Model.EphMain, Model.EphAdja1, Model.EphAdja2, Model.fu1, Model.fu2, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.RefStation);
-
-                if (data == null)
+                string useNewGDOP = ConfigurationManager.AppSettings["UseNewGDOP"];
+                if (useNewGDOP == null || useNewGDOP == "0")
                 {
-                    return;
+                    var data = GdopHelper.Gdop3SatDFByXyz(Model.EphMain, Model.EphAdja1, Model.EphAdja2, Model.fu1, Model.fu2, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.RefStation);
+
+                    foreach (var errLins in data)//画GDOP
+                    {
+                        var mapDots = errLins.MapDots;
+                        mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, mapDots.Count() / 2);
+                    }
                 }
-                foreach (var errLins in data)//画GDOP
+                else
                 {
-                    var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
-                    mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, mapDots.Count() / 2);
+                    var data = GdopHelper.Gdop3SatDFByXyzNew(Model.EphMain, Model.EphAdja1, Model.EphAdja2, Model.fu1, Model.fu2, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.RefStation);
+                    List<MapPolyline> polylines = new List<MapPolyline>();
+                    for (int i = 0; i < data.Count; i++)
+                    {
+                        var errLins = data[i];
+                        var mapline = mapControl1.GetLine(errLins.ErrDistanceKm, errLins.MapDots);
+                        if (mapline == null)
+                        {
+                            continue;
+                        }
+                        polylines.Add(mapline);
+                    }
+                    mapControl1.DrawDtoLine(polylines);
                 }
             }
             catch (Exception ex)

+ 26 - 8
XdCxRhDW.App/UserControl/X3GDOPParam.cs

@@ -11,6 +11,7 @@ using XdCxRhDW.Api;
 using System.Drawing;
 using DevExpress.XtraEditors.DXErrorProvider;
 using XdCxRhDW.Dto;
+using System.Configuration;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X3GDOPParam : DevExpress.XtraEditors.XtraUserControl
@@ -103,17 +104,34 @@ namespace XdCxRhDW.App.UserControl
             try
             {
                 mapControl1.ClearMap();
-
-                var data = GdopHelper.Gdop3SatByXyz(Model.EphMain, Model.EphAdja1, Model.EphAdja2
-                                  , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X3NoRef ? null : Model.RefStation);
-                if (data == null)
+                string useNewGDOP = ConfigurationManager.AppSettings["UseNewGDOP"];
+                if (useNewGDOP == null || useNewGDOP == "0")
                 {
-                    return;
+                    var data = GdopHelper.Gdop3SatByXyz(Model.EphMain, Model.EphAdja1, Model.EphAdja2
+                                  , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X3NoRef ? null : Model.RefStation);
+                    foreach (var errLins in data)//画GDOP
+                    {
+                        mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, errLins.MapDots, 1);
+                    }
+
                 }
-                foreach (var errLins in data)//画GDOP
+                else
                 {
-                    var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
-                    mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, 1);
+                    var data = GdopHelper.Gdop3SatByXyzNew(Model.EphMain, Model.EphAdja1, Model.EphAdja2
+                                     , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X3NoRef ? null : Model.RefStation);
+
+                    List<MapPolyline> polylines = new List<MapPolyline>();
+                    for (int i = 0; i < data.Count; i++)
+                    {
+                        var errLins = data[i];
+                        var mapline = mapControl1.GetLine(errLins.ErrDistanceKm, errLins.MapDots);
+                        if (mapline == null)
+                        {
+                            continue;
+                        }
+                        polylines.Add(mapline);
+                    }
+                    mapControl1.DrawDtoLine(polylines);
                 }
             }
             catch (Exception ex)

+ 5 - 0
XdCxRhDw.Dto/CafResultDto.cs

@@ -88,6 +88,11 @@ namespace XdCxRhDW.Dto
         /// </summary>
         public double? FfcHz { get; set; }
 
+        /// <summary>
+        /// 信号信噪比
+        /// </summary>
+        public double? SigSnr { get; set; }
+
         /// <summary>
         /// 
         /// </summary>

+ 5 - 0
XdCxRhDw.Dto/DetectResDto.cs

@@ -68,6 +68,11 @@ namespace XdCxRhDW.Dto
         /// </summary>
         public double? FfcHz { get; set; }
 
+        /// <summary>
+        /// 信号信噪比
+        /// </summary>
+        public double? Snr { get; set; }
+
         /// <summary>
         /// 耗时(ms)
         /// </summary>

+ 5 - 0
XdCxRhDw.Dto/SignalProcResDto.cs

@@ -28,6 +28,11 @@ namespace XdCxRhDW.Dto
         /// 频偏(Hz)
         /// </summary>
         public double Ffc { get; set; }
+
+        /// <summary>
+        /// 信号信噪比
+        /// </summary>
+        public double Snr { get; set; }
     }
 
     /// <summary>