gongqiuhong 1 year ago
parent
commit
4f5696685a

+ 4 - 4
XdDw.App/UserControl/CtrlPosXd.cs

@@ -97,7 +97,7 @@ namespace XdDw.App.UserControl
                             return;
                         }
                         var item = gridView1.GetRow(ids[0]) as XDPosRes;
-                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item.CgResID);
+                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item.SigTime);
                         x2D1GdopParam.mapControl1 = mapControl1;
                         PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
                     })
@@ -110,7 +110,7 @@ namespace XdDw.App.UserControl
                             return;
                         }
                         var item = gridView1.GetRow(ids[0]) as XDPosRes;
-                        X2D1ErrEllipseParam x2D1ErrEllipseParam = new X2D1ErrEllipseParam(item.CgResID);
+                        X2D1ErrEllipseParam x2D1ErrEllipseParam = new X2D1ErrEllipseParam(item.SigTime);
                         x2D1ErrEllipseParam.mapControl1 = mapControl1;
                         x2D1ErrEllipseParam.lon = item.PosLon;
                         x2D1ErrEllipseParam.lat = item.PosLat;
@@ -148,13 +148,13 @@ namespace XdDw.App.UserControl
                      })
                     .AddPosMenu<XDPosRes>("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
                     {
-                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item.CgResID);
+                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item.SigTime);
                         x2D1GdopParam.mapControl1 = mapControl1;
                         PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
                     })
                     .AddPosMenu<XDPosRes>("误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), item =>
                     {
-                        X2D1ErrEllipseParam x2D1ErrEllipseParam = new X2D1ErrEllipseParam(item.CgResID);
+                        X2D1ErrEllipseParam x2D1ErrEllipseParam = new X2D1ErrEllipseParam(item.SigTime);
                         x2D1ErrEllipseParam.mapControl1 = mapControl1;
                         x2D1ErrEllipseParam.lon = item.PosLon;
                         x2D1ErrEllipseParam.lat = item.PosLat;

+ 2 - 4
XdDw.App/UserControl/X2D1ErrEllipseParam.cs

@@ -36,7 +36,7 @@ namespace XdDw.App.UserControl
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
         };
-        public X2D1ErrEllipseParam(long cgResID)
+        public X2D1ErrEllipseParam(DateTime sigTime)
         {
             InitializeComponent();
             txtCapTime.UseDefault();
@@ -46,15 +46,13 @@ namespace XdDw.App.UserControl
             txtRefLocation1.UseDoubleClickToSelectAll();
 
             List<TxInfo> listTx = new List<TxInfo>();
-            CgRes cg;
             using (RHDWContext db = new RHDWContext())
             {
                 listTx = db.TxInfos.ToList();
-                cg = db.CgRes.Where(m => m.ID == cgResID).FirstOrDefault();
             }
             var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
             var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
-            this.txtCapTime.DateTime = cg.SigTime;
+            this.txtCapTime.DateTime = sigTime;
             this.txtStationLocation1.Text = $"{cdbTx.Lon},{cdbTx.Lat}";
             this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
             txtTleMain.UseDefault().SetStringData(TestData.AllTle).Text = TestData.TleMain;

+ 2 - 4
XdDw.App/UserControl/X2D1GDOPParam.cs

@@ -34,7 +34,7 @@ namespace XdDw.App.UserControl
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
         };
-        public X2D1GDOPParam(long cgResID)
+        public X2D1GDOPParam(DateTime sigTime)
         {
             InitializeComponent();
             txtCapTime.UseDefault();
@@ -44,16 +44,14 @@ namespace XdDw.App.UserControl
             txtRefLocation1.UseDoubleClickToSelectAll();
 
             List<TxInfo> listTx = new List<TxInfo>();
-            CgRes cg;
             using (RHDWContext db = new RHDWContext())
             {
                 listTx = db.TxInfos.ToList();
-                cg = db.CgRes.Where(m => m.ID == cgResID).FirstOrDefault();
             }
             var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
             var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
 
-            this.txtCapTime.DateTime = cg.SigTime;
+            this.txtCapTime.DateTime = sigTime;
             this.txtStationLocation1.Text = $"{cdbTx.Lon},{cdbTx.Lat}";
             this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
             txtTleMain.UseDefault().SetStringData(TestData.AllTle).Text = TestData.TleMain;

+ 4 - 18
XzDw.App/UserControl/CtrlPosSingle.cs

@@ -44,8 +44,6 @@ namespace XzXdDw.App.UserControl
     public partial class CtrlPosSingle : DevExpress.XtraEditors.XtraUserControl
     {
         DtXDParam dtxdctrl = null;
-        DXGDOPParam dxGdopParam = null;
-        DXErrEllipseParam dxErrEllipseParam = null;
         double MBfu;
         TcpServer tcpServer;
         public CtrlPosSingle()
@@ -105,10 +103,7 @@ namespace XzXdDw.App.UserControl
                               return;
                           }
                           var item = gridView1.GetRow(ids[0]) as PosRes;
-                          if (dxGdopParam == null)
-                          {
-                              dxGdopParam = new DXGDOPParam(MBfu, item.SigTime);
-                          }
+                              DXGDOPParam dxGdopParam = new DXGDOPParam(MBfu, item.SigTime);
                           dxGdopParam.mapControl1 = mapControl1;
                           PopupHelper.ShowPopup(dxGdopParam, mapControl1, mapControl1.Width / 4);
                       })
@@ -122,10 +117,7 @@ namespace XzXdDw.App.UserControl
                             return;
                         }
                         var item = gridView1.GetRow(ids[0]) as PosRes;
-                        if (dxErrEllipseParam == null)
-                        {
-                            dxErrEllipseParam = new DXErrEllipseParam(MBfu, item.SigTime);
-                        }
+                        DXErrEllipseParam dxErrEllipseParam = new DXErrEllipseParam(MBfu, item.SigTime);
                         dxErrEllipseParam.mapControl1 = mapControl1;
                         dxErrEllipseParam.lon = item.PosLon;
                         dxErrEllipseParam.lat = item.PosLat;
@@ -164,19 +156,13 @@ namespace XzXdDw.App.UserControl
                      })
                     .AddPosMenu<PosRes>("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
                     {
-                        if (dxGdopParam == null)
-                        {
-                            dxGdopParam = new DXGDOPParam(MBfu, item.SigTime);
-                        }
+                            DXGDOPParam dxGdopParam = new DXGDOPParam(MBfu, item.SigTime);
                         dxGdopParam.mapControl1 = mapControl1;
                         PopupHelper.ShowPopup(dxGdopParam, mapControl1, mapControl1.Width / 4);
                     })
                     .AddPosMenu<PosRes>("误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), item =>
                     {
-                        if (dxErrEllipseParam == null)
-                        {
-                            dxErrEllipseParam = new DXErrEllipseParam(MBfu, item.SigTime);
-                        }
+                        DXErrEllipseParam dxErrEllipseParam = new DXErrEllipseParam(MBfu, item.SigTime);
                         dxErrEllipseParam.mapControl1 = mapControl1;
                         dxErrEllipseParam.lon = item.PosLon;
                         dxErrEllipseParam.lat = item.PosLat;

+ 6 - 20
XzDw.App/UserControl/CtrlPosXz.cs

@@ -45,8 +45,6 @@ namespace XzXdDw.App.UserControl
         /// 时差初值 范围计算
         /// </summary>
         DtSXLParam dtsxlctrl = null;
-        XZGDOPParam xzGdopParam = null;
-        XZErrEllipseParam xzErrEllipseParam = null;
         double MBfu;
         double CKfu;
         private TxInfo refTx;
@@ -119,10 +117,7 @@ namespace XzXdDw.App.UserControl
                               return;
                           }
                           var item = gridView1.GetRow(ids[0]) as XZPosRes;
-                          if (xzGdopParam == null)
-                          {
-                              xzGdopParam = new XZGDOPParam(refTx, item.SigTime, MBfu, CKfu);
-                          }
+                          XZGDOPParam xzGdopParam = new XZGDOPParam(refTx, item.SigTime, MBfu, CKfu);
                           xzGdopParam.mapControl1 = mapControl1;
                           PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);
                       })
@@ -135,14 +130,11 @@ namespace XzXdDw.App.UserControl
                              return;
                          }
                          var item = gridView1.GetRow(ids[0]) as XZPosRes;
