cherry 1 year ago
parent
commit
b6affc43e4

File diff suppressed because it is too large
+ 4 - 0
XdDw.App/Image/tx.svg


+ 0 - 0
XdDw.App/Properties/licenses.licx


+ 7 - 48
XdDw.App/UserControl/CtrlPosXd.cs

@@ -39,6 +39,7 @@ namespace XdDw.App.UserControl
     public partial class CtrlPosXd : DevExpress.XtraEditors.XtraUserControl
     {
         DtXDParam dtxdctrl = null;
+        X2D1GDOPParam x2D1GdopParam = null;
         TcpServer tcpServer;
         public CtrlPosXd()
         {
@@ -128,41 +129,12 @@ namespace XdDw.App.UserControl
                     .AddMapMenu("停止加载", SvgHelper.LoadFromFile("Image\\Stop.svg"), (lon, lat) => stoped = true)
                     .AddMapMenu("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), (lon, lat) =>
                     {
-                        var ctrl = new X2D1GDOPParam();
-                        PopupHelper.ShowPopup(ctrl, mapControl1, mapControl1.Width / 4, onHide: hideReason =>
+                        if (x2D1GdopParam == null)
                         {
-                            if (hideReason == HideReason.Defalut) return;
-                            var model = ctrl.Model;
-                            var (listSat, data) = GdopHelper.Gdop2Sat1DRef(new double[] { model.StationLon, model.StationLat },
-                              new double[] { model.RefLon, model.RefLat }, model.TleMain, model.TleAdja, model.CapTime, model.DtousErr, model.SatLocErr);
-                            if (data == null)
-                            {
-                                return;
-                            }
-                            if (listSat != null)//画卫星
-                            {
-                                foreach (var sat in listSat)
-                                {
-                                    mapControl1.Invoke(new Action(() =>
-                                    {
-                                        string satCode = sat.SatCode == null ? "未知" : sat.SatCode.ToString();
-                                        mapControl1.DrawFixedImg("sat", sat.SatLat, sat.SatLon, DxHelper.SvgHelper.CreateSat(), new Size(32, 32), $"卫星编号:{satCode}\r\n轨道经度:{sat.SatLon}°\r\n轨道纬度:{sat.SatLat}°");
-                                    }));
-                                }
-                            }
-                            foreach (var errLins in data)//画GDOP
-                            {
-                                foreach (var line in errLins.MapLines)
-                                {
-                                    var newLine = SampleDots(line);
-                                    mapControl1.Invoke(new Action(() =>
-                                    {
-                                        var mapLines = newLine.Line.Select(p => (errLins.ErrDistanceKm, p.Lon, p.Lat));
-                                        mapControl1.DrawGdopLine(mapLines);
-                                    }));
-                                }
-                            }
-                        });
+                            x2D1GdopParam = new X2D1GDOPParam();
+                        }
+                        x2D1GdopParam.mapControl1 = mapControl1;
+                        PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
                     })
 
                     .AddPosMenu<XDPosRes>("误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), item =>
@@ -442,19 +414,6 @@ namespace XdDw.App.UserControl
                 XtraMessageBox.Show($"绘制误差椭圆线失败,失败信息:{ex.Message}");
             }
         }
-        public XdDw.App.DTO.MapLine SampleDots(XdDw.App.DTO.MapLine line)
-        {
-            var dots = line.Line;
-            if (dots.Count < 30) return line;
-            var tmp = dots.Count / 30;
-            var newLine = new XdDw.App.DTO.MapLine();
-            for (int i = 0; i < dots.Count; i += tmp)
-            {
-                newLine.Line.Add(dots[i]);
-            }
-            if (!newLine.Line.Contains(dots.Last()))
-                newLine.Line.Add(dots.Last());
-            return newLine;
-        }
+       
     }
 }

+ 57 - 30
XdDw.App/UserControl/X2D1GDOPParam.Designer.cs

@@ -60,6 +60,8 @@
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
             this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            this.btnClose = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties)).BeginInit();
@@ -83,6 +85,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -95,9 +98,10 @@
             this.layoutControl1.Controls.Add(this.txtTleAdja);
             this.layoutControl1.Controls.Add(this.txtDtousErr1);
             this.layoutControl1.Controls.Add(this.txtSatLocErr1);
+            this.layoutControl1.Controls.Add(this.btnClose);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.layoutControl1.Location = new System.Drawing.Point(0, 0);
-            this.layoutControl1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.layoutControl1.Margin = new System.Windows.Forms.Padding(5);
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(993, 379, 650, 400);
             this.layoutControl1.Root = this.Root;
@@ -107,8 +111,8 @@
             // 
             // btnOK
             // 
-            this.btnOK.Location = new System.Drawing.Point(249, 461);
-            this.btnOK.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.btnOK.Location = new System.Drawing.Point(249, 468);
+            this.btnOK.Margin = new System.Windows.Forms.Padding(5);
             this.btnOK.Name = "btnOK";
             this.btnOK.Size = new System.Drawing.Size(241, 32);
             this.btnOK.StyleController = this.layoutControl1;
@@ -119,7 +123,7 @@
             // txtCapTime
             // 
             this.txtCapTime.EditValue = null;
-            this.txtCapTime.Location = new System.Drawing.Point(2, 156);
+            this.txtCapTime.Location = new System.Drawing.Point(2, 159);
             this.txtCapTime.MaximumSize = new System.Drawing.Size(0, 34);
             this.txtCapTime.MinimumSize = new System.Drawing.Size(0, 34);
             this.txtCapTime.Name = "txtCapTime";
