gongqiuhong преди 1 година
родител
ревизия
837ee35c8d

+ 2 - 2
XdCxRhDW.App/Api/EphHelper.cs

@@ -179,9 +179,9 @@ namespace PosResAnalysis
         [Display(Name = "卫星时刻")]
         public DateTime SatTime { get; set; }
         /// <summary>
-        /// 星时刻(北京时间)
+        /// 星时刻(北京时间)
         /// </summary>
-        [Display(Name = "星时刻")]
+        [Display(Name = "星时刻")]
         public DateTime TleTime { get; set; }
         /// <summary>
         /// X坐标

+ 1 - 1
XdCxRhDW.App/CorTools/CafResult.cs

@@ -25,7 +25,7 @@ namespace XdCxRhDW.App.CorTools
         public double? snr { get; set; }
 
         /// <summary>
-        /// 耗时(s)
+        /// 耗时(ms)
         /// </summary>
         public double tm { get; set; }
 

+ 25 - 11
XdCxRhDW.App/CorTools/DetectToolForm.cs

@@ -228,15 +228,15 @@ namespace XdCxRhDW.App.CorTools
                         uploadUrL = $"http://{res.ServerIp}:{res.HttpPort}/api/DetectCg";
                     }
                 }
-                dto.file1  = UpLoadFile(btnFile1.Text);
+                dto.file1 = UpLoadFile(btnFile1.Text);
+                dto.fsHz = double.Parse(tefs.Text) * 1e6;
                 // 构建上传请求的 Uri
                 string uploadUri = $"{uploadUrL}/DetectCalc";
 
                 var content = new StringContent(JsonConvert.SerializeObject(dto), System.Text.Encoding.UTF8, "application/json");
-                var dmcResult = PostRequest<IEnumerable<DetectResDto>> (uploadUri, content);
-                if (dmcResult!=null)
+                var dmcResult = PostRequest<IEnumerable<DetectResDto>>(uploadUri, content);
+                if (dmcResult != null)
                 {
-                    //var dmcResult = await XcorrUtils.DmcCheckAsync(btnFile1.Text, dmcType);// double.Parse(tefs.Text),
                     gridSource.Clear();
                     foreach (var dmcItem in dmcResult)
                     {
@@ -245,7 +245,8 @@ namespace XdCxRhDW.App.CorTools
                             file1 = btnFile1.Text,
                             file2 = btnFile2.Text,
                             smpstart = dmcItem.Start,
-                            smplen = dmcItem.Length
+                            smplen = dmcItem.Length,
+                            tm=dmcItem.TimeMs,
                         });
                     }
                 }
@@ -255,7 +256,7 @@ namespace XdCxRhDW.App.CorTools
             {
                 DxHelper.MsgBoxHelper.ShowError($"检测计算错误{ex.Message}");
             }
-           
+
         }
 
         private void chkDama_CheckedChanged(object sender, EventArgs e)
@@ -366,11 +367,20 @@ namespace XdCxRhDW.App.CorTools
                 var content = new StringContent(JsonConvert.SerializeObject(xcitem), System.Text.Encoding.UTF8, "application/json");
                 try
                 {
-                    var result = PostRequest<CafResult>(uploadUri, content);
-                    // var result = await ExecuteCorAsync(xcitem);
+                    var result = PostRequest<EstimationResDto>(uploadUri, content);
                     if (result != null)
                     {
-                        gridSource.Add(result);
+                        gridSource.Add(new CafResult()
+                        {
+                            file1 = btnFile1.Text,
+                            file2 = btnFile2.Text,
+                            smpstart = result.Smpstart,
+                            smplen = result.Smplen,
+                            dt=result.Dt,
+                            df= result.Df,
+                            snr= result.Snr,
+                            tm = result.TimeMs,
+                        });
                         gridView1.FocusedRowHandle = gridSource.Count - 1;
                     }
                 }
@@ -378,7 +388,7 @@ namespace XdCxRhDW.App.CorTools
                 {
                     continue;
                 }
-               
+
 
             }
 
@@ -403,7 +413,11 @@ namespace XdCxRhDW.App.CorTools
                 content.Add(fileContent, "file", Path.GetFileName(filePath));
 
                 // 发送上传请求