-                         if (xzErrEllipseParam == null)
-                         {
-                             xzErrEllipseParam = new XZErrEllipseParam(refTx, item.SigTime, MBfu, CKfu);
-                         }
+                         XZErrEllipseParam xzErrEllipseParam = new XZErrEllipseParam(refTx, item.SigTime, MBfu, CKfu);
                          xzErrEllipseParam.mapControl1 = mapControl1;
                          xzErrEllipseParam.lon = item.PosLon;
                          xzErrEllipseParam.lat = item.PosLat;
-                         PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);                        
+                         PopupHelper.ShowPopup(xzErrEllipseParam, mapControl1, mapControl1.Width / 4);                        
                      })
                     .AddMenu("停止加载", SvgHelper.LoadFromFile("Image\\Stop.svg"), () => stoped = true);
 
@@ -172,23 +164,17 @@ namespace XzXdDw.App.UserControl
                     .AddMapMenu("停止加载", SvgHelper.LoadFromFile("Image\\Stop.svg"), (lon, lat) => stoped = true)
                      .AddPosMenu<XZPosRes>("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
                     {
-                        if (xzGdopParam == null)
-                        {
-                            xzGdopParam = new XZGDOPParam(refTx, item.SigTime, MBfu, CKfu);
-                        }
+                        XZGDOPParam xzGdopParam = new XZGDOPParam(refTx, item.SigTime, MBfu, CKfu);
                         xzGdopParam.mapControl1 = mapControl1;
                         PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);
                     })
                     .AddPosMenu<XZPosRes>("误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), item =>
                     {
-                        if (xzErrEllipseParam == null)
-                        {
-                            xzErrEllipseParam = new XZErrEllipseParam(refTx, item.SigTime, MBfu, CKfu);
-                        }
+                        XZErrEllipseParam xzErrEllipseParam = new XZErrEllipseParam(refTx, item.SigTime, MBfu, CKfu);
                         xzErrEllipseParam.mapControl1 = mapControl1;
                         xzErrEllipseParam.lon = item.PosLon;
                         xzErrEllipseParam.lat = item.PosLat;
-                        PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);
+                        PopupHelper.ShowPopup(xzErrEllipseParam, mapControl1, mapControl1.Width / 4);
                     })
 
                      .AddPosMenu<XZPosRes>("绘制时差线", SvgHelper.LoadFromFile("Image\\DrawLine.svg"), item =>

+ 1 - 0
XzDw.App/UserControl/DXGDOPParam.cs

@@ -13,6 +13,7 @@ using System.Threading.Tasks;
 using System.Windows.Forms;
 using XzXdDw.App;
 using XzXdDw.App.Api.星地GDOP误差椭圆;
+using XzXdDw.App.EFContext;
 using XzXdDw.App.Model;
 
 namespace XdCxRhDW.App.UserControl

+ 2 - 2
XzDw.App/UserControl/XZErrEllipseParam.cs

@@ -14,6 +14,7 @@ using System.Windows.Forms;
 using XdCxRhDW.App.Api.星历推算;
 using XzXdDw.App;
 using XzXdDw.App.Api.低轨GDOP误差椭圆;
+using XzXdDw.App.EFContext;
 using XzXdDw.App.Model;
 
 namespace XdCxRhDW.App.UserControl
@@ -37,14 +38,13 @@ namespace XdCxRhDW.App.UserControl
             fu1 = Convert.ToDouble(txtFu1.Text) * 1e6,
             fu2 = Convert.ToDouble(txtFu2.Text) * 1e6,
         };
-        public XZErrEllipseParam(TxInfo refTx, DateTime sigTime,double upfreqHz1, double upfreqHz2)
+        public XZErrEllipseParam(TxInfo refTx, DateTime sigTime, double upfreqHz1, double upfreqHz2)
         {
             InitializeComponent();
             txtCapTime.UseDefault();
             txtTleMain.UseDoubleClickToSelectAll();
             txtTleAdja.UseDoubleClickToSelectAll();
             txtRefLocation1.UseDoubleClickToSelectAll();
-
             this.txtCapTime.DateTime = sigTime;
             this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
             txtTleMain.UseDefault().SetStringData(TestData.AllTle).Text = TestData.tleleo1;

+ 13 - 62
XzXdDw.App/UserControl/CtrlPosSingle.cs

@@ -44,7 +44,6 @@ namespace XzXdDw.App.UserControl
     public partial class CtrlPosSingle : DevExpress.XtraEditors.XtraUserControl
     {
         DtXDParam dtxdctrl = null;
-        DXGDOPParam dxGdopParam = null;
         double MBfu;
         TcpServer tcpServer;
         public CtrlPosSingle()
@@ -104,10 +103,7 @@ namespace XzXdDw.App.UserControl
                               return;
                           }
                           var item = gridView1.GetRow(ids[0]) as PosRes;
-                          if (dxGdopParam == null)
-                          {
-                              dxGdopParam = new DXGDOPParam(MBfu, item.SigTime);
-                          }
+                              DXGDOPParam dxGdopParam = new DXGDOPParam(MBfu, item.SigTime);
                           dxGdopParam.mapControl1 = mapControl1;
                           PopupHelper.ShowPopup(dxGdopParam, mapControl1, mapControl1.Width / 4);
                       })
@@ -121,16 +117,11 @@ namespace XzXdDw.App.UserControl
                             return;
                         }
                         var item = gridView1.GetRow(ids[0]) as PosRes;
-                        var ctrl = new DXErrEllipseParam(MBfu, item.SigTime);
-                        PopupHelper.ShowPopup(ctrl, mapControl1, mapControl1.Width / 4, onHide: hideReason =>
-                        {
-                            if (hideReason == HideReason.Defalut) return;
-                            var model = ctrl.Model;
-                            double[] main_sat = Tle2XYZ.GetXyz(model.TleMain, model.CapTime);
-                            double[] adja1_sat = Tle2XYZ.GetXyz(model.TleMain, model.CapTime1);
-                            double[] adja2_sat = Tle2XYZ.GetXyz(model.TleMain, model.CapTime2);
-                            DrawErrorEllipse1X(item.PosLon,item.PosLat,main_sat, adja1_sat, adja2_sat, model.DfoErr, model.SatLocErr, model.EphVelErr, model.fu);
-                        });
+                        DXErrEllipseParam dxErrEllipseParam = new DXErrEllipseParam(MBfu, item.SigTime);
+                        dxErrEllipseParam.mapControl1 = mapControl1;
+                        dxErrEllipseParam.lon = item.PosLon;
+                        dxErrEllipseParam.lat = item.PosLat;
+                        PopupHelper.ShowPopup(dxErrEllipseParam, mapControl1, mapControl1.Width / 4);
                     })
                     .AddMenu("手动定位", SvgHelper.LoadFromFile("Image\\Pos.svg"), SinglePos)
                     .AddMenu("停止加载", SvgHelper.LoadFromFile("Image\\Stop.svg"), () => stoped = true);