@@ -135,7 +139,7 @@
             // txtStationLocation1
             // 
             this.txtStationLocation1.EditValue = "";
-            this.txtStationLocation1.Location = new System.Drawing.Point(2, 220);
+            this.txtStationLocation1.Location = new System.Drawing.Point(2, 224);
             this.txtStationLocation1.MaximumSize = new System.Drawing.Size(0, 34);
             this.txtStationLocation1.MinimumSize = new System.Drawing.Size(0, 34);
             this.txtStationLocation1.Name = "txtStationLocation1";
@@ -148,7 +152,7 @@
             // txtRefLocation1
             // 
             this.txtRefLocation1.EditValue = "";
-            this.txtRefLocation1.Location = new System.Drawing.Point(2, 284);
+            this.txtRefLocation1.Location = new System.Drawing.Point(2, 289);
             this.txtRefLocation1.MaximumSize = new System.Drawing.Size(0, 34);
             this.txtRefLocation1.MinimumSize = new System.Drawing.Size(0, 34);
             this.txtRefLocation1.Name = "txtRefLocation1";
@@ -161,7 +165,7 @@
             // txtTleMain
             // 
             this.txtTleMain.EditValue = "";
-            this.txtTleMain.Location = new System.Drawing.Point(2, 28);
+            this.txtTleMain.Location = new System.Drawing.Point(2, 29);
             this.txtTleMain.MaximumSize = new System.Drawing.Size(0, 34);
             this.txtTleMain.MinimumSize = new System.Drawing.Size(0, 34);
             this.txtTleMain.Name = "txtTleMain";
@@ -188,7 +192,7 @@
             // txtTleAdja
             // 
             this.txtTleAdja.EditValue = "";
-            this.txtTleAdja.Location = new System.Drawing.Point(2, 92);
+            this.txtTleAdja.Location = new System.Drawing.Point(2, 94);
             this.txtTleAdja.MaximumSize = new System.Drawing.Size(0, 34);
             this.txtTleAdja.MinimumSize = new System.Drawing.Size(0, 34);
             this.txtTleAdja.Name = "txtTleAdja";
@@ -215,7 +219,7 @@
             // txtDtousErr1
             // 
             this.txtDtousErr1.EditValue = "";
-            this.txtDtousErr1.Location = new System.Drawing.Point(2, 348);
+            this.txtDtousErr1.Location = new System.Drawing.Point(2, 354);
             this.txtDtousErr1.MaximumSize = new System.Drawing.Size(0, 34);
             this.txtDtousErr1.MinimumSize = new System.Drawing.Size(0, 34);
             this.txtDtousErr1.Name = "txtDtousErr1";
@@ -230,7 +234,7 @@
             // txtSatLocErr1
             // 
             this.txtSatLocErr1.EditValue = "";
-            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 412);
+            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 419);
             this.txtSatLocErr1.MaximumSize = new System.Drawing.Size(0, 34);
             this.txtSatLocErr1.MinimumSize = new System.Drawing.Size(0, 34);
             this.txtSatLocErr1.Name = "txtSatLocErr1";
@@ -255,7 +259,8 @@
             this.layoutControlItem5,
             this.layoutControlItem1,
             this.emptySpaceItem1,
-            this.emptySpaceItem2});
+            this.emptySpaceItem2,
+            this.layoutControlItem2});
             this.Root.Name = "Root";
             this.Root.Size = new System.Drawing.Size(493, 875);
             this.Root.TextVisible = false;
@@ -266,7 +271,7 @@
             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(493, 64);
+            this.layoutControlItem8.Size = new System.Drawing.Size(493, 65);
             this.layoutControlItem8.Text = "主星星历";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(108, 22);
@@ -275,9 +280,9 @@
             // 
             this.layoutControlItem9.Control = this.txtTleAdja;
             this.layoutControlItem9.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem9.Location = new System.Drawing.Point(0, 64);
+            this.layoutControlItem9.Location = new System.Drawing.Point(0, 65);
             this.layoutControlItem9.Name = "layoutControlItem9";
-            this.layoutControlItem9.Size = new System.Drawing.Size(493, 64);
+            this.layoutControlItem9.Size = new System.Drawing.Size(493, 65);
             this.layoutControlItem9.Text = "邻星星历";
             this.layoutControlItem9.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem9.TextSize = new System.Drawing.Size(108, 22);
@@ -286,9 +291,9 @@
             // 
             this.layoutControlItem11.Control = this.txtCapTime;
             this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem11.Location = new System.Drawing.Point(0, 128);
+            this.layoutControlItem11.Location = new System.Drawing.Point(0, 130);
             this.layoutControlItem11.Name = "layoutControlItem11";
-            this.layoutControlItem11.Size = new System.Drawing.Size(493, 64);
+            this.layoutControlItem11.Size = new System.Drawing.Size(493, 65);
             this.layoutControlItem11.Text = "采集时刻";
             this.layoutControlItem11.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem11.TextSize = new System.Drawing.Size(108, 22);
@@ -297,9 +302,9 @@
             // 
             this.layoutControlItem14.Control = this.txtRefLocation1;
             this.layoutControlItem14.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem14.Location = new System.Drawing.Point(0, 256);
+            this.layoutControlItem14.Location = new System.Drawing.Point(0, 260);
             this.layoutControlItem14.Name = "layoutControlItem14";
-            this.layoutControlItem14.Size = new System.Drawing.Size(493, 64);
+            this.layoutControlItem14.Size = new System.Drawing.Size(493, 65);
             this.layoutControlItem14.Text = "参考站经纬度";
             this.layoutControlItem14.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem14.TextSize = new System.Drawing.Size(108, 22);