-                file = PostRequest<string>(uploadUri, content);
+               var filedto = PostRequest<FileDto>(uploadUri, content);
+                if (filedto != null)
+                {
+                    file = filedto.FileName;
+                }
             }
             catch (Exception ex)
             {

+ 35 - 32
XdCxRhDW.App/CorTools/DetectToolForm.designer.cs

@@ -240,10 +240,10 @@
             // teSnr
             // 
             this.teSnr.EditValue = "14";
-            this.teSnr.Location = new System.Drawing.Point(646, 57);
+            this.teSnr.Location = new System.Drawing.Point(706, 57);
             this.teSnr.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.teSnr.Name = "teSnr";
-            this.teSnr.Size = new System.Drawing.Size(56, 22);
+            this.teSnr.Size = new System.Drawing.Size(76, 22);
             this.teSnr.StyleController = this.layoutControl1;
             this.teSnr.TabIndex = 14;
             // 
@@ -343,7 +343,7 @@
             // 
             // tm
             // 
-            this.tm.Caption = "耗时(s)";
+            this.tm.Caption = "耗时(ms)";
             this.tm.FieldName = "tm";
             this.tm.MinWidth = 22;
             this.tm.Name = "tm";
@@ -374,50 +374,50 @@
             // teDfRange
             // 
             this.teDfRange.EditValue = "16384";
-            this.teDfRange.Location = new System.Drawing.Point(509, 57);
+            this.teDfRange.Location = new System.Drawing.Point(553, 57);
             this.teDfRange.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.teDfRange.Name = "teDfRange";
-            this.teDfRange.Size = new System.Drawing.Size(56, 22);
+            this.teDfRange.Size = new System.Drawing.Size(72, 22);
             this.teDfRange.StyleController = this.layoutControl1;
             this.teDfRange.TabIndex = 11;
             // 
             // tePos
             // 
             this.tePos.EditValue = "0";
-            this.tePos.Location = new System.Drawing.Point(770, 57);
+            this.tePos.Location = new System.Drawing.Point(850, 57);
             this.tePos.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.tePos.Name = "tePos";
-            this.tePos.Size = new System.Drawing.Size(55, 22);
+            this.tePos.Size = new System.Drawing.Size(88, 22);
             this.tePos.StyleController = this.layoutControl1;
             this.tePos.TabIndex = 10;
             // 
             // teCount
             // 
             this.teCount.EditValue = "0";
-            this.teCount.Location = new System.Drawing.Point(894, 57);
+            this.teCount.Location = new System.Drawing.Point(1007, 57);
             this.teCount.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.teCount.Name = "teCount";
-            this.teCount.Size = new System.Drawing.Size(201, 22);
+            this.teCount.Size = new System.Drawing.Size(88, 22);
             this.teCount.StyleController = this.layoutControl1;
             this.teCount.TabIndex = 9;
             // 
             // teRange
             // 
             this.teRange.EditValue = "40000";
-            this.teRange.Location = new System.Drawing.Point(370, 57);
+            this.teRange.Location = new System.Drawing.Point(404, 57);
             this.teRange.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.teRange.Name = "teRange";
-            this.teRange.Size = new System.Drawing.Size(55, 22);
+            this.teRange.Size = new System.Drawing.Size(65, 22);
             this.teRange.StyleController = this.layoutControl1;
             this.teRange.TabIndex = 8;
             // 
             // teCenter
             // 
             this.teCenter.EditValue = "0";
-            this.teCenter.Location = new System.Drawing.Point(224, 57);
+            this.teCenter.Location = new System.Drawing.Point(248, 57);
             this.teCenter.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.teCenter.Name = "teCenter";
-            this.teCenter.Size = new System.Drawing.Size(55, 22);
+            this.teCenter.Size = new System.Drawing.Size(65, 22);
             this.teCenter.StyleController = this.layoutControl1;
             this.teCenter.TabIndex = 7;
             // 
@@ -427,7 +427,7 @@
             this.tefs.Location = new System.Drawing.Point(77, 57);
             this.tefs.Margin = new System.Windows.Forms.Padding(2, 1, 2, 1);
             this.tefs.Name = "tefs";
-            this.tefs.Size = new System.Drawing.Size(56, 22);
+            this.tefs.Size = new System.Drawing.Size(80, 22);
             this.tefs.StyleController = this.layoutControl1;
             this.tefs.TabIndex = 6;
             // 
@@ -482,7 +482,7 @@
             this.ckKY.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.ckKY.MenuManager = this.barManager1;
             this.ckKY.Name = "ckKY";
-            this.ckKY.Properties.Caption = "Ky5758";
+            this.ckKY.Properties.Caption = "能量检测";
             this.ckKY.Size = new System.Drawing.Size(98, 20);
             this.ckKY.StyleController = this.layoutControl1;
             this.ckKY.TabIndex = 18;
@@ -530,7 +530,7 @@
             this.layoutControlItem3.Control = this.tefs;
             this.layoutControlItem3.Location = new System.Drawing.Point(0, 52);
             this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Size = new System.Drawing.Size(132, 26);
+            this.layoutControlItem3.Size = new System.Drawing.Size(156, 26);
             this.layoutControlItem3.Text = "采样率(M):";
             this.layoutControlItem3.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(67, 14);
@@ -559,9 +559,9 @@
             // layoutControlItem4
             // 
             this.layoutControlItem4.Control = this.teCenter;
-            this.layoutControlItem4.Location = new System.Drawing.Point(132, 52);
+            this.layoutControlItem4.Location = new System.Drawing.Point(156, 52);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(146, 26);
+            this.layoutControlItem4.Size = new System.Drawing.Size(156, 26);
             this.layoutControlItem4.Text = "时差中心(us):";
             this.layoutControlItem4.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(82, 14);
@@ -570,9 +570,9 @@
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.teRange;
-            this.layoutControlItem5.Location = new System.Drawing.Point(278, 52);
+            this.layoutControlItem5.Location = new System.Drawing.Point(312, 52);
             this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(146, 26);
+            this.layoutControlItem5.Size = new System.Drawing.Size(156, 26);
             this.layoutControlItem5.Text = "时差范围(us):";
             this.layoutControlItem5.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
             this.layoutControlItem5.TextSize = new System.Drawing.Size(82, 14);
@@ -581,9 +581,9 @@
             // layoutControlItem10
             // 
             this.layoutControlItem10.Control = this.teSnr;
-            this.layoutControlItem10.Location = new System.Drawing.Point(564, 52);
+            this.layoutControlItem10.Location = new System.Drawing.Point(624, 52);
             this.layoutControlItem10.Name = "layoutControlItem10";
-            this.layoutControlItem10.Size = new System.Drawing.Size(137, 26);
+            this.layoutControlItem10.Size = new System.Drawing.Size(157, 26);
             this.layoutControlItem10.Text = "信噪比门限:";
             this.layoutControlItem10.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
             this.layoutControlItem10.TextSize = new System.Drawing.Size(72, 14);
@@ -592,9 +592,9 @@
             // layoutControlItem8
             // 
             this.layoutControlItem8.Control = this.teDfRange;
-            this.layoutControlItem8.Location = new System.Drawing.Point(424, 52);
+            this.layoutControlItem8.Location = new System.Drawing.Point(468, 52);
             this.layoutControlItem8.Name = "layoutControlItem8";
-            this.layoutControlItem8.Size = new System.Drawing.Size(140, 26);
+            this.layoutControlItem8.Size = new System.Drawing.Size(156, 26);
             this.layoutControlItem8.Text = "频差范围(Hz):";
             this.layoutControlItem8.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(75, 14);
@@ -603,9 +603,9 @@
             // lciStartPos
             // 
             this.lciStartPos.Control = this.tePos;
-            this.lciStartPos.Location = new System.Drawing.Point(701, 52);
+            this.lciStartPos.Location = new System.Drawing.Point(781, 52);
             this.lciStartPos.Name = "lciStartPos";
-            this.lciStartPos.Size = new System.Drawing.Size(123, 26);
+            this.lciStartPos.Size = new System.Drawing.Size(156, 26);
             this.lciStartPos.Text = "起始样点:";
             this.lciStartPos.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
             this.lciStartPos.TextSize = new System.Drawing.Size(60, 14);
@@ -614,9 +614,9 @@
             // lciSampleLength
             // 
             this.lciSampleLength.Control = this.teCount;
-            this.lciSampleLength.Location = new System.Drawing.Point(824, 52);
+            this.lciSampleLength.Location = new System.Drawing.Point(937, 52);
             this.lciSampleLength.Name = "lciSampleLength";
-            this.lciSampleLength.Size = new System.Drawing.Size(270, 26);
+            this.lciSampleLength.Size = new System.Drawing.Size(157, 26);
             this.lciSampleLength.Text = "计算样点:";
             this.lciSampleLength.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
             this.lciSampleLength.TextSize = new System.Drawing.Size(60, 14);
@@ -628,7 +628,7 @@
             this.layoutControlItem12.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
             this.layoutControlItem12.Control = this.chkDama;
             this.layoutControlItem12.Location = new System.Drawing.Point(862, 0);
-            this.layoutControlItem12.MaxSize = new System.Drawing.Size(0, 26);
+            this.layoutControlItem12.MaxSize = new System.Drawing.Size(74, 26);
             this.layoutControlItem12.MinSize = new System.Drawing.Size(74, 26);
             this.layoutControlItem12.Name = "layoutControlItem12";
             this.layoutControlItem12.Size = new System.Drawing.Size(74, 26);
@@ -640,7 +640,7 @@
             // 
             this.lciBtnCheck.Control = this.btnCheck;
             this.lciBtnCheck.Location = new System.Drawing.Point(862, 26);
-            this.lciBtnCheck.MaxSize = new System.Drawing.Size(0, 26);
+            this.lciBtnCheck.MaxSize = new System.Drawing.Size(117, 26);
             this.lciBtnCheck.MinSize = new System.Drawing.Size(117, 26);
             this.lciBtnCheck.Name = "lciBtnCheck";
             this.lciBtnCheck.Size = new System.Drawing.Size(117, 26);
@@ -654,7 +654,7 @@
             this.layoutControlItem6.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
             this.layoutControlItem6.Control = this.ckIBS;
             this.layoutControlItem6.Location = new System.Drawing.Point(936, 0);
-            this.layoutControlItem6.MaxSize = new System.Drawing.Size(0, 26);
+            this.layoutControlItem6.MaxSize = new System.Drawing.Size(56, 26);
             this.layoutControlItem6.MinSize = new System.Drawing.Size(56, 26);
             this.layoutControlItem6.Name = "layoutControlItem6";
             this.layoutControlItem6.Size = new System.Drawing.Size(56, 26);
@@ -668,8 +668,11 @@
             this.layoutControlItem7.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
             this.layoutControlItem7.Control = this.ckKY;
             this.layoutControlItem7.Location = new System.Drawing.Point(992, 0);
+            this.layoutControlItem7.MaxSize = new System.Drawing.Size(102, 24);
+            this.layoutControlItem7.MinSize = new System.Drawing.Size(102, 24);
             this.layoutControlItem7.Name = "layoutControlItem7";
             this.layoutControlItem7.Size = new System.Drawing.Size(102, 26);
+            this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem7.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem7.TextVisible = false;
             // 
@@ -677,7 +680,7 @@
             // 
             this.layoutControlItem11.Control = this.btnCalc;
             this.layoutControlItem11.Location = new System.Drawing.Point(979, 26);
-            this.layoutControlItem11.MaxSize = new System.Drawing.Size(0, 26);
+            this.layoutControlItem11.MaxSize = new System.Drawing.Size(115, 26);
             this.layoutControlItem11.MinSize = new System.Drawing.Size(115, 26);
             this.layoutControlItem11.Name = "layoutControlItem11";
             this.layoutControlItem11.Size = new System.Drawing.Size(115, 26);

+ 14 - 8
XdCxRhDW.App/CorTools/XcorrUtils.cs

@@ -69,34 +69,40 @@ namespace XdCxRhDW.App.CorTools
                 res.FromLine(str);
                 res.file1 = xs.file1;
                 res.file2 = xs.file2;
-                res.tm = stopWatch.Elapsed.TotalSeconds;
+                res.tm = Math.Round(stopWatch.Elapsed.TotalMilliseconds, 4);
                 res.smpstart = xs.smpStart;
                 res.smplen = xs.smpCount;
             });
             return res;
         }
 
-        public static async Task<IEnumerable<DmcResult>> DmcCheckAsync(string fileName,  DmcType dmcType)
+        public static async Task<IEnumerable<DmcResult>> DmcCheckAsync(string fileName, double fsHz, DmcType dmcType)
         {
             string dmcCmd = "all";
+            string pFileName = Path.Combine(p.StartInfo.WorkingDirectory, "xcorr\\dmc.exe");
+            string pArguments = string.Empty;
             switch (dmcType)
             {
                 case DmcType.DAMA:
                     dmcCmd = "dm";
+                    pArguments = $"{dmcCmd} \"{fileName}\"";// -f {fs}" -c --dmfirst";
                     break;
                 case DmcType.IBS:
                     dmcCmd = "nd";
+                    pArguments = $"{dmcCmd} \"{fileName}\"";// -f {fs}" -c --dmfirst";
                     break;
                 case DmcType.Ky5758:
-                    throw new Exception("ky未实现!");
+                    pFileName = Path.Combine(p.StartInfo.WorkingDirectory, "xcorr\\enc.exe");
+                    //enc.exe enc-test.dat 0.096 5 0全部文件
+                    pArguments = $"{fileName} {fsHz * 1e-6} {5} {0}";
                     break;
                 default:
                     break;
             }
             return await Task.Run(() =>
              {
-                 p.StartInfo.FileName = Path.Combine(p.StartInfo.WorkingDirectory, "xcorr\\dmc.exe");
-                 p.StartInfo.Arguments = $"{dmcCmd} \"{fileName}\"";// -f {fs}" -c --dmfirst";
+                 p.StartInfo.FileName = pFileName;
+                 p.StartInfo.Arguments = pArguments;
                  p.StartInfo.CreateNoWindow = true;
                  p.StartInfo.RedirectStandardError = true;
                  p.StartInfo.RedirectStandardOutput = true;
@@ -108,11 +114,11 @@ namespace XdCxRhDW.App.CorTools
                  stopWatch.Stop();
                  TimeSpan ts = stopWatch.Elapsed;
                  var str = p.StandardOutput.ReadToEnd();
-                 return ConvertDmcResult(str);
+                 return ConvertDmcResult(str, ts.TotalMilliseconds);
              });
         }
 
-        public static IEnumerable<DmcResult> ConvertDmcResult(string res)
+        public static IEnumerable<DmcResult> ConvertDmcResult(string res, double tm)
         {
             var lines = res.Split(Environment.NewLine.ToArray(), StringSplitOptions.RemoveEmptyEntries);
             foreach (var line in lines)
@@ -124,7 +130,7 @@ namespace XdCxRhDW.App.CorTools
                 string userName = "";
                 if (items.Length >= 3)
                     userName = items[2];
-                yield return new DmcResult(start, length, userName);
+                yield return new DmcResult(start, length, userName, Math.Round(tm,4));
             }
         }
 