@@ -165,25 +156,17 @@ namespace XzXdDw.App.UserControl
                      })
                     .AddPosMenu<PosRes>("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
                     {
-                        if (dxGdopParam == null)
-                        {
-                            dxGdopParam = new DXGDOPParam(MBfu, item.SigTime);
-                        }
+                            DXGDOPParam dxGdopParam = new DXGDOPParam(MBfu, item.SigTime);
                         dxGdopParam.mapControl1 = mapControl1;
                         PopupHelper.ShowPopup(dxGdopParam, mapControl1, mapControl1.Width / 4);
                     })
                     .AddPosMenu<PosRes>("误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), item =>
                     {
-                        var ctrl = new DXErrEllipseParam(MBfu, item.SigTime);
-                        PopupHelper.ShowPopup(ctrl, mapControl1, mapControl1.Width / 4, onHide: hideReason =>
-                        {
-                            if (hideReason == HideReason.Defalut) return;
-                            var model = ctrl.Model;
-                            double[] main_sat = Tle2XYZ.GetXyz(model.TleMain, model.CapTime);
-                            double[] adja1_sat = Tle2XYZ.GetXyz(model.TleMain, model.CapTime1);
-                            double[] adja2_sat = Tle2XYZ.GetXyz(model.TleMain, model.CapTime2);
-                            DrawErrorEllipse1X(item.PosLon,item.PosLat,main_sat, adja1_sat, adja2_sat, model.DfoErr, model.SatLocErr, model.EphVelErr, model.fu);
-                        });
+                        DXErrEllipseParam dxErrEllipseParam = new DXErrEllipseParam(MBfu, item.SigTime);
+                        dxErrEllipseParam.mapControl1 = mapControl1;
+                        dxErrEllipseParam.lon = item.PosLon;
+                        dxErrEllipseParam.lat = item.PosLat;
+                        PopupHelper.ShowPopup(dxErrEllipseParam, mapControl1, mapControl1.Width / 4);
                     })
                      .AddPosMenu<PosRes>("手动定位", SvgHelper.LoadFromFile("Image\\Pos.svg"), item =>
                      {
@@ -349,39 +332,7 @@ namespace XzXdDw.App.UserControl
             tcpServer.SendData(setings.ServerIp, setings.Port, json);
         }
 
-        private void DrawErrorEllipse1X(double posLon,double posLat,double[] MsEph, double[] NsEph1, double[] NsEph2, double DfoErr, double EphPosErr, double EphVelErr, double fu)
-        {
-            try
-            {
-                List<TxInfo> listTx = new List<TxInfo>();
-                List<Model.SatInfo> listSat = new List<Model.SatInfo>();
-                using (RHDWContext db = new RHDWContext())
-                {
-                    listTx = db.TxInfos.ToList();
-                    listSat = db.SatInfos.ToList();
-                }
-                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
-#warning 但凡是和频差相关的 星历必须给速度
-                XzXdDw.App.Api.低轨GDOP误差椭圆.ErrorEllipseDTO1XOption Option = new XzXdDw.App.Api.低轨GDOP误差椭圆.ErrorEllipseDTO1XOption();
-                Option.MsEph = MsEph;
-                Option.NsEph1 = NsEph1;
-                Option.NsEph2 = NsEph2;
-                Option.SelectPoint = new double[3] { posLon, posLat, 0 };
-                Option.DfoErr = DfoErr;
-                Option.EphPosErr = EphPosErr;
-                Option.EphVelErr = EphVelErr;
-                Option.fu = fu;
-                var points = XzXdDw.App.Api.低轨GDOP误差椭圆.ErrEllipseHelper.ErrorEllipseSingleX(Option);
-                mapControl1.DrawDtoPonit($"单星[{listSat.FirstOrDefault(m => m.ID == satTx.ID)?.Sat}]误差椭圆线", points);
-
-            }
-            catch (Exception ex)
-            {
-                Serilog.Log.Error("绘制误差椭圆线失败", ex);
-                XtraMessageBox.Show($"绘制误差椭圆线失败,失败信息:{ex.Message}");
-            }
-        }
-
+      
         private async void DrawDfoLine()
         {
             var ids = gridView1.GetSelectedRows();

+ 4 - 4
XzXdDw.App/UserControl/CtrlPosXd.cs

@@ -97,7 +97,7 @@ namespace XzXdDw.App.UserControl
                             return;
                         }
                         var item = gridView1.GetRow(ids[0]) as XDPosRes;
-                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item.CgResID);
+                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item.SigTime);
                         x2D1GdopParam.mapControl1 = mapControl1;
                         PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
                     })
@@ -110,7 +110,7 @@ namespace XzXdDw.App.UserControl
                             return;
                         }
                         var item = gridView1.GetRow(ids[0]) as XDPosRes;
-                        X2D1ErrEllipseParam x2D1ErrEllipseParam = new X2D1ErrEllipseParam(item.CgResID);
+                        X2D1ErrEllipseParam x2D1ErrEllipseParam = new X2D1ErrEllipseParam(item.SigTime);
                         x2D1ErrEllipseParam.mapControl1 = mapControl1;
                         x2D1ErrEllipseParam.lon = item.PosLon;
                         x2D1ErrEllipseParam.lat = item.PosLat;
@@ -148,13 +148,13 @@ namespace XzXdDw.App.UserControl
                      })
                     .AddPosMenu<XDPosRes>("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
                     {
-                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item.CgResID);
+                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item.SigTime);
                         x2D1GdopParam.mapControl1 = mapControl1;
                         PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
                     })
                     .AddPosMenu<XDPosRes>("误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), item =>
                     {
-                        X2D1ErrEllipseParam x2D1ErrEllipseParam = new X2D1ErrEllipseParam(item.CgResID);
+                        X2D1ErrEllipseParam x2D1ErrEllipseParam = new X2D1ErrEllipseParam(item.SigTime);
                         x2D1ErrEllipseParam.mapControl1 = mapControl1;
                         x2D1ErrEllipseParam.lon = item.PosLon;
                         x2D1ErrEllipseParam.lat = item.PosLat;

+ 14 - 55
XzXdDw.App/UserControl/CtrlPosXz.cs

@@ -45,7 +45,6 @@ namespace XzXdDw.App.UserControl
         /// 时差初值 范围计算
         /// </summary>
         DtSXLParam dtsxlctrl = null;
-        XZGDOPParam xzGdopParam = null;
         double MBfu;
         double CKfu;
         private TxInfo refTx;
@@ -118,10 +117,7 @@ namespace XzXdDw.App.UserControl
                               return;
                           }
                           var item = gridView1.GetRow(ids[0]) as XZPosRes;
-                          if (xzGdopParam == null)
-                          {
-                              xzGdopParam = new XZGDOPParam(refTx, item.SigTime, MBfu, CKfu);
-                          }
+                          XZGDOPParam xzGdopParam = new XZGDOPParam(refTx, item.SigTime, MBfu, CKfu);
                           xzGdopParam.mapControl1 = mapControl1;
                           PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);
                       })
@@ -134,15 +130,11 @@ namespace XzXdDw.App.UserControl
                              return;
                          }
                          var item = gridView1.GetRow(ids[0]) as XZPosRes;
-                         var ctrl = new XZErrEllipseParam(refTx, item.SigTime, MBfu, CKfu);
-                         PopupHelper.ShowPopup(ctrl, mapControl1, mapControl1.Width / 4, onHide: hideReason =>
-                         {
-                             if (hideReason == HideReason.Defalut) return;
-                             var model = ctrl.Model;
-                             double[] main_sat = Tle2XYZ.GetXyz(model.TleMain, model.CapTime);
-                             double[] adja_sat = Tle2XYZ.GetXyz(model.TleAdja, model.CapTime);
-                             DrawErrorEllipseDTFO(item.PosLon, item.PosLat, main_sat, adja_sat, new double[] { model.RefLon, model.RefLat, 0 }, model.DtousErr, model.DfoErr, model.SatLocErr, model.EphVelErr, model.fu1, model.fu2);
-                         });
+                         XZErrEllipseParam xzErrEllipseParam = new XZErrEllipseParam(refTx, item.SigTime, MBfu, CKfu);
+                         xzErrEllipseParam.mapControl1 = mapControl1;
+                         xzErrEllipseParam.lon = item.PosLon;
+                         xzErrEllipseParam.lat = item.PosLat;
+                         PopupHelper.ShowPopup(xzErrEllipseParam, mapControl1, mapControl1.Width / 4);                        
                      })
                     .AddMenu("停止加载", SvgHelper.LoadFromFile("Image\\Stop.svg"), () => stoped = true);
 
@@ -170,26 +162,19 @@ namespace XzXdDw.App.UserControl
                 //RectMenu为框选的区域上右键菜单
                 mapControl1.AddMapMenu("加载仿真数据", SvgHelper.LoadFromFile("Image\\LoadData.svg"), (lon, lat) => LoadSimulationData())
                     .AddMapMenu("停止加载", SvgHelper.LoadFromFile("Image\\Stop.svg"), (lon, lat) => stoped = true)
-                    .AddPosMenu<XZPosRes>("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
+                     .AddPosMenu<XZPosRes>("GDOP分析", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
                     {
-                        if (xzGdopParam == null)
-                        {
-                            xzGdopParam = new XZGDOPParam(refTx, item.SigTime, MBfu, CKfu);
-                        }
+                        XZGDOPParam xzGdopParam = new XZGDOPParam(refTx, item.SigTime, MBfu, CKfu);
                         xzGdopParam.mapControl1 = mapControl1;
                         PopupHelper.ShowPopup(xzGdopParam, mapControl1, mapControl1.Width / 4);
                     })
                     .AddPosMenu<XZPosRes>("误差椭圆", SvgHelper.LoadFromFile("Image\\误差椭圆.svg"), item =>
                     {
-                        var ctrl = new XZErrEllipseParam(refTx, item.SigTime, MBfu, CKfu);
-                        PopupHelper.ShowPopup(ctrl, mapControl1, mapControl1.Width / 4, onHide: hideReason =>
-                        {
-                            if (hideReason == HideReason.Defalut) return;
-                            var model = ctrl.Model;
-                            double[] main_sat = Tle2XYZ.GetXyz(model.TleMain, model.CapTime);
-                            double[] adja_sat = Tle2XYZ.GetXyz(model.TleAdja, model.CapTime);
-                            DrawErrorEllipseDTFO(item.PosLon, item.PosLat, main_sat, adja_sat, new double[] { model.RefLon, model.RefLat, 0 }, model.DtousErr, model.DfoErr, model.SatLocErr, model.EphVelErr, model.fu1, model.fu2);
-                        });
+                        XZErrEllipseParam xzErrEllipseParam = new XZErrEllipseParam(refTx, item.SigTime, MBfu, CKfu);
+                        xzErrEllipseParam.mapControl1 = mapControl1;
+                        xzErrEllipseParam.lon = item.PosLon;
+                        xzErrEllipseParam.lat = item.PosLat;
+                        PopupHelper.ShowPopup(xzErrEllipseParam, mapControl1, mapControl1.Width / 4);
                     })
 
                      .AddPosMenu<XZPosRes>("绘制时差线", SvgHelper.LoadFromFile("Image\\DrawLine.svg"), item =>
@@ -522,33 +507,7 @@ namespace XzXdDw.App.UserControl
             }
         }
 