@@ -308,9 +313,9 @@
             // 
             this.layoutControlItem13.Control = this.txtStationLocation1;
             this.layoutControlItem13.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem13.Location = new System.Drawing.Point(0, 192);
+            this.layoutControlItem13.Location = new System.Drawing.Point(0, 195);
             this.layoutControlItem13.Name = "layoutControlItem13";
-            this.layoutControlItem13.Size = new System.Drawing.Size(493, 64);
+            this.layoutControlItem13.Size = new System.Drawing.Size(493, 65);
             this.layoutControlItem13.Text = "超短站经纬度";
             this.layoutControlItem13.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem13.TextSize = new System.Drawing.Size(108, 22);
@@ -320,9 +325,9 @@
             this.layoutControlItem4.Control = this.txtDtousErr1;
             this.layoutControlItem4.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem4.CustomizationFormText = "低轨卫星X";
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 320);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 325);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(493, 64);
+            this.layoutControlItem4.Size = new System.Drawing.Size(493, 65);
             this.layoutControlItem4.Text = "时差误差";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(108, 22);
@@ -332,9 +337,9 @@
             this.layoutControlItem5.Control = this.txtSatLocErr1;
             this.layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem5.CustomizationFormText = "低轨卫星X";
-            this.layoutControlItem5.Location = new System.Drawing.Point(0, 384);
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 390);
             this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(493, 64);
+            this.layoutControlItem5.Size = new System.Drawing.Size(493, 65);
             this.layoutControlItem5.Text = "星历位置误差";
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem5.TextSize = new System.Drawing.Size(108, 22);
@@ -342,7 +347,7 @@
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.btnOK;
-            this.layoutControlItem1.Location = new System.Drawing.Point(246, 448);
+            this.layoutControlItem1.Location = new System.Drawing.Point(246, 455);
             this.layoutControlItem1.Name = "layoutControlItem1";
             this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(3, 3, 13, 3);
             this.layoutControlItem1.Size = new System.Drawing.Size(247, 48);
@@ -352,25 +357,44 @@
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 496);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 503);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(493, 379);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(493, 372);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 448);
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 455);
             this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(246, 48);
+            this.emptySpaceItem2.Size = new System.Drawing.Size(246, 12);
             this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
+            // btnClose
+            // 
+            this.btnClose.Location = new System.Drawing.Point(2, 469);
+            this.btnClose.Name = "btnClose";
+            this.btnClose.Size = new System.Drawing.Size(242, 32);
+            this.btnClose.StyleController = this.layoutControl1;
+            this.btnClose.TabIndex = 13;
+            this.btnClose.Text = "关闭";
+            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // layoutControlItem2
+            // 
+            this.layoutControlItem2.Control = this.btnClose;
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 467);
+            this.layoutControlItem2.Name = "layoutControlItem2";
+            this.layoutControlItem2.Size = new System.Drawing.Size(246, 36);
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem2.TextVisible = false;
+            // 
             // X2D1GDOPParam
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 22F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.Controls.Add(this.layoutControl1);
-            this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.Margin = new System.Windows.Forms.Padding(5);
             this.Name = "X2D1GDOPParam";
             this.Size = new System.Drawing.Size(493, 875);
             this.Load += new System.EventHandler(this.X2D1GDOPParam_Load);
@@ -397,6 +421,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -424,5 +449,7 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
+        private DevExpress.XtraEditors.SimpleButton btnClose;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
     }
 }

+ 60 - 0
XdDw.App/UserControl/X2D1GDOPParam.cs

@@ -1,4 +1,5 @@
 using DevExpress.XtraEditors;
+using DevExpress.XtraMap;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -6,17 +7,20 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
 using System.Drawing;