+ 1 - 1
XdCxRhDW.App/CorTools/XlCalculateForm.Designer.cs

@@ -198,7 +198,7 @@
             this.layoutControlItem2.Location = new System.Drawing.Point(0, 0);
             this.layoutControlItem2.Name = "layoutControlItem2";
             this.layoutControlItem2.Size = new System.Drawing.Size(780, 26);
-            this.layoutControlItem2.Text = "星";
+            this.layoutControlItem2.Text = "星";
             this.layoutControlItem2.TextAlignMode = DevExpress.XtraLayout.TextAlignModeItem.AutoSize;
             this.layoutControlItem2.TextSize = new System.Drawing.Size(24, 14);
             this.layoutControlItem2.TextToControlDistance = 5;

+ 2 - 2
XdCxRhDW.App/CorTools/XlCalculateForm.cs

@@ -124,8 +124,8 @@ namespace XdCxRhDW.App.CorTools
                 }
                 catch (Exception ex)
                 {
-                    Serilog.Log.Error(ex, "请求星推算Api出错");
-                    DxHelper.MsgBoxHelper.ShowError("星推算错误");
+                    Serilog.Log.Error(ex, "请求星推算Api出错");
+                    DxHelper.MsgBoxHelper.ShowError("星推算错误");
                 }
             }
             Console.ReadLine();

+ 4 - 1
XdCxRhDW.App/CpuCgTools/DmcResult.cs

@@ -13,11 +13,12 @@ namespace XdCxRhDW.App.CpuCgTools
         {
         }
 
-        public DmcResult(int start, int length, string userName)
+        public DmcResult(int start, int length, string userName,double times)
         {
             Start = start;
             Length = length;
             UserName = userName;
+            Times = times;
         }
 
         public int Start { get; set; }
@@ -25,5 +26,7 @@ namespace XdCxRhDW.App.CpuCgTools
         public int Length { get; set; }
 
         public string UserName { get; set; }
+
+        public double Times { get; set; }
     }
 }

+ 162 - 1
XdCxRhDW.App/ExtensionsDev/MapControlEx.cs

@@ -1466,6 +1466,138 @@ public static class MapControlEx
         };
         innerData.mMapStorage.Items.Add(callout);
     }
+
+    /// <summary>
+    /// 绘制GDOP多条线 两个点绘制一个线段 1和2一个线段 3和4一个线段
+    /// </summary>
+    /// <param name="ctrl"></param>
+    /// <param name="wcKm"></param>
+    /// <param name="dots"></param>
+    /// <param name="patterncount"></param>
+    public static void DrawGdopLineTwo(this MapControl ctrl, string wcKm, IEnumerable<(double lon, double lat)> dots, int patterncount)
+    {
+        if (dots == null || !dots.Any()) return;
+        var innerData = ctrl.Tag as InnerData;
+
+        //多条线 两个点绘制一个线段 1和2一个线段 3和4一个线段
+        List<MapPolyline> polylines = new List<MapPolyline>();
+        int index = 0;
+        int count = dots.Count();
+
+        MapPolyline polyLine = null;
+        foreach (var item in dots)
+        {
+            if (index % 2 == 0)
+            {
+                if (polyLine != null)//添加线段
+                {
+                    polylines.Add(polyLine);
+                }
+                polyLine = new MapPolyline()
+                {
+                    Stroke = ColorHelper.GetColor(wcKm),
+                    StrokeWidth = 2,
+                    IsGeodesic = true,
+                    CanResize = false,
+                    CanEdit = false,
+                    CanRotate = false,
+                    IsHitTestVisible = true,
+                    CanMove = false,
+                    Tag = $"DrawGdopLine_{wcKm}",
+                };
+
+            }
+            polyLine.Points.Add(new GeoPoint(item.lat, item.lon));
+            if (patterncount == index)//提示公里信息
+            {
+                polyLine.TitleOptions.Pattern = wcKm;
+            }
+            index++;
+            if (index == count)//添加最后一个线段
+            {
+                polylines.Add(polyLine);
+            }
+
+        }
+        if (!polyLine.Points.Any()) return;
+        innerData.mMapStorage.Items.AddRange(polylines);
+
+    }
+    /// <summary>
+    /// 绘制半径圆
+    /// </summary>
+    /// <param name="ctrl"></param>
+    /// <param name="lat"></param>
+    /// <param name="lon"></param>
+    /// <param name="radius"></param>
+    public static void DrawRadiusRound(this MapControl ctrl, double lat, double lon, int radius)
+    {
+        var innerData = ctrl.Tag as InnerData;
+        try
+        {
+            if (radius <= 0)
+                return;
+
+            CoordPointCollection latLngs = new CoordPointCollection();
+            MyLatLng centerLatLng = new MyLatLng(lon, lat);
+
+            // 0 - 360度 寻找半径为radius,圆心为centerP的圆上点的经纬度
+            for (int i = 0; i < 360; i++)
+            {
+                //获取目标经纬度
+                MyLatLng tempLatLng = getMyLatLng(centerLatLng, radius, i);
+                //将自定义的经纬度类 转换成 标准经纬度类
+                CoordPoint p = new GeoPoint(tempLatLng.m_Latitude, tempLatLng.m_Longitude);
+                latLngs.Add(p);
+            }
+
+            //安全性检查
+            if (latLngs.Count < 20)
+            {
+                return;
+            }
+
+            //通过绘制多边形的方式绘制圆
+            MapPolygon gpol = new MapPolygon();
+            gpol.Points = latLngs;
+            gpol.Stroke = Color.Red;
+            gpol.Fill = Color.FromArgb(50, Color.Red);
+            gpol.IsHitTestVisible = true;
+            innerData.mMapStorageFixed.Items.Add(gpol);
+        }
+        catch (Exception ex)
+        {
+            //Dialog.Error(ex);
+        }
+    }
+    
+    /// <summary>
+    /// 度 转换成 弧度
+    /// </summary>
+    /// <param name="degrees"></param>
+    /// <returns></returns>
+    public static double DegreesToRadians(double degrees)
+    {
+        const double degToRadFactor = Math.PI / 180;
+        return degrees * degToRadFactor;
+    }
+
+    /**
+    * 求B点经纬度
+    * @param A 已知点的经纬度,
+    * @param distance   AB两地的距离  单位km
+    * @param angle  AB连线与正北方向的夹角(0~360)
+    * @return  B点的经纬度
+*/
+    private static MyLatLng getMyLatLng(MyLatLng A, double distance, double angle)
+    {
+        double dx = distance * 1000 * Math.Sin(DegreesToRadians(angle));
+        double dy = distance * 1000 * Math.Cos(DegreesToRadians(angle));
+
+        double bjd = (dx / A.Ed + A.m_RadLo) * 180 / Math.PI;
+        double bwd = (dy / A.Ec + A.m_RadLa) * 180 / Math.PI;
+        return new MyLatLng(bjd, bwd);
+    }
     public static void ClearRect(this MapControl ctrl)
     {
         var innerDate = ctrl.Tag as InnerData;
@@ -2166,7 +2298,36 @@ public static class MapControlEx
         }
     }
     #endregion