-        private void DrawErrorEllipseDTFO(double posLon, double posLat, double[] main_sat, double[] neigh_sat, double[] Ref_Station_LLH, double DtoErr, double DfoErr, double EphPosErr, double EphVelErr, double fu1, double fu2)
-        {
-            try
-            {
-                ErrorEllipseDTFOTSOption twoStartOption = new ErrorEllipseDTFOTSOption();
-                twoStartOption.MsEph = main_sat;
-                twoStartOption.NsEph = neigh_sat;
-                twoStartOption.RefGeod = Ref_Station_LLH;
-                twoStartOption.SelectPoint = new double[3] { posLon, posLat, 0 };
-                twoStartOption.DtoErr = DtoErr * 1e-6;
-                twoStartOption.DfoErr = DfoErr;
-                twoStartOption.EphPosErr = EphPosErr;
-                twoStartOption.EphVelErr = EphVelErr;
-                twoStartOption.fu1 = fu1;
-                twoStartOption.fu2 = fu2;
-
-                var points = Api.低轨GDOP误差椭圆.ErrEllipseHelper.ErrorEllipseDTFOTwoStart(twoStartOption);
-                mapControl1.DrawDtoPonit($"双星误差椭圆线", points);
-
-
-            }
-            catch (Exception ex)
-            {
-                Serilog.Log.Error("绘制误差椭圆线失败", ex);
-                XtraMessageBox.Show($"绘制误差椭圆线失败,失败信息:{ex.Message}");
-            }
-        }
+      
 
     }
 }

+ 72 - 45
XzXdDw.App/UserControl/DXErrEllipseParam.Designer.cs

@@ -28,6 +28,16 @@
         /// </summary>
         private void InitializeComponent()
         {
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions4 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject13 = new DevExpress.Utils.SerializableAppearanceObject();
+            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();
             DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
@@ -38,16 +48,6 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions4 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject13 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject14 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject15 = new DevExpress.Utils.SerializableAppearanceObject();
-            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject16 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.btnOK = new DevExpress.XtraEditors.SimpleButton();
             this.txtTleMain = new DevExpress.XtraEditors.SearchLookUpEdit();
@@ -71,6 +71,8 @@
             this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.btnClose = new DevExpress.XtraEditors.SimpleButton();
+            this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.txtTleMain.Properties)).BeginInit();
@@ -97,6 +99,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -110,6 +113,7 @@
             this.layoutControl1.Controls.Add(this.txtCapTime);
             this.layoutControl1.Controls.Add(this.txtCapTime1);
             this.layoutControl1.Controls.Add(this.txtCapTime2);
+            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, 4, 5, 4);
@@ -122,7 +126,7 @@
             // 
             // btnOK
             // 
-            this.btnOK.Location = new System.Drawing.Point(200, 466);
+            this.btnOK.Location = new System.Drawing.Point(200, 442);
             this.btnOK.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
             this.btnOK.Name = "btnOK";
             this.btnOK.Size = new System.Drawing.Size(195, 27);
@@ -134,7 +138,7 @@
             // txtTleMain
             // 
             this.txtTleMain.EditValue = "";
-            this.txtTleMain.Location = new System.Drawing.Point(2, 26);
+            this.txtTleMain.Location = new System.Drawing.Point(2, 24);
             this.txtTleMain.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtTleMain.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtTleMain.MinimumSize = new System.Drawing.Size(0, 28);
@@ -162,14 +166,14 @@
             // txtDfoErr1
             // 
             this.txtDfoErr1.EditValue = "";
-            this.txtDfoErr1.Location = new System.Drawing.Point(2, 254);
+            this.txtDfoErr1.Location = new System.Drawing.Point(2, 240);
             this.txtDfoErr1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtDfoErr1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtDfoErr1.MinimumSize = new System.Drawing.Size(0, 28);
             this.txtDfoErr1.Name = "txtDfoErr1";
             this.txtDfoErr1.Properties.AutoHeight = false;
             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, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "Hz", -1, false, true, false, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.txtDfoErr1.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtDfoErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtDfoErr1.Properties.MaskSettings.Set("mask", "f");
@@ -181,14 +185,14 @@
             // txtSatLocErr1
             // 
             this.txtSatLocErr1.EditValue = "";
-            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 311);
+            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 294);
             this.txtSatLocErr1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtSatLocErr1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtSatLocErr1.MinimumSize = new System.Drawing.Size(0, 28);
             this.txtSatLocErr1.Name = "txtSatLocErr1";
             this.txtSatLocErr1.Properties.AutoHeight = false;
             this.txtSatLocErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m", -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.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");
@@ -200,14 +204,14 @@
             // txtEphVelErr1
             // 
             this.txtEphVelErr1.EditValue = "";
-            this.txtEphVelErr1.Location = new System.Drawing.Point(2, 368);
+            this.txtEphVelErr1.Location = new System.Drawing.Point(2, 348);
             this.txtEphVelErr1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtEphVelErr1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtEphVelErr1.MinimumSize = new System.Drawing.Size(0, 28);
             this.txtEphVelErr1.Name = "txtEphVelErr1";
             this.txtEphVelErr1.Properties.AutoHeight = false;
             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)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m/s", -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.txtEphVelErr1.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtEphVelErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtEphVelErr1.Properties.MaskSettings.Set("mask", "f");
@@ -219,14 +223,14 @@
             // txtFu1
             // 
             this.txtFu1.EditValue = "";
-            this.txtFu1.Location = new System.Drawing.Point(2, 425);
+            this.txtFu1.Location = new System.Drawing.Point(2, 402);
             this.txtFu1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtFu1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtFu1.MinimumSize = new System.Drawing.Size(0, 28);
             this.txtFu1.Name = "txtFu1";
             this.txtFu1.Properties.AutoHeight = false;
             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)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -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.txtFu1.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtFu1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtFu1.Properties.MaskSettings.Set("mask", "f");
@@ -238,7 +242,7 @@
             // txtCapTime
             // 
             this.txtCapTime.EditValue = null;
-            this.txtCapTime.Location = new System.Drawing.Point(2, 83);
+            this.txtCapTime.Location = new System.Drawing.Point(2, 78);
             this.txtCapTime.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtCapTime.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtCapTime.MinimumSize = new System.Drawing.Size(0, 28);
@@ -260,7 +264,7 @@
             // txtCapTime1
             // 
             this.txtCapTime1.EditValue = null;
-            this.txtCapTime1.Location = new System.Drawing.Point(2, 140);
+            this.txtCapTime1.Location = new System.Drawing.Point(2, 132);
             this.txtCapTime1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtCapTime1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtCapTime1.MinimumSize = new System.Drawing.Size(0, 28);
@@ -282,7 +286,7 @@
             // txtCapTime2
             // 
             this.txtCapTime2.EditValue = null;
-            this.txtCapTime2.Location = new System.Drawing.Point(2, 197);
+            this.txtCapTime2.Location = new System.Drawing.Point(2, 186);
             this.txtCapTime2.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtCapTime2.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtCapTime2.MinimumSize = new System.Drawing.Size(0, 28);
@@ -315,7 +319,8 @@
             this.layoutControlItem6,
             this.layoutControlItem11,
             this.layoutControlItem2,
-            this.layoutControlItem7});
+            this.layoutControlItem7,
+            this.layoutControlItem9});
             this.Root.Name = "Root";
             this.Root.Size = new System.Drawing.Size(397, 514);
             this.Root.TextVisible = false;
@@ -326,7 +331,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(397, 57);
+            this.layoutControlItem8.Size = new System.Drawing.Size(397, 54);
             this.layoutControlItem8.Text = "主星星历";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(90, 18);