+using System.IO;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using XdDw.App;
+using XdDw.App.Api.星地GDOP误差椭圆;
 using XzXdDw.App.Model;
 
 namespace XdDw.App.UserControl
 {
     public partial class X2D1GDOPParam : DevExpress.XtraEditors.XtraUserControl
     {
+        public MapControl mapControl1;
         public GDOP星地两星一地接口 Model=> new GDOP星地两星一地接口()
         {
             TleMain = txtTleMain.Text.Trim(),
@@ -53,6 +57,62 @@ namespace XdDw.App.UserControl
         }
 
         private void btnOK_Click(object sender, EventArgs e)
+        {
+            mapControl1.ClearMap();
+            var (listSat, data) = GdopHelper.Gdop2Sat1DRef(new double[] { Model.StationLon, Model.StationLat },
+                              new double[] { Model.RefLon, Model.RefLat }, Model.TleMain, Model.TleAdja, Model.CapTime, Model.DtousErr, Model.SatLocErr);
+            if (data == null)
+            {
+                return;
+            }
+            if (listSat != null)//画卫星
+            {
+                foreach (var sat in listSat)
+                {
+                    mapControl1.Invoke(new Action(() =>
+                    {
+                        string satCode = sat.SatCode == null ? "未知" : sat.SatCode.ToString();
+                        mapControl1.DrawFixedImg("sat", sat.SatLat, sat.SatLon, DxHelper.SvgHelper.CreateSat(), new Size(32, 32), $"卫星编号:{satCode}\r\n轨道经度:{sat.SatLon}°\r\n轨道纬度:{sat.SatLat}°");
+                    }));
+                }
+            }
+            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
+            {
+                foreach (var line in errLins.MapLines)
+                {
+                    var newLine = SampleDots(line);
+                    mapControl1.Invoke(new Action(() =>
+                    {
+                        var mapLines = newLine.Line.Select(p => (errLins.ErrDistanceKm, p.Lon, p.Lat));
+                        mapControl1.DrawGdopLine(mapLines);
+                    }));
+                }
+            }
+        }
+
+        public XdDw.App.DTO.MapLine SampleDots(XdDw.App.DTO.MapLine line)
+        {
+            var dots = line.Line;
+            if (dots.Count < 30) return line;
+            var tmp = dots.Count / 30;
+            var newLine = new XdDw.App.DTO.MapLine();
+            for (int i = 0; i < dots.Count; i += tmp)
+            {
+                newLine.Line.Add(dots[i]);
+            }
+            if (!newLine.Line.Contains(dots.Last()))
+                newLine.Line.Add(dots.Last());
+            return newLine;
+        }
+
+        private void btnClose_Click(object sender, EventArgs e)
         {
             PopupHelper.HidePopup(this);
         }

+ 3 - 0
XdDw.App/XdDw.App.csproj

@@ -434,6 +434,9 @@
     <Content Include="Image\Pos.svg">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="Image\tx.svg">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="定位.ico" />
   </ItemGroup>
   <ItemGroup>

+ 7 - 48
XzDw.App/UserControl/CtrlPosXz.cs

@@ -45,6 +45,7 @@ namespace XzXdDw.App.UserControl
         /// 时差初值 范围计算
         /// </summary>
         DtSXLParam dtsxlctrl = null;
+        XZGDOPParam xzGdopParam=null;
         double MBfu;
         double CKfu;
         private TxInfo refTx;
@@ -148,41 +149,12 @@ namespace XzXdDw.App.UserControl
                     .AddMapMenu("停止加载", SvgHelper.LoadFromFile("Image\\Stop.svg"), (lon, lat) => stoped = true)
                     .AddMapMenu("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), (lon, lat) =>
                     {
-                        var ctrl = new XZGDOPParam( refTx, MBfu,  CKfu);
-                        PopupHelper.ShowPopup(ctrl, mapControl1, mapControl1.Width / 4, onHide: hideReason =>
+                        if (xzGdopParam == null)
                         {
-                            if (hideReason == HideReason.Defalut) return;
-                            var model = ctrl.Model;
-                            var (listSat, data) = GdopHelper.GdopLeoTowSatDRef(
-                              new double[] { model.RefLon, model.RefLat }, model.TleLeo1, model.TleLeo2, model.CapTime, model.DtousErr, model.DfoErr, model.SatLocErr, model.EphVelErr, model.fu1, model.fu2);
-                            if (data == null)
-                            {
-                                return;
-                            }
-                            if (listSat != null)//画卫星
-                            {
-                                foreach (var sat in listSat)
-                                {
-                                    mapControl1.Invoke(new Action(() =>
-                                    {
-                                        string satCode = sat.SatCode == null ? "未知" : sat.SatCode.ToString();
-                                        mapControl1.DrawFixedImg("sat", sat.SatLat, sat.SatLon, DxHelper.SvgHelper.CreateSat(), new Size(32, 32), $"卫星编号:{satCode}\r\n轨道经度:{sat.SatLon}°\r\n轨道纬度:{sat.SatLat}°");
-                                    }));
-                                }
-                            }
-                            foreach (var errLins in data)//画GDOP
-                            {
-                                foreach (var line in errLins.MapLines)
-                                {
-                                    var newLine = SampleDots(line);
-                                    mapControl1.Invoke(new Action(() =>
-                                    {
-                                        var mapLines = newLine.Line.Select(p => (errLins.ErrDistanceKm, p.Lon, p.Lat));
-                                        mapControl1.DrawGdopLine(mapLines);
-                                    }));
-                                }
-                            }
-                        });
+                            xzGdopParam = new XZGDOPParam(refTx,MBfu,CKfu);
+                        }
+                        xzGdopParam.mapControl1 = mapControl1;
+                        PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);
                     })
                     .AddPosMenu<XZPosRes>("误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), item =>
                     {
@@ -512,19 +484,6 @@ namespace XzXdDw.App.UserControl
                 XtraMessageBox.Show($"绘制误差椭圆线失败,失败信息:{ex.Message}");
             }
         }
-        public XdCxRhDW.App.DTO.MapLine SampleDots(XdCxRhDW.App.DTO.MapLine line)
-        {
-            var dots = line.Line;
-            if (dots.Count < 30) return line;
-            var tmp = dots.Count / 30;
-            var newLine = new XdCxRhDW.App.DTO.MapLine();
-            for (int i = 0; i < dots.Count; i += tmp)
-            {
-                newLine.Line.Add(dots[i]);
-            }
-            if (!newLine.Line.Contains(dots.Last()))
-                newLine.Line.Add(dots.Last());
-            return newLine;
-        }
+       
     }
 }

+ 88 - 88
XzDw.App/UserControl/XZGDOPParam .Designer.cs

@@ -28,6 +28,11 @@
         /// </summary>
         private void InitializeComponent()
         {
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions6 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject21 = new DevExpress.Utils.SerializableAppearanceObject();
+            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();
@@ -53,11 +58,6 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions5 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject17 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject18 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject19 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject20 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.btnOK = new DevExpress.XtraEditors.SimpleButton();
             this.txtCapTime = new DevExpress.XtraEditors.DateEdit();
@@ -79,15 +79,15 @@
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
             this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
-            this.btnClose = new DevExpress.XtraLayout.LayoutControlItem();
+            this.emptySpaceItem2 = new DevExpress.XtraLayout.EmptySpaceItem();
+            this.btnClose = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtCapTime.Properties)).BeginInit();
@@ -110,14 +110,14 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.btnClose)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -133,7 +133,7 @@
             this.layoutControl1.Controls.Add(this.txtEphVelErr1);
             this.layoutControl1.Controls.Add(this.txtFu1);
             this.layoutControl1.Controls.Add(this.txtFu2);