-
+    #region 半径圆
+    public class MyLatLng
+    {
+        public double Rc = 6378137;     //赤道半径
+        public double Rj = 6356725;     //极半径
+        public double m_LoDeg, m_LoMin, m_LoSec;
+        public double m_LaDeg, m_LaMin, m_LaSec;
+        public double m_Longitude, m_Latitude;
+        public double m_RadLo, m_RadLa;
+        public double Ec;
+        public double Ed;
+        public MyLatLng(double longitude, double latitude)
+        {
+            m_LoDeg = (int)longitude;
+            m_LoMin = (int)((longitude - m_LoDeg) * 60);
+            m_LoSec = (longitude - m_LoDeg - m_LoMin / 60) * 3600;
+
+            m_LaDeg = (int)latitude;
+            m_LaMin = (int)((latitude - m_LaDeg) * 60);
+            m_LaSec = (latitude - m_LaDeg - m_LaMin / 60) * 3600;
+
+            m_Longitude = longitude;
+            m_Latitude = latitude;
+            m_RadLo = longitude * Math.PI / 180;
+            m_RadLa = latitude * Math.PI / 180;
+            Ec = Rj + (Rc - Rj) * (90 - m_Latitude) / 90;
+            Ed = Ec * Math.Cos(m_RadLa);
+        }
+    }
+    #endregion
     #region ImageLayer数据源接口实现(本地和Http接口)
     class ImageTileSource : IImageTileSource
     {

+ 3 - 0
XdCxRhDW.App/ExtensionsDev/SearchLookUpEditExtension.cs

@@ -14,6 +14,9 @@ using System.Threading.Tasks;
 
 namespace ExtensionsDev
 {
+    /// <summary>
+    /// 
+    /// </summary>
     public static class SearchLookUpEditExtension
     {
         /// <summary>

+ 71 - 22
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -158,7 +158,7 @@ namespace XdCxRhDW.App.UserControl
                 }
 
 
-            
+
                 mapControl1.AddPosMenu<PosRes>("绘制时差线", SvgHelper.LoadFromFile("Image\\DtoLine.svg"), item =>
                 {
                     Draw2X1DDtoLine(item);
@@ -193,18 +193,31 @@ namespace XdCxRhDW.App.UserControl
                     options.Urls.Add($"http://+:{settings.HttpPort}");
                     httpServer = WebApp.Start<Startup>(options);
                 }
+                catch (System.Reflection.TargetInvocationException ex)
+                {
+                    httpServer = null;
+                    Serilog.Log.Error(ex, $"启动Http服务失败!");
+                    if (ex.InnerException is HttpListenerException)
+                    {
+                        DxHelper.MsgBoxHelper.ShowWarning($"启动Http服务失败,请以管理员身份运行程序!");
+                    }
+                    else
+                    {
+                        DxHelper.MsgBoxHelper.ShowWarning($"启动Http服务失败!");
+                    }
+                }
                 catch (Exception ex)
                 {
                     httpServer = null;
-                    Serilog.Log.Error(ex, "启动Http定位接口服务失败!");
-                    DxHelper.MsgBoxHelper.ShowWarning($"启动Http定位接口服务失败!");
+                    Serilog.Log.Error(ex, $"启动Http服务失败!");
+                    DxHelper.MsgBoxHelper.ShowWarning($"启动Http服务失败!");
                 }
             }
 
             WaitHelper.CloseForm();
         }
 
-      
+
         private async void Draw2X1DDtoLine(PosRes item)
         {
             try
@@ -742,30 +755,21 @@ namespace XdCxRhDW.App.UserControl
 
         private async void btnDrawDto_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
-            var ids = gridView2.GetSelectedRows();
-            if (ids.Length <= 0)
-            {
-                DxHelper.MsgBoxHelper.ShowWarning("请选择需要绘制时差线的定位数据信息!");
-                return;
-            }
-            var item = gridView2.GetRow(ids[0]) as PosRes;
-           var taskInfo= list.Find(m => m.ID == item.TaskID);
-            if (taskInfo == null)
-            {
-                DxHelper.MsgBoxHelper.ShowWarning($"未找到任务[{item.TaskID}]!");
-                return;
-            }
+            var info = GetPosRes("绘制时差");
+            var posRes = info.Item1;
+            if (posRes == null) return;
+            var posType = info.Item2;
             await Task.Run(() =>
             {
                 try
                 {
-                    switch (taskInfo.PosType)
+                    switch (posType)
                     {
                         case EnumPosType.X1D1CX:
                             throw new Exception("未实现一星一地类型绘制时差线");
                             break;
                         case EnumPosType.X2D1:
-                            Draw2X1DDtoLine(item);
+                            Draw2X1DDtoLine(posRes);
                             break;
                         case EnumPosType.RH:
                             throw new Exception("未实现融合类型绘制时差线");
@@ -777,11 +781,28 @@ namespace XdCxRhDW.App.UserControl
                 catch (Exception ex)
                 {
                     this.Invoke(new Action(() => DxHelper.MsgBoxHelper.ShowWarning($"绘制时差线失败,{ex.Message}")));
-                   
+
                 }
-               
+
             });
         }
+        private (PosRes, EnumPosType) GetPosRes(string msg)
+        {
+            var ids = gridView2.GetSelectedRows();
+            if (ids.Length <= 0)
+            {
+                DxHelper.MsgBoxHelper.ShowWarning($"请选择需要{msg}的定位数据信息!");
+                return (null, default);
+            }
+            var item = gridView2.GetRow(ids[0]) as PosRes;
+            var taskInfo = list.Find(m => m.ID == item.TaskID);
+            if (taskInfo == null)
+            {
+                DxHelper.MsgBoxHelper.ShowWarning($"未找到任务[{item.TaskID}]!");
+                return (null, default);
+            }
+            return (item, taskInfo.PosType);
+        }
 
         private void btnDrawDfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
@@ -795,7 +816,35 @@ namespace XdCxRhDW.App.UserControl
 
         private void btnGDOP_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
-            DxHelper.MsgBoxHelper.ShowWarning("未实现");
+            var info = GetPosRes("绘制GDOP");
+            var posRes = info.Item1;
+            if (posRes == null) return;
+            var posType = info.Item2;
+
+            try
+            {
+                switch (posType)
+                {
+                    case EnumPosType.X1D1CX:
+                        throw new Exception("未实现一星一地类型绘制GDOP");
+                        break;
+                    case EnumPosType.X2D1:
+                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(posRes.SigTime);
+                        x2D1GdopParam.mapControl1 = mapControl1;
+                        DxHelper.PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
+                        break;
+                    case EnumPosType.RH:
+                        throw new Exception("未实现融合类型绘制GDOP");
+                        break;
+                    default:
+                        break;
+                }
+            }
+            catch (Exception ex)
+            {
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制GDOP失败,{ex.Message}");
+
+            }
         }
     }
 

+ 37 - 37
XdCxRhDW.App/UserControl/CtrlSysSettings.Designer.cs

@@ -31,6 +31,7 @@ namespace XdCxRhDW.App.UserControl
         {
             this.tablePanel1 = new DevExpress.Utils.Layout.TablePanel();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.txtMapService = new DevExpress.XtraEditors.TextEdit();
             this.btnSave = new DevExpress.XtraEditors.SimpleButton();
             this.txtPort = new DevExpress.XtraEditors.TextEdit();
             this.txtIp = new DevExpress.XtraEditors.ComboBoxEdit();
@@ -42,12 +43,12 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtMapService = new DevExpress.XtraEditors.TextEdit();
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.tablePanel1)).BeginInit();
             this.tablePanel1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.txtMapService.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPort.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtIp.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtHttpPort.Properties)).BeginInit();
@@ -58,7 +59,6 @@ namespace XdCxRhDW.App.UserControl
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtMapService.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             this.SuspendLayout();
             // 
@@ -92,22 +92,30 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.layoutControl1.HiddenItems.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
             this.layoutControlItem2});
-            this.layoutControl1.Location = new System.Drawing.Point(265, 131);
+            this.layoutControl1.Location = new System.Drawing.Point(252, 79);
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.Root = this.Root;
             this.tablePanel1.SetRow(this.layoutControl1, 1);
-            this.layoutControl1.Size = new System.Drawing.Size(186, 364);
+            this.layoutControl1.Size = new System.Drawing.Size(213, 469);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
+            // txtMapService
+            // 
+            this.txtMapService.Location = new System.Drawing.Point(12, 270);
+            this.txtMapService.Name = "txtMapService";
+            this.txtMapService.Size = new System.Drawing.Size(189, 22);
+            this.txtMapService.StyleController = this.layoutControl1;
+            this.txtMapService.TabIndex = 7;
+            // 
             // btnSave
             // 
-            this.btnSave.Location = new System.Drawing.Point(11, 330);
+            this.btnSave.Location = new System.Drawing.Point(12, 332);
             this.btnSave.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.btnSave.MaximumSize = new System.Drawing.Size(0, 22);
             this.btnSave.MinimumSize = new System.Drawing.Size(0, 22);
             this.btnSave.Name = "btnSave";
-            this.btnSave.Size = new System.Drawing.Size(164, 22);
+            this.btnSave.Size = new System.Drawing.Size(189, 22);
             this.btnSave.StyleController = this.layoutControl1;
             this.btnSave.TabIndex = 4;
             this.btnSave.Text = "保存";
@@ -118,35 +126,35 @@ namespace XdCxRhDW.App.UserControl
             this.txtPort.EditValue = "16010";
             this.txtPort.Location = new System.Drawing.Point(11, 133);
             this.txtPort.Name = "txtPort";
-            this.txtPort.Size = new System.Drawing.Size(172, 20);
+            this.txtPort.Size = new System.Drawing.Size(172, 22);
             this.txtPort.StyleController = this.layoutControl1;
             this.txtPort.TabIndex = 5;
             // 
             // txtIp
             // 
-            this.txtIp.Location = new System.Drawing.Point(11, 27);
+            this.txtIp.Location = new System.Drawing.Point(12, 30);
             this.txtIp.Name = "txtIp";
             this.txtIp.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtIp.Size = new System.Drawing.Size(164, 20);
+            this.txtIp.Size = new System.Drawing.Size(189, 22);
             this.txtIp.StyleController = this.layoutControl1;
             this.txtIp.TabIndex = 4;
             // 
             // txtHttpPort
             // 
             this.txtHttpPort.EditValue = "8091";
-            this.txtHttpPort.Location = new System.Drawing.Point(11, 107);
+            this.txtHttpPort.Location = new System.Drawing.Point(12, 110);
             this.txtHttpPort.Name = "txtHttpPort";
-            this.txtHttpPort.Size = new System.Drawing.Size(164, 20);
+            this.txtHttpPort.Size = new System.Drawing.Size(189, 22);
             this.txtHttpPort.StyleController = this.layoutControl1;
             this.txtHttpPort.TabIndex = 5;
             // 
             // txtXLDirectory
             // 
-            this.txtXLDirectory.Location = new System.Drawing.Point(11, 187);
+            this.txtXLDirectory.Location = new System.Drawing.Point(12, 190);
             this.txtXLDirectory.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.txtXLDirectory.Name = "txtXLDirectory";
-            this.txtXLDirectory.Size = new System.Drawing.Size(164, 20);
+            this.txtXLDirectory.Size = new System.Drawing.Size(189, 22);
             this.txtXLDirectory.StyleController = this.layoutControl1;
             this.txtXLDirectory.TabIndex = 6;
             // 
@@ -174,7 +182,7 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem5,
             this.layoutControlItem6});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(186, 364);
+            this.Root.Size = new System.Drawing.Size(213, 469);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem1
@@ -184,11 +192,11 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 80);
             this.layoutControlItem1.MinSize = new System.Drawing.Size(89, 80);
             this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Size = new System.Drawing.Size(168, 80);