@@ -336,9 +341,9 @@
             this.layoutControlItem4.Control = this.txtDfoErr1;
             this.layoutControlItem4.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem4.CustomizationFormText = "低轨卫星X";
-            this.layoutControlItem4.Location = new System.Drawing.Point(0, 228);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 216);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(397, 57);
+            this.layoutControlItem4.Size = new System.Drawing.Size(397, 54);
             this.layoutControlItem4.Text = "频差误差";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(90, 18);
@@ -348,9 +353,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, 285);
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 270);
             this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(397, 57);
+            this.layoutControlItem5.Size = new System.Drawing.Size(397, 54);
             this.layoutControlItem5.Text = "星历位置误差";
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem5.TextSize = new System.Drawing.Size(90, 18);
@@ -358,27 +363,27 @@
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.btnOK;
-            this.layoutControlItem1.Location = new System.Drawing.Point(198, 456);
+            this.layoutControlItem1.Location = new System.Drawing.Point(198, 432);
             this.layoutControlItem1.Name = "layoutControlItem1";
             this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 3);
-            this.layoutControlItem1.Size = new System.Drawing.Size(199, 40);
+            this.layoutControlItem1.Size = new System.Drawing.Size(199, 41);
             this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem1.TextVisible = false;
             // 
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 496);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 473);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(397, 18);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(397, 41);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 456);
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 432);
             this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(198, 40);
+            this.emptySpaceItem2.Size = new System.Drawing.Size(198, 10);
             this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
             // layoutControlItem3
@@ -386,9 +391,9 @@
             this.layoutControlItem3.Control = this.txtEphVelErr1;
             this.layoutControlItem3.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem3.CustomizationFormText = "低轨卫星X";
-            this.layoutControlItem3.Location = new System.Drawing.Point(0, 342);
+            this.layoutControlItem3.Location = new System.Drawing.Point(0, 324);
             this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Size = new System.Drawing.Size(397, 57);
+            this.layoutControlItem3.Size = new System.Drawing.Size(397, 54);
             this.layoutControlItem3.Text = "星历速度误差";
             this.layoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(90, 18);
@@ -398,9 +403,9 @@
             this.layoutControlItem6.Control = this.txtFu1;
             this.layoutControlItem6.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem6.CustomizationFormText = "低轨卫星X";
-            this.layoutControlItem6.Location = new System.Drawing.Point(0, 399);
+            this.layoutControlItem6.Location = new System.Drawing.Point(0, 378);
             this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(397, 57);
+            this.layoutControlItem6.Size = new System.Drawing.Size(397, 54);
             this.layoutControlItem6.Text = "上行频点";
             this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem6.TextSize = new System.Drawing.Size(90, 18);
@@ -410,9 +415,9 @@
             this.layoutControlItem11.Control = this.txtCapTime;
             this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem11.CustomizationFormText = "采集时刻";
-            this.layoutControlItem11.Location = new System.Drawing.Point(0, 57);
+            this.layoutControlItem11.Location = new System.Drawing.Point(0, 54);
             this.layoutControlItem11.Name = "layoutControlItem11";
-            this.layoutControlItem11.Size = new System.Drawing.Size(397, 57);
+            this.layoutControlItem11.Size = new System.Drawing.Size(397, 54);
             this.layoutControlItem11.Text = "采集时刻1";
             this.layoutControlItem11.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem11.TextSize = new System.Drawing.Size(90, 18);
@@ -422,9 +427,9 @@
             this.layoutControlItem2.Control = this.txtCapTime1;
             this.layoutControlItem2.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem2.CustomizationFormText = "采集时刻";
-            this.layoutControlItem2.Location = new System.Drawing.Point(0, 114);
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 108);
             this.layoutControlItem2.Name = "layoutControlItem2";
-            this.layoutControlItem2.Size = new System.Drawing.Size(397, 57);
+            this.layoutControlItem2.Size = new System.Drawing.Size(397, 54);
             this.layoutControlItem2.Text = "采集时刻2";
             this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem2.TextSize = new System.Drawing.Size(90, 18);
@@ -434,13 +439,32 @@
             this.layoutControlItem7.Control = this.txtCapTime2;
             this.layoutControlItem7.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem7.CustomizationFormText = "采集时刻";
-            this.layoutControlItem7.Location = new System.Drawing.Point(0, 171);
+            this.layoutControlItem7.Location = new System.Drawing.Point(0, 162);
             this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Size = new System.Drawing.Size(397, 57);
+            this.layoutControlItem7.Size = new System.Drawing.Size(397, 54);
             this.layoutControlItem7.Text = "采集时刻3";
             this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem7.TextSize = new System.Drawing.Size(90, 18);
             // 
+            // btnClose
+            // 
+            this.btnClose.Location = new System.Drawing.Point(2, 444);
+            this.btnClose.Name = "btnClose";
+            this.btnClose.Size = new System.Drawing.Size(194, 27);
+            this.btnClose.StyleController = this.layoutControl1;
+            this.btnClose.TabIndex = 13;
+            this.btnClose.Text = "关闭";
+            this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
+            // 
+            // layoutControlItem9
+            // 
+            this.layoutControlItem9.Control = this.btnClose;
+            this.layoutControlItem9.Location = new System.Drawing.Point(0, 442);
+            this.layoutControlItem9.Name = "layoutControlItem9";
+            this.layoutControlItem9.Size = new System.Drawing.Size(198, 31);
+            this.layoutControlItem9.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem9.TextVisible = false;
+            // 
             // DXErrEllipseParam
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -475,6 +499,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem11)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -503,5 +528,7 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
         private DevExpress.XtraEditors.DateEdit txtCapTime2;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
+        private DevExpress.XtraEditors.SimpleButton btnClose;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
     }
 }

+ 48 - 0
XzXdDw.App/UserControl/DXErrEllipseParam.cs

@@ -1,4 +1,5 @@
 using DevExpress.XtraEditors;
+using DevExpress.XtraMap;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -10,13 +11,18 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using XdCxRhDW.App.Api.星历推算;
 using XzXdDw.App;