-            this.layoutControl1.Controls.Add(this.simpleButton1);
+            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(6, 5, 6, 5);
@@ -146,7 +146,7 @@
             // 
             // btnOK
             // 
-            this.btnOK.Location = new System.Drawing.Point(249, 432);
+            this.btnOK.Location = new System.Drawing.Point(249, 408);
             this.btnOK.Margin = new System.Windows.Forms.Padding(6, 5, 6, 5);
             this.btnOK.Name = "btnOK";
             this.btnOK.Size = new System.Drawing.Size(241, 32);
@@ -158,7 +158,7 @@
             // txtCapTime
             // 
             this.txtCapTime.EditValue = null;
-            this.txtCapTime.Location = new System.Drawing.Point(3, 172);
+            this.txtCapTime.Location = new System.Drawing.Point(2, 161);
             this.txtCapTime.MaximumSize = new System.Drawing.Size(0, 35);
             this.txtCapTime.MinimumSize = new System.Drawing.Size(0, 35);
             this.txtCapTime.Name = "txtCapTime";
@@ -167,19 +167,19 @@
             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(240, 35);
+            this.txtCapTime.Size = new System.Drawing.Size(242, 35);
             this.txtCapTime.StyleController = this.layoutControl1;
             this.txtCapTime.TabIndex = 8;
             // 
             // txtRefLocation1
             // 
             this.txtRefLocation1.EditValue = "";
-            this.txtRefLocation1.Location = new System.Drawing.Point(249, 172);
+            this.txtRefLocation1.Location = new System.Drawing.Point(248, 161);
             this.txtRefLocation1.MaximumSize = new System.Drawing.Size(0, 35);
             this.txtRefLocation1.MinimumSize = new System.Drawing.Size(0, 35);
             this.txtRefLocation1.Name = "txtRefLocation1";
             this.txtRefLocation1.Properties.AutoHeight = false;
-            this.txtRefLocation1.Size = new System.Drawing.Size(241, 35);
+            this.txtRefLocation1.Size = new System.Drawing.Size(243, 35);
             this.txtRefLocation1.StyleController = this.layoutControl1;
             this.txtRefLocation1.TabIndex = 10;
             this.txtRefLocation1.ToolTip = "经度纬度之间用英文逗号隔开";
@@ -187,7 +187,7 @@
             // txtTleLeo1
             // 
             this.txtTleLeo1.EditValue = "";
-            this.txtTleLeo1.Location = new System.Drawing.Point(3, 32);
+            this.txtTleLeo1.Location = new System.Drawing.Point(2, 29);
             this.txtTleLeo1.MaximumSize = new System.Drawing.Size(0, 35);
             this.txtTleLeo1.MinimumSize = new System.Drawing.Size(0, 35);
             this.txtTleLeo1.Name = "txtTleLeo1";
@@ -197,7 +197,7 @@
             this.txtTleLeo1.Properties.NullText = "";
             this.txtTleLeo1.Properties.PopupSizeable = false;
             this.txtTleLeo1.Properties.PopupView = this.searchLookUpEdit1View;
-            this.txtTleLeo1.Size = new System.Drawing.Size(487, 35);
+            this.txtTleLeo1.Size = new System.Drawing.Size(489, 35);
             this.txtTleLeo1.StyleController = this.layoutControl1;
             this.txtTleLeo1.TabIndex = 4;
             this.txtTleLeo1.ToolTip = "填写卫星的双行根数";
@@ -214,7 +214,7 @@
             // txtTleLeo2
             // 
             this.txtTleLeo2.EditValue = "";
-            this.txtTleLeo2.Location = new System.Drawing.Point(3, 102);
+            this.txtTleLeo2.Location = new System.Drawing.Point(2, 95);
             this.txtTleLeo2.MaximumSize = new System.Drawing.Size(0, 35);
             this.txtTleLeo2.MinimumSize = new System.Drawing.Size(0, 35);
             this.txtTleLeo2.Name = "txtTleLeo2";
@@ -224,7 +224,7 @@
             this.txtTleLeo2.Properties.NullText = "";
             this.txtTleLeo2.Properties.PopupSizeable = false;
             this.txtTleLeo2.Properties.PopupView = this.gridView1;
-            this.txtTleLeo2.Size = new System.Drawing.Size(487, 35);
+            this.txtTleLeo2.Size = new System.Drawing.Size(489, 35);
             this.txtTleLeo2.StyleController = this.layoutControl1;
             this.txtTleLeo2.TabIndex = 5;
             this.txtTleLeo2.ToolTip = "填写卫星的双行根数";
@@ -241,14 +241,14 @@
             // txtDtousErr1
             // 
             this.txtDtousErr1.EditValue = "";