+            this.layoutControlItem1.Size = new System.Drawing.Size(193, 80);
             this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem1.Text = "本机IP";
             this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem1.TextSize = new System.Drawing.Size(79, 14);
+            this.layoutControlItem1.TextSize = new System.Drawing.Size(96, 14);
             // 
             // layoutControlItem3
             // 
@@ -196,7 +204,7 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem3.Location = new System.Drawing.Point(0, 320);
             this.layoutControlItem3.MinSize = new System.Drawing.Size(36, 26);
             this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Size = new System.Drawing.Size(168, 28);
+            this.layoutControlItem3.Size = new System.Drawing.Size(193, 129);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;
@@ -205,38 +213,30 @@ namespace XdCxRhDW.App.UserControl
             // 
             this.layoutControlItem4.Control = this.txtHttpPort;
             this.layoutControlItem4.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem4.CustomizationFormText = "HTTP接口端口";
+            this.layoutControlItem4.CustomizationFormText = "HTTP服务端口";
             this.layoutControlItem4.Location = new System.Drawing.Point(0, 80);
             this.layoutControlItem4.MaxSize = new System.Drawing.Size(0, 80);
             this.layoutControlItem4.MinSize = new System.Drawing.Size(89, 80);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(168, 80);
+            this.layoutControlItem4.Size = new System.Drawing.Size(193, 80);
             this.layoutControlItem4.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem4.Text = "HTTP接口端口";
+            this.layoutControlItem4.Text = "HTTP服务端口";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem4.TextSize = new System.Drawing.Size(79, 14);
+            this.layoutControlItem4.TextSize = new System.Drawing.Size(96, 14);
             // 
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.txtXLDirectory;
-            this.layoutControlItem5.CustomizationFormText = "星厉检测目录";
+            this.layoutControlItem5.CustomizationFormText = "星历自动导入目录";
             this.layoutControlItem5.Location = new System.Drawing.Point(0, 160);
             this.layoutControlItem5.MaxSize = new System.Drawing.Size(0, 80);
             this.layoutControlItem5.MinSize = new System.Drawing.Size(89, 80);
             this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(168, 80);
+            this.layoutControlItem5.Size = new System.Drawing.Size(193, 80);
             this.layoutControlItem5.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem5.Text = "星厉检测目录";
+            this.layoutControlItem5.Text = "星历自动导入目录";
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem5.TextSize = new System.Drawing.Size(79, 14);
-            // 
-            // txtMapService
-            // 
-            this.txtMapService.Location = new System.Drawing.Point(11, 267);
-            this.txtMapService.Name = "txtMapService";
-            this.txtMapService.Size = new System.Drawing.Size(164, 20);
-            this.txtMapService.StyleController = this.layoutControl1;
-            this.txtMapService.TabIndex = 7;
+            this.layoutControlItem5.TextSize = new System.Drawing.Size(96, 14);
             // 
             // layoutControlItem6
             // 
@@ -245,11 +245,11 @@ namespace XdCxRhDW.App.UserControl
             this.layoutControlItem6.MaxSize = new System.Drawing.Size(0, 80);
             this.layoutControlItem6.MinSize = new System.Drawing.Size(73, 80);
             this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(168, 80);
+            this.layoutControlItem6.Size = new System.Drawing.Size(193, 80);
             this.layoutControlItem6.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.layoutControlItem6.Text = "地图服务";
+            this.layoutControlItem6.Text = "Wms地址";
             this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem6.TextSize = new System.Drawing.Size(79, 14);
+            this.layoutControlItem6.TextSize = new System.Drawing.Size(96, 14);
             // 
             // CtrlSysSettings
             // 
@@ -263,6 +263,7 @@ namespace XdCxRhDW.App.UserControl
             this.tablePanel1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.txtMapService.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtPort.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtIp.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtHttpPort.Properties)).EndInit();
@@ -273,7 +274,6 @@ namespace XdCxRhDW.App.UserControl
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtMapService.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             this.ResumeLayout(false);
 

+ 70 - 72
XdCxRhDW.App/UserControl/X2D1GDOPParam.Designer.cs

@@ -101,20 +101,20 @@
             this.layoutControl1.Controls.Add(this.btnClose);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.layoutControl1.Location = new System.Drawing.Point(0, 0);
-            this.layoutControl1.Margin = new System.Windows.Forms.Padding(4);
+            this.layoutControl1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(993, 379, 650, 400);
             this.layoutControl1.Root = this.Root;
-            this.layoutControl1.Size = new System.Drawing.Size(394, 716);
+            this.layoutControl1.Size = new System.Drawing.Size(345, 557);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
             // btnOK
             // 
-            this.btnOK.Location = new System.Drawing.Point(199, 389);
-            this.btnOK.Margin = new System.Windows.Forms.Padding(4);
+            this.btnOK.Location = new System.Drawing.Point(174, 317);
+            this.btnOK.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(193, 27);
+            this.btnOK.Size = new System.Drawing.Size(169, 22);
             this.btnOK.StyleController = this.layoutControl1;
             this.btnOK.TabIndex = 12;
             this.btnOK.Text = "确定";
@@ -123,30 +123,30 @@
             // txtCapTime
             // 
             this.txtCapTime.EditValue = null;
-            this.txtCapTime.Location = new System.Drawing.Point(2, 132);
+            this.txtCapTime.Location = new System.Drawing.Point(2, 108);
             this.txtCapTime.Margin = new System.Windows.Forms.Padding(2);
-            this.txtCapTime.MaximumSize = new System.Drawing.Size(0, 28);
-            this.txtCapTime.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtCapTime.MaximumSize = new System.Drawing.Size(0, 22);
+            this.txtCapTime.MinimumSize = new System.Drawing.Size(0, 22);
             this.txtCapTime.Name = "txtCapTime";
             this.txtCapTime.Properties.AutoHeight = false;
             this.txtCapTime.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
             this.txtCapTime.Properties.CalendarTimeProperties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
-            this.txtCapTime.Size = new System.Drawing.Size(390, 28);
+            this.txtCapTime.Size = new System.Drawing.Size(341, 22);
             this.txtCapTime.StyleController = this.layoutControl1;
             this.txtCapTime.TabIndex = 8;
             // 
             // txtStationLocation1
             // 
             this.txtStationLocation1.EditValue = "";
-            this.txtStationLocation1.Location = new System.Drawing.Point(2, 186);
+            this.txtStationLocation1.Location = new System.Drawing.Point(2, 152);
             this.txtStationLocation1.Margin = new System.Windows.Forms.Padding(2);
-            this.txtStationLocation1.MaximumSize = new System.Drawing.Size(0, 28);
-            this.txtStationLocation1.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtStationLocation1.MaximumSize = new System.Drawing.Size(0, 22);
+            this.txtStationLocation1.MinimumSize = new System.Drawing.Size(0, 22);
             this.txtStationLocation1.Name = "txtStationLocation1";
             this.txtStationLocation1.Properties.AutoHeight = false;
-            this.txtStationLocation1.Size = new System.Drawing.Size(390, 28);
+            this.txtStationLocation1.Size = new System.Drawing.Size(341, 22);
             this.txtStationLocation1.StyleController = this.layoutControl1;
             this.txtStationLocation1.TabIndex = 11;
             this.txtStationLocation1.ToolTip = "经度纬度之间用英文逗号隔开";
@@ -154,13 +154,13 @@
             // txtRefLocation1
             // 
             this.txtRefLocation1.EditValue = "";
-            this.txtRefLocation1.Location = new System.Drawing.Point(2, 240);
+            this.txtRefLocation1.Location = new System.Drawing.Point(2, 196);
             this.txtRefLocation1.Margin = new System.Windows.Forms.Padding(2);
-            this.txtRefLocation1.MaximumSize = new System.Drawing.Size(0, 28);
-            this.txtRefLocation1.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtRefLocation1.MaximumSize = new System.Drawing.Size(0, 22);
+            this.txtRefLocation1.MinimumSize = new System.Drawing.Size(0, 22);
             this.txtRefLocation1.Name = "txtRefLocation1";
             this.txtRefLocation1.Properties.AutoHeight = false;
-            this.txtRefLocation1.Size = new System.Drawing.Size(390, 28);
+            this.txtRefLocation1.Size = new System.Drawing.Size(341, 22);
             this.txtRefLocation1.StyleController = this.layoutControl1;
             this.txtRefLocation1.TabIndex = 10;
             this.txtRefLocation1.ToolTip = "经度纬度之间用英文逗号隔开";
@@ -168,10 +168,10 @@
             // txtTleMain
             // 
             this.txtTleMain.EditValue = "";
-            this.txtTleMain.Location = new System.Drawing.Point(2, 24);
+            this.txtTleMain.Location = new System.Drawing.Point(2, 20);
             this.txtTleMain.Margin = new System.Windows.Forms.Padding(2);
-            this.txtTleMain.MaximumSize = new System.Drawing.Size(0, 28);
-            this.txtTleMain.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtTleMain.MaximumSize = new System.Drawing.Size(0, 22);
+            this.txtTleMain.MinimumSize = new System.Drawing.Size(0, 22);
             this.txtTleMain.Name = "txtTleMain";
             this.txtTleMain.Properties.AutoHeight = false;
             this.txtTleMain.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
@@ -179,27 +179,26 @@
             this.txtTleMain.Properties.NullText = "";
             this.txtTleMain.Properties.PopupSizeable = false;
             this.txtTleMain.Properties.PopupView = this.searchLookUpEdit1View;