+using XzXdDw.App.EFContext;
 using XzXdDw.App.Model;
 
 namespace XdCxRhDW.App.UserControl
 {
     public partial class DXErrEllipseParam : DevExpress.XtraEditors.XtraUserControl
     {
+        public MapControl mapControl1;
+        public double lon;
+        public double lat;
         public ErrEllipse单星协同接口 Model => new ErrEllipse单星协同接口()
         {
             TleMain = txtTleMain.Text.Trim(),
@@ -43,6 +49,48 @@ namespace XdCxRhDW.App.UserControl
         }
 
         private void btnOK_Click(object sender, EventArgs e)
+        {
+            mapControl1.ClearMap();
+            double[] main_sat = Tle2XYZ.GetXyz(Model.TleMain, Model.CapTime);
+            double[] adja1_sat = Tle2XYZ.GetXyz(Model.TleMain, Model.CapTime1);
+            double[] adja2_sat = Tle2XYZ.GetXyz(Model.TleMain, Model.CapTime2);
+            DrawErrorEllipse1X(lon, lat, main_sat, adja1_sat, adja2_sat, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.fu);
+        }
+
+        private void DrawErrorEllipse1X(double posLon, double posLat, double[] MsEph, double[] NsEph1, double[] NsEph2, double DfoErr, double EphPosErr, double EphVelErr, double fu)
+        {
+            try
+            {
+                List<TxInfo> listTx = new List<TxInfo>();
+                List<XzXdDw.App.Model.SatInfo> listSat = new List<XzXdDw.App.Model.SatInfo>();
+                using (RHDWContext db = new RHDWContext())
+                {
+                    listTx = db.TxInfos.ToList();
+                    listSat = db.SatInfos.ToList();
+                }
+                var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
+#warning 但凡是和频差相关的 星历必须给速度
+                XzXdDw.App.Api.低轨GDOP误差椭圆.ErrorEllipseDTO1XOption Option = new XzXdDw.App.Api.低轨GDOP误差椭圆.ErrorEllipseDTO1XOption();
+                Option.MsEph = MsEph;
+                Option.NsEph1 = NsEph1;
+                Option.NsEph2 = NsEph2;
+                Option.SelectPoint = new double[3] { posLon, posLat, 0 };
+                Option.DfoErr = DfoErr;
+                Option.EphPosErr = EphPosErr;
+                Option.EphVelErr = EphVelErr;
+                Option.fu = fu;
+                var points = XzXdDw.App.Api.低轨GDOP误差椭圆.ErrEllipseHelper.ErrorEllipseSingleX(Option);
+                mapControl1.DrawDtoPonit($"单星[{listSat.FirstOrDefault(m => m.ID == satTx.ID)?.Sat}]误差椭圆线", points);
+
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error("绘制误差椭圆线失败", ex);
+                XtraMessageBox.Show($"绘制误差椭圆线失败,失败信息:{ex.Message}");
+            }
+        }
+
+        private void btnClose_Click(object sender, EventArgs e)
         {
             PopupHelper.HidePopup(this);
         }

+ 1 - 0
XzXdDw.App/UserControl/DXGDOPParam.cs

@@ -13,6 +13,7 @@ using System.Threading.Tasks;
 using System.Windows.Forms;
 using XzXdDw.App;
 using XzXdDw.App.Api.星地GDOP误差椭圆;
+using XzXdDw.App.EFContext;
 using XzXdDw.App.Model;
 
 namespace XdCxRhDW.App.UserControl

+ 4 - 6
XzXdDw.App/UserControl/X2D1ErrEllipseParam.cs

@@ -37,7 +37,7 @@ namespace XdCxRhDW.App.UserControl
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
         };
-        public X2D1ErrEllipseParam(long cgResID)
+        public X2D1ErrEllipseParam(DateTime sigTime)
         {
             InitializeComponent();
             txtCapTime.UseDefault();
@@ -47,15 +47,13 @@ namespace XdCxRhDW.App.UserControl
             txtRefLocation1.UseDoubleClickToSelectAll();
 
             List<TxInfo> listTx = new List<TxInfo>();
-            CgRes cg;
             using (RHDWContext db = new RHDWContext())
             {
                 listTx = db.TxInfos.ToList();
-                cg = db.CgRes.Where(m => m.ID == cgResID).FirstOrDefault();
             }
             var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
             var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
-            this.txtCapTime.DateTime = cg.SigTime;
+            this.txtCapTime.DateTime = sigTime;
             this.txtStationLocation1.Text = $"{cdbTx.Lon},{cdbTx.Lat}";
             this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
             txtTleMain.UseDefault().SetStringData(TestData.AllTle).Text = TestData.TleMain;
@@ -69,7 +67,7 @@ namespace XdCxRhDW.App.UserControl
             mapControl1.ClearMap();
             double[] main_sat = Tle2XYZ.GetXyz(Model.TleMain, Model.CapTime);
             double[] adja_sat = Tle2XYZ.GetXyz(Model.TleAdja, Model.CapTime);
-            DrawErrorEllipse2X1D(lon, lat, main_sat, adja_sat, new double[] { Model.StationLon, Model.StationLat, 0 }, new double[] { Model.RefLon, Model.RefLat, 0 }, Model.DtousErr, Model.SatLocErr);
+            DrawErrorEllipse2X1D(lon,lat, main_sat, adja_sat, new double[] { Model.StationLon, Model.StationLat, 0 }, new double[] { Model.RefLon, Model.RefLat, 0 }, Model.DtousErr, Model.SatLocErr);
         }
 
         private void DrawErrorEllipse2X1D(double posLon, double posLat, double[] MsEph, double[] NsEph, double[] CDBAnt, double[] RefGeod, double DtoErr, double EphErr)
@@ -85,7 +83,7 @@ namespace XdCxRhDW.App.UserControl
                 }
                 var satTx = listTx.Find(p => p.TxType == EnumTxType.MainSat);
                 var satNTx = listTx.Find(p => p.TxType == EnumTxType.AdjaSat);
-              ErrorEllipseDTO2X1DOption Option = new ErrorEllipseDTO2X1DOption();
+               ErrorEllipseDTO2X1DOption Option = new ErrorEllipseDTO2X1DOption();
                 Option.MsEph = MsEph;
                 Option.NsEph = NsEph;
                 Option.CDBAnt = CDBAnt;

+ 4 - 6
XzXdDw.App/UserControl/X2D1GDOPParam.cs

@@ -20,7 +20,7 @@ namespace XdCxRhDW.App.UserControl
     public partial class X2D1GDOPParam : DevExpress.XtraEditors.XtraUserControl
     {
         public MapControl mapControl1;
-        public GDOP星地两星一地接口 Model => new GDOP星地两星一地接口()
+        public GDOP星地两星一地接口 Model=> new GDOP星地两星一地接口()
         {
             TleMain = txtTleMain.Text.Trim(),
             TleAdja = txtTleAdja.Text.Trim(),
@@ -32,7 +32,7 @@ namespace XdCxRhDW.App.UserControl
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
         };
-        public X2D1GDOPParam(long cgResID)
+        public X2D1GDOPParam(DateTime sigTime)
         {
             InitializeComponent();
             txtCapTime.UseDefault();
@@ -42,16 +42,14 @@ namespace XdCxRhDW.App.UserControl
             txtRefLocation1.UseDoubleClickToSelectAll();
 
             List<TxInfo> listTx = new List<TxInfo>();
-            CgRes cg;
             using (RHDWContext db = new RHDWContext())
             {
                 listTx = db.TxInfos.ToList();
-                cg = db.CgRes.Where(m => m.ID == cgResID).FirstOrDefault();
             }
             var cdbTx = listTx.Find(p => p.TxType == EnumTxType.Cdb);
             var refTx = listTx.Find(p => p.TxType == EnumTxType.Ref);
 
-            this.txtCapTime.DateTime = cg.SigTime;
+            this.txtCapTime.DateTime = sigTime;
             this.txtStationLocation1.Text = $"{cdbTx.Lon},{cdbTx.Lat}";
             this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
             txtTleMain.UseDefault().SetStringData(TestData.AllTle).Text = TestData.TleMain;
@@ -60,7 +58,7 @@ namespace XdCxRhDW.App.UserControl
             this.txtSatLocErr1.EditValue = TestData.SatLocErr;
         }
 
-
+      
 
         private void btnOK_Click(object sender, EventArgs e)
         {

+ 75 - 48
XzXdDw.App/UserControl/XZErrEllipseParam.Designer.cs

@@ -28,6 +28,11 @@
         /// </summary>
         private void InitializeComponent()
         {
+            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions7 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject25 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject26 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject27 = new DevExpress.Utils.SerializableAppearanceObject();
+            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject28 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
@@ -53,11 +58,6 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject18 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject19 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject20 = new DevExpress.Utils.SerializableAppearanceObject();
-            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();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
             this.btnOK = new DevExpress.XtraEditors.SimpleButton();
             this.txtCapTime = new DevExpress.XtraEditors.DateEdit();
@@ -86,6 +86,8 @@
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem();
+            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();
@@ -115,6 +117,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
@@ -130,6 +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.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, 4, 5, 4);
@@ -142,7 +146,7 @@
             // 
             // btnOK
             // 
-            this.btnOK.Location = new System.Drawing.Point(198, 352);
+            this.btnOK.Location = new System.Drawing.Point(198, 334);
             this.btnOK.Margin = new System.Windows.Forms.Padding(5, 4, 5, 4);
             this.btnOK.Name = "btnOK";
             this.btnOK.Size = new System.Drawing.Size(194, 27);
@@ -154,7 +158,7 @@
             // txtCapTime
             // 
             this.txtCapTime.EditValue = null;
-            this.txtCapTime.Location = new System.Drawing.Point(2, 140);
+            this.txtCapTime.Location = new System.Drawing.Point(2, 132);
             this.txtCapTime.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtCapTime.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtCapTime.MinimumSize = new System.Drawing.Size(0, 28);
@@ -171,7 +175,7 @@
             // txtRefLocation1
             // 
             this.txtRefLocation1.EditValue = "";
-            this.txtRefLocation1.Location = new System.Drawing.Point(198, 140);
+            this.txtRefLocation1.Location = new System.Drawing.Point(198, 132);
             this.txtRefLocation1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtRefLocation1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtRefLocation1.MinimumSize = new System.Drawing.Size(0, 28);
@@ -185,7 +189,7 @@
             // txtTleMain
             // 
             this.txtTleMain.EditValue = "";
-            this.txtTleMain.Location = new System.Drawing.Point(2, 26);
+            this.txtTleMain.Location = new System.Drawing.Point(2, 24);
             this.txtTleMain.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtTleMain.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtTleMain.MinimumSize = new System.Drawing.Size(0, 28);
@@ -213,7 +217,7 @@
             // txtTleAdja
             // 
             this.txtTleAdja.EditValue = "";
-            this.txtTleAdja.Location = new System.Drawing.Point(2, 83);
+            this.txtTleAdja.Location = new System.Drawing.Point(2, 78);
             this.txtTleAdja.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtTleAdja.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtTleAdja.MinimumSize = new System.Drawing.Size(0, 28);
@@ -241,14 +245,14 @@
             // txtDtousErr1
             // 
             this.txtDtousErr1.EditValue = "";
-            this.txtDtousErr1.Location = new System.Drawing.Point(2, 197);
+            this.txtDtousErr1.Location = new System.Drawing.Point(2, 186);
             this.txtDtousErr1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtDtousErr1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtDtousErr1.MinimumSize = new System.Drawing.Size(0, 28);
             this.txtDtousErr1.Name = "txtDtousErr1";
             this.txtDtousErr1.Properties.AutoHeight = false;
             this.txtDtousErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "us", -1, false, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            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.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtDtousErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtDtousErr1.Properties.MaskSettings.Set("mask", "f");
@@ -260,14 +264,14 @@
             // txtSatLocErr1
             // 
             this.txtSatLocErr1.EditValue = "";
-            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 254);
+            this.txtSatLocErr1.Location = new System.Drawing.Point(2, 240);
             this.txtSatLocErr1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtSatLocErr1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtSatLocErr1.MinimumSize = new System.Drawing.Size(0, 28);
             this.txtSatLocErr1.Name = "txtSatLocErr1";
             this.txtSatLocErr1.Properties.AutoHeight = false;
             this.txtSatLocErr1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            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.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtSatLocErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtSatLocErr1.Properties.MaskSettings.Set("mask", "f");
@@ -278,13 +282,13 @@
             // 
             // txtDfoErr1
             // 
-            this.txtDfoErr1.Location = new System.Drawing.Point(198, 197);
+            this.txtDfoErr1.Location = new System.Drawing.Point(198, 186);
             this.txtDfoErr1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtDfoErr1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtDfoErr1.MinimumSize = new System.Drawing.Size(0, 28);
             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, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "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.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtDfoErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtDfoErr1.Properties.MaskSettings.Set("mask", "f");
@@ -294,13 +298,13 @@
             // 
             // txtEphVelErr1
             // 
-            this.txtEphVelErr1.Location = new System.Drawing.Point(198, 254);
+            this.txtEphVelErr1.Location = new System.Drawing.Point(198, 240);
             this.txtEphVelErr1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             this.txtEphVelErr1.MaximumSize = new System.Drawing.Size(0, 28);
             this.txtEphVelErr1.MinimumSize = new System.Drawing.Size(0, 28);
             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, editorButtonImageOptions4, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject13, serializableAppearanceObject14, serializableAppearanceObject15, serializableAppearanceObject16, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "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.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtEphVelErr1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtEphVelErr1.Properties.MaskSettings.Set("mask", "f");
@@ -310,11 +314,11 @@
             // 
             // txtFu1
             // 
-            this.txtFu1.Location = new System.Drawing.Point(2, 311);
+            this.txtFu1.Location = new System.Drawing.Point(2, 294);
             this.txtFu1.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             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, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "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.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtFu1.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtFu1.Properties.MaskSettings.Set("mask", "f");
@@ -324,11 +328,11 @@
             // 
             // txtFu2
             // 
-            this.txtFu2.Location = new System.Drawing.Point(198, 311);
+            this.txtFu2.Location = new System.Drawing.Point(198, 294);
             this.txtFu2.Margin = new System.Windows.Forms.Padding(2, 3, 2, 3);
             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, editorButtonImageOptions6, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject21, serializableAppearanceObject22, serializableAppearanceObject23, serializableAppearanceObject24, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "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.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.txtFu2.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
             this.txtFu2.Properties.MaskSettings.Set("mask", "f");
@@ -352,7 +356,8 @@
             this.layoutControlItem14,
             this.layoutControlItem6,
             this.layoutControlItem7,
-            this.layoutControlItem12});
+            this.layoutControlItem12,
+            this.layoutControlItem2});
             this.Root.Name = "Root";
             this.Root.Size = new System.Drawing.Size(394, 716);
             this.Root.TextVisible = false;