-            this.txtDtousErr1.Location = new System.Drawing.Point(3, 242);
+            this.txtDtousErr1.Location = new System.Drawing.Point(2, 227);
             this.txtDtousErr1.MaximumSize = new System.Drawing.Size(0, 35);
             this.txtDtousErr1.MinimumSize = new System.Drawing.Size(0, 35);
             this.txtDtousErr1.Name = "txtDtousErr1";
             this.txtDtousErr1.Properties.AutoHeight = false;
             this.txtDtousErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions7, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject25, serializableAppearanceObject26, serializableAppearanceObject27, serializableAppearanceObject28, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtDtousErr1.Size = new System.Drawing.Size(240, 35);
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -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.txtDtousErr1.Size = new System.Drawing.Size(242, 35);
             this.txtDtousErr1.StyleController = this.layoutControl1;
             this.txtDtousErr1.TabIndex = 6;
             this.txtDtousErr1.ToolTip = "ECEF坐标X";
@@ -256,59 +256,59 @@
             // txtSatLocErr1
             // 
             this.txtSatLocErr1.EditValue = "";
-            this.txtSatLocErr1.Location = new System.Drawing.Point(3, 312);
+            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 293);
             this.txtSatLocErr1.MaximumSize = new System.Drawing.Size(0, 35);
             this.txtSatLocErr1.MinimumSize = new System.Drawing.Size(0, 35);
             this.txtSatLocErr1.Name = "txtSatLocErr1";
             this.txtSatLocErr1.Properties.AutoHeight = false;
             this.txtSatLocErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtSatLocErr1.Size = new System.Drawing.Size(240, 35);
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m", -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.txtSatLocErr1.Size = new System.Drawing.Size(242, 35);
             this.txtSatLocErr1.StyleController = this.layoutControl1;
             this.txtSatLocErr1.TabIndex = 6;
             this.txtSatLocErr1.ToolTip = "ECEF坐标X";
             // 
             // txtDfoErr1
             // 
-            this.txtDfoErr1.Location = new System.Drawing.Point(249, 242);
+            this.txtDfoErr1.Location = new System.Drawing.Point(248, 227);
             this.txtDfoErr1.MaximumSize = new System.Drawing.Size(0, 35);
             this.txtDfoErr1.MinimumSize = new System.Drawing.Size(0, 35);
             this.txtDfoErr1.Name = "txtDfoErr1";
             this.txtDfoErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -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.txtDfoErr1.Size = new System.Drawing.Size(241, 35);
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -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.txtDfoErr1.Size = new System.Drawing.Size(243, 35);
             this.txtDfoErr1.StyleController = this.layoutControl1;
             this.txtDfoErr1.TabIndex = 13;
             // 
             // txtEphVelErr1
             // 
-            this.txtEphVelErr1.Location = new System.Drawing.Point(249, 312);
+            this.txtEphVelErr1.Location = new System.Drawing.Point(248, 293);
             this.txtEphVelErr1.MaximumSize = new System.Drawing.Size(0, 35);
             this.txtEphVelErr1.MinimumSize = new System.Drawing.Size(0, 35);
             this.txtEphVelErr1.Name = "txtEphVelErr1";
             this.txtEphVelErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m/s", -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.txtEphVelErr1.Size = new System.Drawing.Size(241, 35);
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m/s", -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.txtEphVelErr1.Size = new System.Drawing.Size(243, 35);
             this.txtEphVelErr1.StyleController = this.layoutControl1;
             this.txtEphVelErr1.TabIndex = 14;
             // 
             // txtFu1
             // 
-            this.txtFu1.Location = new System.Drawing.Point(3, 382);
+            this.txtFu1.Location = new System.Drawing.Point(2, 359);
             this.txtFu1.Name = "txtFu1";
             this.txtFu1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtFu1.Size = new System.Drawing.Size(240, 34);
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtFu1.Size = new System.Drawing.Size(242, 34);
             this.txtFu1.StyleController = this.layoutControl1;
             this.txtFu1.TabIndex = 15;
             // 
             // txtFu2
             // 
-            this.txtFu2.Location = new System.Drawing.Point(249, 382);
+            this.txtFu2.Location = new System.Drawing.Point(248, 359);
             this.txtFu2.Name = "txtFu2";
             this.txtFu2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtFu2.Size = new System.Drawing.Size(241, 34);
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtFu2.Size = new System.Drawing.Size(243, 34);
             this.txtFu2.StyleController = this.layoutControl1;
             this.txtFu2.TabIndex = 16;
             // 
@@ -320,16 +320,16 @@
             this.layoutControlItem9,
             this.layoutControlItem11,
             this.layoutControlItem5,
-            this.layoutControlItem1,
             this.emptySpaceItem1,
-            this.emptySpaceItem2,
             this.layoutControlItem4,
             this.layoutControlItem10,
             this.layoutControlItem14,
             this.layoutControlItem6,
             this.layoutControlItem7,
             this.layoutControlItem12,
-            this.btnClose});
+            this.layoutControlItem1,
+            this.emptySpaceItem2,
+            this.layoutControlItem2});
             this.Root.Name = "Root";
             this.Root.Size = new System.Drawing.Size(493, 875);
             this.Root.TextVisible = false;
@@ -340,7 +340,7 @@
             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(493, 70);
+            this.layoutControlItem8.Size = new System.Drawing.Size(493, 66);
             this.layoutControlItem8.Text = "主星星历";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(108, 22);
@@ -349,9 +349,9 @@
             // 
             this.layoutControlItem9.Control = this.txtTleLeo2;
             this.layoutControlItem9.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem9.Location = new System.Drawing.Point(0, 70);
+            this.layoutControlItem9.Location = new System.Drawing.Point(0, 66);
             this.layoutControlItem9.Name = "layoutControlItem9";