-            this.txtTleMain.Size = new System.Drawing.Size(390, 28);
+            this.txtTleMain.Size = new System.Drawing.Size(341, 22);
             this.txtTleMain.StyleController = this.layoutControl1;
             this.txtTleMain.TabIndex = 4;
             this.txtTleMain.ToolTip = "填写卫星的双行根数";
             // 
             // searchLookUpEdit1View
             // 
-            this.searchLookUpEdit1View.DetailHeight = 450;
             this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
             this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
-            this.searchLookUpEdit1View.OptionsEditForm.PopupEditFormWidth = 492;
+            this.searchLookUpEdit1View.OptionsEditForm.PopupEditFormWidth = 430;
             this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
             this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
             // 
             // txtTleAdja
             // 
             this.txtTleAdja.EditValue = "";
-            this.txtTleAdja.Location = new System.Drawing.Point(2, 78);
+            this.txtTleAdja.Location = new System.Drawing.Point(2, 64);
             this.txtTleAdja.Margin = new System.Windows.Forms.Padding(2);
-            this.txtTleAdja.MaximumSize = new System.Drawing.Size(0, 28);
-            this.txtTleAdja.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtTleAdja.MaximumSize = new System.Drawing.Size(0, 22);
+            this.txtTleAdja.MinimumSize = new System.Drawing.Size(0, 22);
             this.txtTleAdja.Name = "txtTleAdja";
             this.txtTleAdja.Properties.AutoHeight = false;
             this.txtTleAdja.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
@@ -207,27 +206,26 @@
             this.txtTleAdja.Properties.NullText = "";
             this.txtTleAdja.Properties.PopupSizeable = false;
             this.txtTleAdja.Properties.PopupView = this.gridView1;
-            this.txtTleAdja.Size = new System.Drawing.Size(390, 28);
+            this.txtTleAdja.Size = new System.Drawing.Size(341, 22);
             this.txtTleAdja.StyleController = this.layoutControl1;
             this.txtTleAdja.TabIndex = 5;
             this.txtTleAdja.ToolTip = "填写卫星的双行根数";
             // 
             // gridView1
             // 
-            this.gridView1.DetailHeight = 450;
             this.gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
             this.gridView1.Name = "gridView1";
-            this.gridView1.OptionsEditForm.PopupEditFormWidth = 492;
+            this.gridView1.OptionsEditForm.PopupEditFormWidth = 430;
             this.gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
             this.gridView1.OptionsView.ShowGroupPanel = false;
             // 
             // txtDtousErr1
             // 
             this.txtDtousErr1.EditValue = "";
-            this.txtDtousErr1.Location = new System.Drawing.Point(2, 294);
+            this.txtDtousErr1.Location = new System.Drawing.Point(2, 240);
             this.txtDtousErr1.Margin = new System.Windows.Forms.Padding(2);
-            this.txtDtousErr1.MaximumSize = new System.Drawing.Size(0, 28);
-            this.txtDtousErr1.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtDtousErr1.MaximumSize = new System.Drawing.Size(0, 22);
+            this.txtDtousErr1.MinimumSize = new System.Drawing.Size(0, 22);
             this.txtDtousErr1.Name = "txtDtousErr1";
             this.txtDtousErr1.Properties.AutoHeight = false;
             this.txtDtousErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
@@ -235,7 +233,7 @@
             this.txtDtousErr1.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtDtousErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtDtousErr1.Properties.MaskSettings.Set("mask", "f");
-            this.txtDtousErr1.Size = new System.Drawing.Size(390, 28);
+            this.txtDtousErr1.Size = new System.Drawing.Size(341, 22);
             this.txtDtousErr1.StyleController = this.layoutControl1;
             this.txtDtousErr1.TabIndex = 6;
             this.txtDtousErr1.ToolTip = "ECEF坐标X";
@@ -243,10 +241,10 @@
             // txtSatLocErr1
             // 
             this.txtSatLocErr1.EditValue = "";
-            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 348);
+            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 284);
             this.txtSatLocErr1.Margin = new System.Windows.Forms.Padding(2);
-            this.txtSatLocErr1.MaximumSize = new System.Drawing.Size(0, 28);
-            this.txtSatLocErr1.MinimumSize = new System.Drawing.Size(0, 28);
+            this.txtSatLocErr1.MaximumSize = new System.Drawing.Size(0, 22);
+            this.txtSatLocErr1.MinimumSize = new System.Drawing.Size(0, 22);
             this.txtSatLocErr1.Name = "txtSatLocErr1";
             this.txtSatLocErr1.Properties.AutoHeight = false;
             this.txtSatLocErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
@@ -254,17 +252,17 @@
             this.txtSatLocErr1.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtSatLocErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtSatLocErr1.Properties.MaskSettings.Set("mask", "f");
-            this.txtSatLocErr1.Size = new System.Drawing.Size(390, 28);
+            this.txtSatLocErr1.Size = new System.Drawing.Size(341, 22);
             this.txtSatLocErr1.StyleController = this.layoutControl1;
             this.txtSatLocErr1.TabIndex = 6;
             this.txtSatLocErr1.ToolTip = "ECEF坐标X";
             // 
             // btnClose
             // 
-            this.btnClose.Location = new System.Drawing.Point(2, 390);
+            this.btnClose.Location = new System.Drawing.Point(2, 320);
             this.btnClose.Margin = new System.Windows.Forms.Padding(2);
             this.btnClose.Name = "btnClose";
-            this.btnClose.Size = new System.Drawing.Size(193, 27);
+            this.btnClose.Size = new System.Drawing.Size(168, 22);
             this.btnClose.StyleController = this.layoutControl1;
             this.btnClose.TabIndex = 13;
             this.btnClose.Text = "关闭";
@@ -286,7 +284,7 @@
             this.emptySpaceItem2,
             this.layoutControlItem2});
             this.Root.Name = "Root";
-            this.Root.Size = new System.Drawing.Size(394, 716);
+            this.Root.Size = new System.Drawing.Size(345, 557);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem8
@@ -295,122 +293,122 @@
             this.layoutControlItem8.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem8.Location = new System.Drawing.Point(0, 0);
             this.layoutControlItem8.Name = "layoutControlItem8";
-            this.layoutControlItem8.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem8.Size = new System.Drawing.Size(345, 44);
             this.layoutControlItem8.Text = "主星星历";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem8.TextSize = new System.Drawing.Size(90, 18);
+            this.layoutControlItem8.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem9
             // 
             this.layoutControlItem9.Control = this.txtTleAdja;
             this.layoutControlItem9.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem9.Location = new System.Drawing.Point(0, 54);
+            this.layoutControlItem9.Location = new System.Drawing.Point(0, 44);
             this.layoutControlItem9.Name = "layoutControlItem9";
-            this.layoutControlItem9.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem9.Size = new System.Drawing.Size(345, 44);
             this.layoutControlItem9.Text = "邻星星历";
             this.layoutControlItem9.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem9.TextSize = new System.Drawing.Size(90, 18);
+            this.layoutControlItem9.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem11
             // 
             this.layoutControlItem11.Control = this.txtCapTime;
             this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem11.Location = new System.Drawing.Point(0, 108);
+            this.layoutControlItem11.Location = new System.Drawing.Point(0, 88);
             this.layoutControlItem11.Name = "layoutControlItem11";
-            this.layoutControlItem11.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem11.Size = new System.Drawing.Size(345, 44);
             this.layoutControlItem11.Text = "采集时刻";
             this.layoutControlItem11.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem11.TextSize = new System.Drawing.Size(90, 18);
+            this.layoutControlItem11.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem14
             // 
             this.layoutControlItem14.Control = this.txtRefLocation1;
             this.layoutControlItem14.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem14.Location = new System.Drawing.Point(0, 216);
+            this.layoutControlItem14.Location = new System.Drawing.Point(0, 176);
             this.layoutControlItem14.Name = "layoutControlItem14";
-            this.layoutControlItem14.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem14.Size = new System.Drawing.Size(345, 44);
             this.layoutControlItem14.Text = "参考站经纬度";
             this.layoutControlItem14.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem14.TextSize = new System.Drawing.Size(90, 18);
+            this.layoutControlItem14.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem13
             // 
             this.layoutControlItem13.Control = this.txtStationLocation1;
             this.layoutControlItem13.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem13.Location = new System.Drawing.Point(0, 162);
+            this.layoutControlItem13.Location = new System.Drawing.Point(0, 132);
             this.layoutControlItem13.Name = "layoutControlItem13";
-            this.layoutControlItem13.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem13.Size = new System.Drawing.Size(345, 44);
             this.layoutControlItem13.Text = "超短站经纬度";
             this.layoutControlItem13.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem13.TextSize = new System.Drawing.Size(90, 18);
+            this.layoutControlItem13.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem4
             // 
             this.layoutControlItem4.Control = this.txtDtousErr1;
             this.layoutControlItem4.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem4.CustomizationFormText = "低轨卫星X";
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 270);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 220);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem4.Size = new System.Drawing.Size(345, 44);
             this.layoutControlItem4.Text = "时差误差";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem4.TextSize = new System.Drawing.Size(90, 18);
+            this.layoutControlItem4.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.txtSatLocErr1;
             this.layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem5.CustomizationFormText = "低轨卫星X";
-            this.layoutControlItem5.Location = new System.Drawing.Point(0, 324);
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 264);
             this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(394, 54);
+            this.layoutControlItem5.Size = new System.Drawing.Size(345, 44);
             this.layoutControlItem5.Text = "星历位置误差";
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
-            this.layoutControlItem5.TextSize = new System.Drawing.Size(90, 18);
+            this.layoutControlItem5.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.btnOK;
-            this.layoutControlItem1.Location = new System.Drawing.Point(197, 378);
+            this.layoutControlItem1.Location = new System.Drawing.Point(172, 308);
             this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 11, 2);