@@ -363,7 +368,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(394, 57);
+            this.layoutControlItem8.Size = new System.Drawing.Size(394, 54);
             this.layoutControlItem8.Text = "主星星历";
             this.layoutControlItem8.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem8.TextSize = new System.Drawing.Size(90, 18);
@@ -372,9 +377,9 @@
             // 
             this.layoutControlItem9.Control = this.txtTleAdja;
             this.layoutControlItem9.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem9.Location = new System.Drawing.Point(0, 57);
+            this.layoutControlItem9.Location = new System.Drawing.Point(0, 54);
             this.layoutControlItem9.Name = "layoutControlItem9";
-            this.layoutControlItem9.Size = new System.Drawing.Size(394, 57);
+            this.layoutControlItem9.Size = new System.Drawing.Size(394, 54);
             this.layoutControlItem9.Text = "邻星星历";
             this.layoutControlItem9.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem9.TextSize = new System.Drawing.Size(90, 18);
@@ -383,9 +388,9 @@
             // 
             this.layoutControlItem11.Control = this.txtCapTime;
             this.layoutControlItem11.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem11.Location = new System.Drawing.Point(0, 114);
+            this.layoutControlItem11.Location = new System.Drawing.Point(0, 108);
             this.layoutControlItem11.Name = "layoutControlItem11";
-            this.layoutControlItem11.Size = new System.Drawing.Size(196, 57);
+            this.layoutControlItem11.Size = new System.Drawing.Size(196, 54);
             this.layoutControlItem11.Text = "采集时刻";
             this.layoutControlItem11.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem11.TextSize = new System.Drawing.Size(90, 18);
@@ -395,9 +400,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, 228);
+            this.layoutControlItem5.Location = new System.Drawing.Point(0, 216);
             this.layoutControlItem5.Name = "layoutControlItem5";
-            this.layoutControlItem5.Size = new System.Drawing.Size(196, 57);
+            this.layoutControlItem5.Size = new System.Drawing.Size(196, 54);
             this.layoutControlItem5.Text = "星历位置误差";
             this.layoutControlItem5.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem5.TextSize = new System.Drawing.Size(90, 18);
@@ -405,27 +410,27 @@
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.btnOK;
-            this.layoutControlItem1.Location = new System.Drawing.Point(196, 342);
+            this.layoutControlItem1.Location = new System.Drawing.Point(196, 324);
             this.layoutControlItem1.Name = "layoutControlItem1";
             this.layoutControlItem1.Padding = new DevExpress.XtraLayout.Utils.Padding(2, 2, 10, 3);
-            this.layoutControlItem1.Size = new System.Drawing.Size(198, 40);
+            this.layoutControlItem1.Size = new System.Drawing.Size(198, 41);
             this.layoutControlItem1.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem1.TextVisible = false;
             // 
             // emptySpaceItem1
             // 
             this.emptySpaceItem1.AllowHotTrack = false;
-            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 382);
+            this.emptySpaceItem1.Location = new System.Drawing.Point(0, 365);
             this.emptySpaceItem1.Name = "emptySpaceItem1";
-            this.emptySpaceItem1.Size = new System.Drawing.Size(394, 334);
+            this.emptySpaceItem1.Size = new System.Drawing.Size(394, 351);
             this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0);
             // 
             // emptySpaceItem2
             // 
             this.emptySpaceItem2.AllowHotTrack = false;
-            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 342);
+            this.emptySpaceItem2.Location = new System.Drawing.Point(0, 324);
             this.emptySpaceItem2.Name = "emptySpaceItem2";
-            this.emptySpaceItem2.Size = new System.Drawing.Size(196, 40);
+            this.emptySpaceItem2.Size = new System.Drawing.Size(196, 10);
             this.emptySpaceItem2.TextSize = new System.Drawing.Size(0, 0);
             // 
             // layoutControlItem4
@@ -433,9 +438,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, 171);
+            this.layoutControlItem4.Location = new System.Drawing.Point(0, 162);
             this.layoutControlItem4.Name = "layoutControlItem4";
-            this.layoutControlItem4.Size = new System.Drawing.Size(196, 57);
+            this.layoutControlItem4.Size = new System.Drawing.Size(196, 54);
             this.layoutControlItem4.Text = "时差误差";
             this.layoutControlItem4.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem4.TextSize = new System.Drawing.Size(90, 18);
@@ -443,9 +448,9 @@
             // layoutControlItem10
             // 
             this.layoutControlItem10.Control = this.txtFu1;