-            this.layoutControlItem9.Size = new System.Drawing.Size(493, 70);
+            this.layoutControlItem9.Size = new System.Drawing.Size(493, 66);
             this.layoutControlItem9.Text = "邻星星历";
             this.layoutControlItem9.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem9.TextSize = new System.Drawing.Size(108, 22);
@@ -360,9 +360,9 @@
             // 
             this.layoutControlItem11.Control = this.txtCapTime;
             this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem11.Location = new System.Drawing.Point(0, 140);
+            this.layoutControlItem11.Location = new System.Drawing.Point(0, 132);
             this.layoutControlItem11.Name = "layoutControlItem11";
-            this.layoutControlItem11.Size = new System.Drawing.Size(246, 70);
+            this.layoutControlItem11.Size = new System.Drawing.Size(246, 66);
             this.layoutControlItem11.Text = "采集时刻";
             this.layoutControlItem11.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem11.TextSize = new System.Drawing.Size(108, 22);
@@ -372,9 +372,9 @@
             this.layoutControlItem5.Control = this.txtSatLocErr1;
             this.layoutControlItem5.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem5.CustomizationFormText = "低轨卫星X";
-            this.layoutControlItem5.Location = new System.Drawing.Point(0, 280);
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 264);
             this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(246, 70);
+            this.layoutControlItem5.Size = new System.Drawing.Size(246, 66);
             this.layoutControlItem5.Text = "星历位置误差";
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem5.TextSize = new System.Drawing.Size(108, 22);
@@ -382,7 +382,7 @@
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.btnOK;
-            this.layoutControlItem1.Location = new System.Drawing.Point(246, 419);
+            this.layoutControlItem1.Location = new System.Drawing.Point(246, 395);
             this.layoutControlItem1.Name = "layoutControlItem1";
             this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(3, 3, 13, 3);
             this.layoutControlItem1.Size = new System.Drawing.Size(247, 48);
@@ -392,27 +392,19 @@
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 467);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 443);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(493, 408);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(493, 432);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
-            // emptySpaceItem2
-            // 
-            this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 419);
-            this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(246, 10);
-            this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
-            // 
             // 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, 210);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 198);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(246, 70);
+            this.layoutControlItem4.Size = new System.Drawing.Size(246, 66);
             this.layoutControlItem4.Text = "时差误差";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(108, 22);
@@ -421,9 +413,9 @@
             // 
             this.layoutControlItem10.Control = this.txtFu1;
             this.layoutControlItem10.CustomizationFormText = "目标上行频点";
-            this.layoutControlItem10.Location = new System.Drawing.Point(0, 350);
+            this.layoutControlItem10.Location = new System.Drawing.Point(0, 330);
             this.layoutControlItem10.Name = "layoutControlItem10";
-            this.layoutControlItem10.Size = new System.Drawing.Size(246, 69);
+            this.layoutControlItem10.Size = new System.Drawing.Size(246, 65);
             this.layoutControlItem10.Text = "目标上行频点";
             this.layoutControlItem10.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem10.TextSize = new System.Drawing.Size(108, 22);
@@ -432,9 +424,9 @@
             // 
             this.layoutControlItem14.Control = this.txtRefLocation1;
             this.layoutControlItem14.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem14.Location = new System.Drawing.Point(246, 140);
+            this.layoutControlItem14.Location = new System.Drawing.Point(246, 132);
             this.layoutControlItem14.Name = "layoutControlItem14";
-            this.layoutControlItem14.Size = new System.Drawing.Size(247, 70);
+            this.layoutControlItem14.Size = new System.Drawing.Size(247, 66);
             this.layoutControlItem14.Text = "参考站经纬度";
             this.layoutControlItem14.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem14.TextSize = new System.Drawing.Size(108, 22);
@@ -442,9 +434,9 @@
             // layoutControlItem6
             // 
             this.layoutControlItem6.Control = this.txtDfoErr1;
-            this.layoutControlItem6.Location = new System.Drawing.Point(246, 210);
+            this.layoutControlItem6.Location = new System.Drawing.Point(246, 198);
             this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(247, 70);
+            this.layoutControlItem6.Size = new System.Drawing.Size(247, 66);
             this.layoutControlItem6.Text = "频差误差";
             this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem6.TextSize = new System.Drawing.Size(108, 22);
@@ -452,9 +444,9 @@
             // layoutControlItem7
             // 
             this.layoutControlItem7.Control = this.txtEphVelErr1;
-            this.layoutControlItem7.Location = new System.Drawing.Point(246, 280);
+            this.layoutControlItem7.Location = new System.Drawing.Point(246, 264);
             this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Size = new System.Drawing.Size(247, 70);
+            this.layoutControlItem7.Size = new System.Drawing.Size(247, 66);
             this.layoutControlItem7.Text = "星历速度误差";
             this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem7.TextSize = new System.Drawing.Size(108, 22);
@@ -463,31 +455,39 @@
             // 
             this.layoutControlItem12.Control = this.txtFu2;
             this.layoutControlItem12.CustomizationFormText = "参考上行频点";
-            this.layoutControlItem12.Location = new System.Drawing.Point(246, 350);
+            this.layoutControlItem12.Location = new System.Drawing.Point(246, 330);
             this.layoutControlItem12.Name = "layoutControlItem12";
-            this.layoutControlItem12.Size = new System.Drawing.Size(247, 69);
+            this.layoutControlItem12.Size = new System.Drawing.Size(247, 65);
             this.layoutControlItem12.Text = "参考上行频点";
             this.layoutControlItem12.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem12.TextSize = new System.Drawing.Size(108, 22);
             // 