-            this.layoutControlItem1.Size = new System.Drawing.Size(197, 41);
+            this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 9, 2);
+            this.layoutControlItem1.Size = new System.Drawing.Size(173, 36);
             this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem1.TextVisible = false;
             // 
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 419);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 344);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(394, 297);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(345, 213);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 378);
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 308);
             this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(197, 10);
+            this.emptySpaceItem2.Size = new System.Drawing.Size(172, 10);
             this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
             // layoutControlItem2
             // 
             this.layoutControlItem2.Control = this.btnClose;
-            this.layoutControlItem2.Location = new System.Drawing.Point(0, 388);
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 318);
             this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.Size = new System.Drawing.Size(197, 31);
+            this.layoutControlItem2.Size = new System.Drawing.Size(172, 26);
             this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem2.TextVisible = false;
             // 
             // X2D1GDOPParam
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.layoutControl1);
-            this.Margin = new System.Windows.Forms.Padding(4);
+            this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
             this.Name = "X2D1GDOPParam";
-            this.Size = new System.Drawing.Size(394, 716);
+            this.Size = new System.Drawing.Size(345, 557);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties.CalendarTimeProperties)).EndInit();

+ 46 - 62
XdCxRhDW.App/UserControl/X2D1GDOPParam.cs

@@ -1,18 +1,12 @@
-using DevExpress.XtraEditors;
-using DevExpress.XtraMap;
-using DxHelper;
+using DevExpress.XtraMap;
 using ExtensionsDev;
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
 using System.Linq;
 using XdCxRhDW.App.Model;
 using XdCxRhDW.App.EFContext;
-using System.Data.Entity;
-using System.Windows.Documents;
 using XdCxRhDW.App.Api.GDOP误差椭圆;
+using System.Collections.Generic;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X2D1GDOPParam : DevExpress.XtraEditors.XtraUserControl
@@ -38,46 +32,55 @@ namespace XdCxRhDW.App.UserControl
             txtTleAdja.UseDoubleClickToSelectAll();
             txtStationLocation1.UseDoubleClickToSelectAll();
             txtRefLocation1.UseDoubleClickToSelectAll();
-
-            List<TxInfo> listTx = new List<TxInfo>();
-            using (RHDWContext db = new RHDWContext())
-            {
-                listTx = db.TxInfos.ToList();
-            }
-            var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
-            if (cdbTx != null)
-            {
-                this.txtStationLocation1.Text = $"{cdbTx.Lon},{cdbTx.Lat}";
-            }
-            var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
-            if (cdbTx != null)
-            {
-                this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
-            }
             this.txtCapTime.DateTime = sigTime;
-
-            List<XlInfo> xlList = new List<XlInfo>();
-            using (RHDWContext db = new RHDWContext())
-            {
-                var res = db.XlInfos.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ);
-                xlList.AddRange(res.ToList());
-            }
             this.txtDtousErr1.EditValue = 1;
             this.txtSatLocErr1.EditValue = 1000;
-            var xlall = xlList.Select(m => m.TwoLine);
+            List<string> xlall = new List<string>();
+            string mainTle = string.Empty;
+            string adjaTle = string.Empty;
+            using (RHDWContext db = new RHDWContext())
+            {
+                var sats = db.SatInfos.ToList();
 
-            if (xlall.Count() == 0) return;
-            txtTleMain.UseDefault().SetStringData(xlall);
-            txtTleAdja.UseDefault().SetStringData(xlall);
+                var list = db.TxInfos.ToList();
+                var mainTx = list.Find(p => p.TxType == EnumTxType.MainSat);
+                var adjaTx = list.Find(p => p.TxType == EnumTxType.AdjaSat);
+                var cdbTx = list.Find(p => p.TxType == EnumTxType.Cdb);
+                if (cdbTx != null)
+                {
+                    this.txtStationLocation1.Text = $"{cdbTx.Lon},{cdbTx.Lat}";
+                }
+                var cxTx = list.Find(p => p.TxType == EnumTxType.Cx);
+                var refLoc = list.Find(p => p.TxType == EnumTxType.Ref);
+                if (refLoc != null)
+                {
+                    this.txtRefLocation1.Text = $"{refLoc.Lon},{refLoc.Lat}";
+                }
+                var xlList = db.XlInfos.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
+                xlall.AddRange(xlList.Select(m => m.TwoLine));
+                if (xlall.Count() == 0) return;
+                if (mainTx != null && xlList.Any(m => m.SatCode == mainTx.SatInfo.SatCode))
+                {
+                    mainTle = xlList.First(m => m.SatCode == mainTx.SatInfo.SatCode).TwoLine;
+                }
+                else
+                {
+                    mainTle = xlList.First().TwoLine;
+                }
 
-            var mainSat = listTx.Find(p => p.TxType == EnumTxType.MainSat);
-            txtTleMain.Text = mainSat != null && xlList.Any(m => m.SatCode == mainSat.SatInfoID) ?
-                xlList.Find(m => m.SatCode == mainSat.SatInfoID).TwoLine : xlList.First().TwoLine;
+                if (adjaTx != null && xlList.Any(m => m.SatCode == adjaTx.SatInfo.SatCode))
+                {
+                    adjaTle = xlList.First(m => m.SatCode == adjaTx.SatInfo.SatCode).TwoLine;
+                }
+                else
+                {
+                    adjaTle = xlList.First().TwoLine;
+                }
+            }
 
-            var adjaSat = listTx.Find(p => p.TxType == EnumTxType.AdjaSat);
-            txtTleMain.Text = adjaSat != null && xlList.Any(m => m.SatCode == adjaSat.SatInfoID) ?
-               xlList.Find(m => m.SatCode == adjaSat.SatInfoID).TwoLine : xlList.First().TwoLine;
 
+            txtTleMain.UseDefault().SetStringData(xlall).Text = mainTle;
+            txtTleAdja.UseDefault().SetStringData(xlall).Text = adjaTle;
         }
 
 
@@ -91,34 +94,15 @@ namespace XdCxRhDW.App.UserControl
             {
                 return;
             }
-            if (listSat != null)//画卫星
-            {
-                foreach (var sat in listSat)
-                {
-                    mapControl1.Invoke(new Action(() =>
-                    {
-                        string satCode = sat.SatCode == null ? "未知" : sat.SatCode.ToString();
-                        mapControl1.DrawFixedImg("sat", sat.SatLat, sat.SatLon, DxHelper.SvgHelper.CreateSat(), new Size(32, 32), $"卫星编号:{satCode}\r\n轨道经度:{sat.SatLon}°\r\n轨道纬度:{sat.SatLat}°");
-                        //mapControl1.DrawEllipse(sat.SatLat, sat.SatLon, 4800);
-                    }));
-                }
-            }
-            if ((Model.StationLon >= 180 || Model.StationLon <= 180) && Model.StationLat >= -90 || Model.StationLat <= 90)//画天线
-            {
-                mapControl1.Invoke(new Action(() =>
-                {
-                    mapControl1.DrawFixedImg("cdb", Model.StationLat, Model.StationLon, SvgHelper.LoadFromFile("Image\\tx.svg"), new Size(32, 32), $"超短站经度:{Model.StationLon}°\r\n超短站纬度:{Model.StationLat}°");
-                }));
-            }
             foreach (var errLins in data)//画GDOP
             {
                 var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
-                //mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, 1);
+                mapControl1.DrawGdopLineTwo(errLins.ErrDistanceKm, mapDots, 1);
             }
         }
         private void btnClose_Click(object sender, EventArgs e)
         {
-            PopupHelper.HidePopup(this);
+            DxHelper.PopupHelper.HidePopup(this);
         }
     }
     public class GDOP星地两星一地接口

+ 3 - 1
XdCxRhDW.App/WebAPI/Controllers/BaseController.cs

@@ -2,6 +2,7 @@
 using System;
 using System.Collections.Generic;
 using System.Configuration;
+using System.Diagnostics;
 using System.Linq;
 using System.Net.Http;
 using System.Text;
@@ -58,6 +59,7 @@ namespace XdCxRhDW.App.WebAPI
                 client.Timeout = TimeSpan.FromSeconds(10);
                 var message = new HttpRequestMessage(HttpMethod.Post, url);
                 message.Content = data;
+              
                 var response = client.SendAsync(message).Result;
                 response.EnsureSuccessStatusCode();
                 var result = response.Content.ReadAsStringAsync().Result;
@@ -96,7 +98,7 @@ namespace XdCxRhDW.App.WebAPI
             /// </summary>
             public string msg { get; set; } = "ok";
             /// <summary>
-            /// 0正确 -1错误
+            /// 状态码.成功=200,失败=0
             /// </summary>
             public int code { get; set; } = 200;
 

+ 10 - 9
XdCxRhDW.App/WebAPI/Controllers/DetectCgController.cs

@@ -60,7 +60,7 @@ namespace XdCxRhDW.App.WebAPI
             return (true, string.Empty);
         }
         /// <summary>
-        /// 参估计算
+        /// CPU参估计算
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -110,7 +110,7 @@ namespace XdCxRhDW.App.WebAPI
                 return Error<EstimationResDto>("参估计算所需数据超出文件范围!");
             }
             EstimationResDto resDto = new EstimationResDto();
-            resDto.Tm = result.tm;
+            resDto.TimeMs = result.tm;
             resDto.Smpstart = result.smpstart;
             resDto.Smplen = result.smplen;
             resDto.File1 = result.file1;