-            this.layoutControlItem10.Location = new System.Drawing.Point(0, 285);
+            this.layoutControlItem10.Location = new System.Drawing.Point(0, 270);
             this.layoutControlItem10.Name = "layoutControlItem10";
-            this.layoutControlItem10.Size = new System.Drawing.Size(196, 57);
+            this.layoutControlItem10.Size = new System.Drawing.Size(196, 54);
             this.layoutControlItem10.Text = "目标上行频点";
             this.layoutControlItem10.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem10.TextSize = new System.Drawing.Size(90, 18);
@@ -454,9 +459,9 @@
             // 
             this.layoutControlItem14.Control = this.txtRefLocation1;
             this.layoutControlItem14.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
-            this.layoutControlItem14.Location = new System.Drawing.Point(196, 114);
+            this.layoutControlItem14.Location = new System.Drawing.Point(196, 108);
             this.layoutControlItem14.Name = "layoutControlItem14";
-            this.layoutControlItem14.Size = new System.Drawing.Size(198, 57);
+            this.layoutControlItem14.Size = new System.Drawing.Size(198, 54);
             this.layoutControlItem14.Text = "参考站经纬度";
             this.layoutControlItem14.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem14.TextSize = new System.Drawing.Size(90, 18);
@@ -464,9 +469,9 @@
             // layoutControlItem6
             // 
             this.layoutControlItem6.Control = this.txtDfoErr1;
-            this.layoutControlItem6.Location = new System.Drawing.Point(196, 171);
+            this.layoutControlItem6.Location = new System.Drawing.Point(196, 162);
             this.layoutControlItem6.Name = "layoutControlItem6";
-            this.layoutControlItem6.Size = new System.Drawing.Size(198, 57);
+            this.layoutControlItem6.Size = new System.Drawing.Size(198, 54);
             this.layoutControlItem6.Text = "频差误差";
             this.layoutControlItem6.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem6.TextSize = new System.Drawing.Size(90, 18);
@@ -474,9 +479,9 @@
             // layoutControlItem7
             // 
             this.layoutControlItem7.Control = this.txtEphVelErr1;
-            this.layoutControlItem7.Location = new System.Drawing.Point(196, 228);
+            this.layoutControlItem7.Location = new System.Drawing.Point(196, 216);
             this.layoutControlItem7.Name = "layoutControlItem7";
-            this.layoutControlItem7.Size = new System.Drawing.Size(198, 57);
+            this.layoutControlItem7.Size = new System.Drawing.Size(198, 54);
             this.layoutControlItem7.Text = "星历速度误差";
             this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem7.TextSize = new System.Drawing.Size(90, 18);
@@ -484,13 +489,32 @@
             // layoutControlItem12
             // 
             this.layoutControlItem12.Control = this.txtFu2;
-            this.layoutControlItem12.Location = new System.Drawing.Point(196, 285);
+            this.layoutControlItem12.Location = new System.Drawing.Point(196, 270);
             this.layoutControlItem12.Name = "layoutControlItem12";
-            this.layoutControlItem12.Size = new System.Drawing.Size(198, 57);
+            this.layoutControlItem12.Size = new System.Drawing.Size(198, 54);
             this.layoutControlItem12.Text = "参考上行频点";
             this.layoutControlItem12.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem12.TextSize = new System.Drawing.Size(90, 18);
             // 
+            // btnClose
+            // 
+            this.btnClose.Location = new System.Drawing.Point(2, 336);
+            this.btnClose.Name = "btnClose";
+            this.btnClose.Size = new System.Drawing.Size(192, 27);
+            this.btnClose.StyleController = this.layoutControl1;
+            this.btnClose.TabIndex = 17;
+            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, 334);
+            this.layoutControlItem2.Name = "layoutControlItem2";
+            this.layoutControlItem2.Size = new System.Drawing.Size(196, 31);
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem2.TextVisible = false;
+            // 
             // XZErrEllipseParam
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -528,6 +552,7 @@
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem12)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -561,5 +586,7 @@
         private DevExpress.XtraEditors.ButtonEdit txtFu2;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem10;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem12;
+        private DevExpress.XtraEditors.SimpleButton btnClose;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
     }
 }

+ 43 - 2
XzXdDw.App/UserControl/XZErrEllipseParam.cs

@@ -1,4 +1,5 @@
 using DevExpress.XtraEditors;
+using DevExpress.XtraMap;
 using DxHelper;
 using ExtensionsDev;
 using System;
@@ -10,13 +11,19 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
+using XdCxRhDW.App.Api.星历推算;
 using XzXdDw.App;
+using XzXdDw.App.Api.低轨GDOP误差椭圆;
+using XzXdDw.App.EFContext;
 using XzXdDw.App.Model;
 
 namespace XdCxRhDW.App.UserControl
 {
     public partial class XZErrEllipseParam : DevExpress.XtraEditors.XtraUserControl
     {
+        public MapControl mapControl1;
+        public double lon;
+        public double lat;
         public ErrEllipse星座协同接口 Model => new ErrEllipse星座协同接口()
         {
             TleMain = txtTleMain.Text.Trim(),
@@ -31,14 +38,13 @@ namespace XdCxRhDW.App.UserControl
             fu1 = Convert.ToDouble(txtFu1.Text) * 1e6,
             fu2 = Convert.ToDouble(txtFu2.Text) * 1e6,
         };
-        public XZErrEllipseParam(TxInfo refTx, DateTime sigTime,double upfreqHz1, double upfreqHz2)
+        public XZErrEllipseParam(TxInfo refTx, DateTime sigTime, double upfreqHz1, double upfreqHz2)
         {
             InitializeComponent();
             txtCapTime.UseDefault();
             txtTleMain.UseDoubleClickToSelectAll();
             txtTleAdja.UseDoubleClickToSelectAll();
             txtRefLocation1.UseDoubleClickToSelectAll();
-
             this.txtCapTime.DateTime = sigTime;
             this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
             txtTleMain.UseDefault().SetStringData(TestData.AllTle).Text = TestData.tleleo1;
@@ -53,6 +59,41 @@ namespace XdCxRhDW.App.UserControl
 
 
         private void btnOK_Click(object sender, EventArgs e)
+        {
+            mapControl1.ClearMap();
+            double[] main_sat = Tle2XYZ.GetXyz(Model.TleMain, Model.CapTime);
+            double[] adja_sat = Tle2XYZ.GetXyz(Model.TleAdja, Model.CapTime);
+            DrawErrorEllipseDTFO(lon, lat, main_sat, adja_sat, new double[] { Model.RefLon, Model.RefLat, 0 }, Model.DtousErr, Model.DfoErr, Model.SatLocErr, Model.EphVelErr, Model.fu1, Model.fu2);
+        }
+        private void DrawErrorEllipseDTFO(double posLon, double posLat, double[] main_sat, double[] neigh_sat, double[] Ref_Station_LLH, double DtoErr, double DfoErr, double EphPosErr, double EphVelErr, double fu1, double fu2)
+        {
+            try
+            {
+                ErrorEllipseDTFOTSOption twoStartOption = new ErrorEllipseDTFOTSOption();
+                twoStartOption.MsEph = main_sat;
+                twoStartOption.NsEph = neigh_sat;
+                twoStartOption.RefGeod = Ref_Station_LLH;
+                twoStartOption.SelectPoint = new double[3] { posLon, posLat, 0 };
+                twoStartOption.DtoErr = DtoErr * 1e-6;
+                twoStartOption.DfoErr = DfoErr;
+                twoStartOption.EphPosErr = EphPosErr;
+                twoStartOption.EphVelErr = EphVelErr;
+                twoStartOption.fu1 = fu1;
+                twoStartOption.fu2 = fu2;
+
+                var points = ErrEllipseHelper.ErrorEllipseDTFOTwoStart(twoStartOption);
+                mapControl1.DrawDtoPonit($"双星误差椭圆线", points);
+
+
+            }
+            catch (Exception ex)
+            {
+                Serilog.Log.Error("绘制误差椭圆线失败", ex);
+                XtraMessageBox.Show($"绘制误差椭圆线失败,失败信息:{ex.Message}");
+            }
+        }
+
+        private void btnClose_Click(object sender, EventArgs e)
         {
             PopupHelper.HidePopup(this);
         }

+ 1 - 0
XzXdDw.App/XzXdDw.App.csproj

@@ -371,6 +371,7 @@
     <EmbeddedResource Include="MainForm.resx">
       <DependentUpon>MainForm.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="UserControl\CtrlPosSingle.resx">
       <DependentUpon>CtrlPosSingle.cs</DependentUpon>
     </EmbeddedResource>