-            // simpleButton1
+            // emptySpaceItem2
             // 
-            this.simpleButton1.Location = new System.Drawing.Point(3, 432);
-            this.simpleButton1.Name = "simpleButton1";
-            this.simpleButton1.Size = new System.Drawing.Size(240, 32);
-            this.simpleButton1.StyleController = this.layoutControl1;
-            this.simpleButton1.TabIndex = 17;
-            this.simpleButton1.Text = "simpleButton1";
+            this.emptySpaceItem2.AllowHotTrack = false;
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 395);
+            this.emptySpaceItem2.Name = "emptySpaceItem2";
+            this.emptySpaceItem2.Size = new System.Drawing.Size(246, 12);
+            this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
             // btnClose
             // 
-            this.btnClose.Control = this.simpleButton1;
-            this.btnClose.Location = new System.Drawing.Point(0, 429);
+            this.btnClose.Location = new System.Drawing.Point(2, 409);
             this.btnClose.Name = "btnClose";
-            this.btnClose.Size = new System.Drawing.Size(246, 38);
+            this.btnClose.Size = new System.Drawing.Size(242, 32);
+            this.btnClose.StyleController = this.layoutControl1;
+            this.btnClose.TabIndex = 17;
             this.btnClose.Text = "关闭";
-            this.btnClose.TextSize = new System.Drawing.Size(0, 0);
-            this.btnClose.TextVisible = false;
+            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // layoutControlItem2
+            // 
+            this.layoutControlItem2.Control = this.btnClose;
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 407);
+            this.layoutControlItem2.Name = "layoutControlItem2";
+            this.layoutControlItem2.Size = new System.Drawing.Size(246, 36);
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem2.TextVisible = false;
             // 
             // XZGDOPParam
             // 
@@ -519,14 +519,14 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem1)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem10)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem14)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.btnClose)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -551,7 +551,6 @@
         private DevExpress.XtraEditors.SimpleButton btnOK;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
-        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
         private DevExpress.XtraEditors.ButtonEdit txtDfoErr1;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
         private DevExpress.XtraEditors.ButtonEdit txtEphVelErr1;
@@ -560,7 +559,8 @@
         private DevExpress.XtraEditors.ButtonEdit txtFu2;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
-        private DevExpress.XtraEditors.SimpleButton simpleButton1;
-        private DevExpress.XtraLayout.LayoutControlItem btnClose;
+        private DevExpress.XtraEditors.SimpleButton btnClose;
+        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem2;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
     }
 }

+ 50 - 0
XzDw.App/UserControl/XZGDOPParam .cs

@@ -1,5 +1,6 @@
 using DevExpress.Mvvm.ModuleInjection.Native;
 using DevExpress.XtraEditors;
+using DevExpress.XtraMap;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -12,12 +13,14 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using XzXdDw.App;
+using XzXdDw.App.Api.星地GDOP误差椭圆;
 using XzXdDw.App.Model;
 
 namespace XdCxRhDW.App.UserControl
 {
     public partial class XZGDOPParam : DevExpress.XtraEditors.XtraUserControl
     {
+        public MapControl mapControl1;
         public GDOP星座协同接口 Model => new GDOP星座协同接口()
         {
             TleLeo1 = txtTleLeo1.Text.Trim(),
@@ -56,6 +59,53 @@ namespace XdCxRhDW.App.UserControl
 
 
         private void btnOK_Click(object sender, EventArgs e)
+        {
+            mapControl1.ClearMap();
+            var (listSat, data) = GdopHelper.GdopLeoTowSatDRef(
+                             new double[] { Model.RefLon, Model.RefLat }, Model.TleLeo1, Model.TleLeo2, Model.CapTime, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.fu1, Model.fu2);
+            if (data == null)
+            {
+                return;
+            }
+            if (listSat != null)//画卫星
+            {
+                foreach (var sat in listSat)
+                {
+                    mapControl1.Invoke(new Action(() =>
+                    {
+                        string satCode = sat.SatCode == null ? "未知" : sat.SatCode.ToString();
+                        mapControl1.DrawFixedImg("sat", sat.SatLat, sat.SatLon, DxHelper.SvgHelper.CreateSat(), new Size(32, 32), $"卫星编号:{satCode}\r\n轨道经度:{sat.SatLon}°\r\n轨道纬度:{sat.SatLat}°");
+                    }));
+                }
+            }
+            foreach (var errLins in data)//画GDOP
+            {
+                foreach (var line in errLins.MapLines)
+                {
+                    var newLine = SampleDots(line);
+                    mapControl1.Invoke(new Action(() =>
+                    {
+                        var mapLines = newLine.Line.Select(p => (errLins.ErrDistanceKm, p.Lon, p.Lat));
+                        mapControl1.DrawGdopLine(mapLines);
+                    }));
+                }
+            }
+        }
+        public XdCxRhDW.App.DTO.MapLine SampleDots(XdCxRhDW.App.DTO.MapLine line)
+        {
+            var dots = line.Line;
+            if (dots.Count < 30) return line;
+            var tmp = dots.Count / 30;
+            var newLine = new XdCxRhDW.App.DTO.MapLine();
+            for (int i = 0; i < dots.Count; i += tmp)
+            {
+                newLine.Line.Add(dots[i]);
+            }
+            if (!newLine.Line.Contains(dots.Last()))
+                newLine.Line.Add(dots.Last());
+            return newLine;
+        }
+        private void btnClose_Click(object sender, EventArgs e)
         {
             PopupHelper.HidePopup(this);
         }

Some files were not shown because too many files changed in this diff