@@ -159,7 +159,7 @@ namespace XdCxRhDW.App.WebAPI
         }
 
         /// <summary>
-        /// 检测计算
+        /// 信号检测(支持DAMA、IBS、能量检测)
         /// </summary>
         /// <param name="dto"></param>
         /// <returns></returns>
@@ -176,11 +176,12 @@ namespace XdCxRhDW.App.WebAPI
             List<DetectResDto> list = new List<DetectResDto>();
             try
             {
-                var dmcResult = await XcorrUtils.DmcCheckAsync(dto.file1, dto.dmcType);
+                var dmcResult = await XcorrUtils.DmcCheckAsync(dto.file1,dto.fsHz, dto.dmcType);
                 foreach (var dmcItem in dmcResult)
                 {
                     DetectResDto detectRes = new DetectResDto(dmcItem.Start, dmcItem.Length, dmcItem.UserName);
                     detectRes.File1 = dto.file1;
+                    detectRes.TimeMs = dmcItem.Times;
                     list.Add(detectRes);
 
                 }
@@ -211,11 +212,11 @@ namespace XdCxRhDW.App.WebAPI
         /// </summary>
         /// <returns></returns>
         [HttpPost, SwaggerForm]
-        public async Task<AjaxResult<string>> UploadFile()
+        public async Task<AjaxResult<FileDto>> UploadFile()
         {
             if (!Request.Content.IsMimeMultipartContent("form-data"))
             {
-                return Error<string>("请求数据不是multipart/form-data类型");
+                return Error<FileDto>("请求数据不是multipart/form-data类型");
             }
             var provider = new MultipartMemoryStreamProvider();
             await Request.Content.ReadAsMultipartAsync(provider);
@@ -223,15 +224,15 @@ namespace XdCxRhDW.App.WebAPI
             var content = provider.Contents.First();
             var fileName = Guid.NewGuid().ToString()+".dat";
             var fileData = await content.ReadAsByteArrayAsync();
-
+            FileDto fileDto = new FileDto();
+            fileDto.FileName = fileName;
             // 将文件保存到本地文件夹中
             var filePath = Path.Combine(UploadFolder, fileName);
             using (var fileStream = new FileStream(filePath, FileMode.Create))
             {
                 await fileStream.WriteAsync(fileData, 0, fileData.Length);
             }
-
-            return Success<string>(fileName);
+            return Success(fileDto);
         }
     }
 }

+ 2 - 2
XdCxRhDW.App/WebAPI/Controllers/XlController.cs

@@ -26,7 +26,7 @@ namespace XdCxRhDW.App.WebAPI
     public class XlController : BaseController
     {
         /// <summary>
-        /// 推算某个时间点星
+        /// 推算某个时间点星
         /// </summary>
         /// <param name="tleStr">双行根</param>
         /// <param name="dt">推算时刻(北京时刻)</param>
@@ -39,7 +39,7 @@ namespace XdCxRhDW.App.WebAPI
         }
 
         /// <summary>
-        /// 推算某个时间段星
+        /// 推算某个时间段星星历
         /// </summary>
         /// <param name="tleStr">双行根</param>
         /// <param name="start">开始时刻(北京时刻)</param>

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

@@ -476,6 +476,7 @@
     </None>
   </ItemGroup>
   <ItemGroup>
+    <None Include="xcorr\enc-test.dat" />
     <None Include="星历推算\readme.txt">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
@@ -531,6 +532,10 @@
     <Content Include="xcorr\dmc.exe">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="xcorr\enc.exe">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+    <Content Include="xcorr\encreadme.txt" />
     <Content Include="xcorr\XcorrCpu.exe">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>

BIN
XdCxRhDW.App/xcorr/enc-test.dat


BIN
XdCxRhDW.App/xcorr/enc.exe


+ 4 - 0
XdCxRhDW.App/xcorr/encreadme.txt

@@ -0,0 +1,4 @@
+信号识别 -> ok
+
+enc.exe enc-test.dat 0.096 5 0
+文件名称  采样率(M) 均值  样点数(0 表示全部文件)

+ 10 - 10
XdCxRhDw.Dto/CalcDto.cs

@@ -14,21 +14,21 @@ namespace XdCxRhDw.Dto
     public class CalcDto
     {
         /// <summary>
-        /// 数据文件1
+        /// 上传后返回的文件名
         /// </summary>
-        public String file1 { get; set; }
+        public string file1 { get; set; }
+
         /// <summary>
-        /// 数据文件2
+        /// 上传后返回的文件名
         /// </summary>
-        public String file2 { get; set; }
+        public string file2 { get; set; }
 
-        [Range(1, 5, ErrorMessage = "111")]
         /// <summary>
         /// 开始样点
         /// </summary>
         public int smpStart { get; set; }  
         /// <summary>
-        /// 样点数
+        /// 样点数(0表示文件末尾)
         /// </summary>
         public int smpCount { get; set; }      
         /// <summary>
@@ -42,13 +42,13 @@ namespace XdCxRhDw.Dto
         /// <summary>
         /// 时差范围(us)
         /// </summary>
-        public double dtRange { get; set; }   
+        public double dtRange { get; set; }
         /// <summary>
-        /// 频差范围(Hz)
+        /// 频差范围(单位Hz,默认16384)
         /// </summary>
-        public double dfRange { get; set; } 
+        public double dfRange { get; set; } = 16384;
         /// <summary>
-        /// 信噪比dB
+        /// 信噪比门限dB
         /// </summary>
         public double snrThreshold { get; set; }
 

+ 25 - 5
XdCxRhDw.Dto/DetectDto.cs

@@ -13,20 +13,40 @@ namespace XdCxRhDw.Dto
     public class DetectDto
     {
         /// <summary>
-        /// 数据文件1
+        /// 调用Upload接口上传文件后返回的文件名
+        /// </summary>
+        public string file1 { get; set; }
+        /// <summary>
+        /// 检测类型(DAMA=1,IBS=2,能量检测=3) 
         /// </summary>
-        public String file1 { get; set; }
-        
         public DmcType dmcType { get; set; }
 
+        /// <summary>
+        /// 采样率 Hz
+        /// </summary>
+        public double fsHz { get; set; }
     }
     /// <summary>
     /// 检测类型
     /// </summary>
     public enum DmcType
     {
+        /// <summary>
+        /// DAMA检测
+        /// </summary>
+        [Display(Name ="DAMA")]
         DAMA=1,
-        IBS=2,
-        Ky5758=3
+
+        /// <summary>
+        /// IBS检测
+        /// </summary>
+        [Display(Name = "IBS")]
+        IBS =2,
+
+        /// <summary>
+        /// 能量检测
+        /// </summary>
+        [Display(Name = "能量检测")]
+        Ky5758 =3
     }
 }

+ 9 - 3
XdCxRhDw.Dto/DetectResDto.cs

@@ -29,6 +29,10 @@ namespace XdCxRhDw.Dto
             Length = length;
             UserName = userName;
         }
+        /// <summary>
+        /// 文件名
+        /// </summary>
+        public string File1 { get; set; }
 
         /// <summary>
         /// 检测开始样点
@@ -38,16 +42,18 @@ namespace XdCxRhDw.Dto
         /// 检测样点长度
         /// </summary>
         public int Length { get; set; }
+
         /// <summary>
         /// 检测用户名称
         /// </summary>
-
         public string UserName { get; set; }
 
         /// <summary>
-        /// 数据文件
+        /// 耗时(ms)
         /// </summary>
-        public String File1 { get; set; }
+        public double TimeMs { get; set; }
+
+
 
     }
 }

+ 14 - 15
XdCxRhDw.Dto/EstimationResDto.cs

@@ -11,7 +11,16 @@ namespace XdCxRhDw.Dto
     /// </summary>
     public class EstimationResDto
     {
-        
+        /// <summary>
+        /// 文件1名称
+        /// </summary>
+        public string File1 { get; set; }
+
+        /// <summary>
+        /// 文件2名称
+        /// </summary>
+        public string File2 { get; set; }
+
         /// <summary>
         /// 相关时差,单位:us
         /// </summary>
@@ -28,29 +37,19 @@ namespace XdCxRhDw.Dto
         public double Snr { get; set; }
 
         /// <summary>
-        /// 耗时(s)
+        /// 耗时(ms)
         /// </summary>
-        public double Tm { get; set; }
+        public double TimeMs { get; set; }
 
         /// <summary>
         /// 开始样点
         /// </summary>
-        public Int64 Smpstart { get; set; }
+        public long Smpstart { get; set; }
 
         /// <summary>
         /// 样点长度
         /// </summary>
-        public Int64 Smplen { get; set; }
-
-        /// <summary>
-        /// 数据文件1
-        /// </summary>
-        public String File1 { get; set; }
-
-        /// <summary>
-        /// 数据文件2
-        /// </summary>
-        public String File2 { get; set; }
+        public long Smplen { get; set; }
 
     }
 }

+ 19 - 0
XdCxRhDw.Dto/FileDto.cs

@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace XdCxRhDw.Dto
+{
+    /// <summary>
+    /// 文件DTO
+    /// </summary>
+    public class FileDto
+    {
+        /// <summary>
+        /// 上传文件后返回的名称
+        /// </summary>
+        public string FileName { get; set; }
+    }
+}

+ 1 - 0
XdCxRhDw.Dto/XdCxRhDw.Dto.csproj

@@ -50,6 +50,7 @@
     <Compile Include="DetectDto.cs" />
     <Compile Include="DetectResDto.cs" />
     <Compile Include="EstimationResDto.cs" />
+    <Compile Include="FileDto.cs" />
     <Compile Include="PosResQueryDto.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="SendDto.cs" />