Browse Source

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

gongqiuhong 1 year ago
parent
commit
33bbe3a23c

+ 5 - 1
XdCxRhDW.App/Properties/licenses.licx

@@ -1,4 +1,8 @@
 DevExpress.XtraBars.BarManager, DevExpress.XtraBars.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
-DevExpress.XtraMap.MapControl, DevExpress.XtraMap.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraMap.MapControl, DevExpress.XtraMap.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

+ 83 - 99
XdCxRhDW.App/UserControl/CtrlHome.cs

@@ -1,11 +1,9 @@
 using DevExpress.Utils;
 using DevExpress.Utils.Drawing;
-using DevExpress.Utils.Drawing.Helpers;
 using DevExpress.Utils.Svg;
 using DevExpress.XtraEditors.ButtonsPanelControl;
 using DevExpress.XtraGrid.Views.Grid;
 using DevExpress.XtraGrid.Views.Grid.ViewInfo;
-using DevExpress.XtraTreeList.Data;
 using DxHelper;
 using Microsoft.Owin.Hosting;
 using System;
@@ -170,13 +168,11 @@ namespace XdCxRhDW.App.UserControl
 
                 mapControl1.AddPosMenu<PosRes>("绘制时差线", SvgHelper.LoadFromFile("Image\\DtoLine.svg"), item =>
                 {
-                    var posType = GetPosRes(item, "绘制时差线");
-                    DrawDtoLine(item, posType);
+                    DrawDtoLine(item);
                 })
                 .AddPosMenu<PosRes>("绘制频差线", SvgHelper.LoadFromFile("Image\\DfoLine.svg"), item =>
                 {
-                    var posType = GetPosRes(item, "绘制频差线");
-                    DrawDfoLine(item, posType);
+                    DrawDfoLine(item);
                 })
                  //.AddPosMenu<PosRes>("绘制GDOP", SvgHelper.LoadFromFile("Image\\GDOP.svg"), item =>
                  // {
@@ -299,34 +295,36 @@ namespace XdCxRhDW.App.UserControl
                 btnDelPos.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
             }
             var posRes = GetPosRes("");
-            switch (posRes.Item2)
+            switch (posRes.PosResType)
             {
-                case EnumPosType.X1D1CX:
+                case EnumPosResType.X1D1CX:
                     //一星一地 测向线 GDOP
                     btnDrawDto.Visibility = btnDrawDfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                     btnGDOP.Visibility = btnDrawCX.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                     break;
-                case EnumPosType.X2D1:
+                case EnumPosResType.X2D1:
+                case EnumPosResType.X2D1NoRef:
                     //两星一地 GDOP 时差线
                     btnDrawDto.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                     btnDrawCX.Visibility = btnDrawDfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                     break;
-                case EnumPosType.RH:
+                case EnumPosResType.RH:
                     //融合DW  时差线 测向线
-                    btnDrawDto.Visibility = btnDrawCX.Visibility =  DevExpress.XtraBars.BarItemVisibility.Always;
+                    btnDrawDto.Visibility = btnDrawCX.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                     btnGDOP.Visibility = btnDrawDfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                     break;
-                case EnumPosType.X3TwoDto:
+                case EnumPosResType.X3:
+                case EnumPosResType.X3NoRef:
                     //三星双时差DW GDOP 时差线 
                     btnDrawDto.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                     btnDrawCX.Visibility = btnDrawDfo.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                     break;
-                case EnumPosType.X3TwoDfo:
+                case EnumPosResType.X3TwoDfo:
                     //三星双频差DW GDOP 频差线 
                     btnDrawDfo.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                     btnDrawDto.Visibility = btnDrawCX.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                     break;
-                case EnumPosType.X2Dfo:
+                case EnumPosResType.X2Dfo:
                     //双星时频差DW GDOP 时频差线 
                     btnDrawDto.Visibility = btnDrawDfo.Visibility = btnGDOP.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                     btnDrawCX.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
@@ -587,27 +585,19 @@ namespace XdCxRhDW.App.UserControl
         private void btnDrawDto_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
             var info = GetPosRes("绘制时差");
-            var posRes = info.Item1;
-            if (posRes == null) return;
-            var posType = info.Item2;
-            DrawDtoLine(posRes, posType);
+            if (info == null) return;
+            DrawDtoLine(info);
         }
-        private (PosRes, EnumPosType) GetPosRes(string msg)
+        private PosRes GetPosRes(string msg)
         {
             var ids = gridView2.GetSelectedRows();
             if (ids.Length <= 0)
             {
                 DxHelper.MsgBoxHelper.ShowWarning($"请选择需要{msg}的定位数据信息!");
-                return (null, default);
+                return null;
             }
             var item = gridView2.GetRow(ids[0]) as PosRes;
-            var taskInfo = list.Find(m => m.ID == item.TaskInfoID);
-            if (taskInfo == null)
-            {
-                DxHelper.MsgBoxHelper.ShowWarning($"{msg}未找到任务[{item.TaskInfoID}]!");
-                return (null, default);
-            }
-            return (item, taskInfo.PosType);
+            return item;
         }
         private EnumPosType GetPosRes(PosRes posRes, string msg)
         {
@@ -623,10 +613,8 @@ namespace XdCxRhDW.App.UserControl
         private void btnDrawDfo_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
             var info = GetPosRes("绘制频差");
-            var posRes = info.Item1;
-            if (posRes == null) return;
-            var posType = info.Item2;
-            DrawDfoLine(posRes, posType);
+            if (info == null) return;
+            DrawDfoLine(info);
         }
 
         private void btnDrawCX_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
@@ -645,70 +633,66 @@ namespace XdCxRhDW.App.UserControl
         private void btnGDOP_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
             var info = GetPosRes("绘制GDOP");
-            var posRes = info.Item1;
-            if (posRes == null) return;
-            var posType = info.Item2;
-            DrawGDOP(posRes, posType);
+            if (info == null) return;
+            DrawGDOP(info);
         }
 
-        private void DrawGDOP(PosRes item, EnumPosType posType)
+        private void DrawGDOP(PosRes item)
         {
             try
             {
-                switch (posType)
-                {
-                    //case EnumPosType.X1D1CX:
-                    //    X1D1GDOPParam x1D1GdopParam = new X1D1GDOPParam(item);
-                    //    x1D1GdopParam.mapControl1 = mapControl1;
-                    //    DxHelper.PopupHelper.ShowPopup(x1D1GdopParam, mapControl1, mapControl1.Width / 4);
-                    //    break;
-                    //case EnumPosType.X2D1:
-                    //    X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item);
-                    //    x2D1GdopParam.mapControl1 = mapControl1;
-                    //    DxHelper.PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
-                    //    break;
-                    //case EnumPosType.X3TwoDto:
-                    //    X3GDOPParam x3GdopParam = new X3GDOPParam(item);
-                    //    x3GdopParam.mapControl1 = mapControl1;
-                    //    DxHelper.PopupHelper.ShowPopup(x3GdopParam, mapControl1, mapControl1.Width / 4);
-                    //    break;
-                    //case EnumPosType.X3TwoDfo:
-                    //    X3DFGDOPParam x3DFGdopParam = new X3DFGDOPParam(item);
-                    //    x3DFGdopParam.mapControl1 = mapControl1;
-                    //    DxHelper.PopupHelper.ShowPopup(x3DFGdopParam, mapControl1, mapControl1.Width / 4);
-                    //    break;
-                    //case EnumPosType.X2Dfo:
-                    //    X2DFGDOPParam x2DFGdopParam = new X2DFGDOPParam(item);
-                    //    x2DFGdopParam.mapControl1 = mapControl1;
-                    //    DxHelper.PopupHelper.ShowPopup(x2DFGdopParam, mapControl1, mapControl1.Width / 4);
-                    //    break;
-                    //default:
-                    //    break;
+                switch (item.PosResType)
+                {
+                    case EnumPosResType.X1D1CX:
+                        X1D1GDOPParam x1D1GdopParam = new X1D1GDOPParam(item);
+                        x1D1GdopParam.mapControl1 = mapControl1;
+                        DxHelper.PopupHelper.ShowPopup(x1D1GdopParam, mapControl1, mapControl1.Width / 4);
+                        break;
+                    case EnumPosResType.X2D1:
+                    case EnumPosResType.X2D1NoRef:
+                        X2D1GDOPParam x2D1GdopParam = new X2D1GDOPParam(item);
+                        x2D1GdopParam.mapControl1 = mapControl1;
+                        DxHelper.PopupHelper.ShowPopup(x2D1GdopParam, mapControl1, mapControl1.Width / 4);
+                        break;
+                    case EnumPosResType.X3:
+                    case EnumPosResType.X3NoRef:
+                        X3GDOPParam x3GdopParam = new X3GDOPParam(item);
+                        x3GdopParam.mapControl1 = mapControl1;
+                        DxHelper.PopupHelper.ShowPopup(x3GdopParam, mapControl1, mapControl1.Width / 4);
+                        break;
+                    case EnumPosResType.X3TwoDfo:
+                        X3DFGDOPParam x3DFGdopParam = new X3DFGDOPParam(item);
+                        x3DFGdopParam.mapControl1 = mapControl1;
+                        DxHelper.PopupHelper.ShowPopup(x3DFGdopParam, mapControl1, mapControl1.Width / 4);
+                        break;
+                    case EnumPosResType.X2Dfo:
+                        X2DFGDOPParam x2DFGdopParam = new X2DFGDOPParam(item);
+                        x2DFGdopParam.mapControl1 = mapControl1;
+                        DxHelper.PopupHelper.ShowPopup(x2DFGdopParam, mapControl1, mapControl1.Width / 4);
+                        break;
+                    default:
+                        break;
                 }
             }
             catch (Exception ex)
             {
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{posType.GetEnumDisplayName()}GDOP失败,{ex.Message}");
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{item.PosResType.GetEnumDisplayName()}GDOP失败,{ex.Message}");
 
             }
         }
 
-        private void DrawDtoLine(PosRes item, EnumPosType posType)
+        private void DrawDtoLine(PosRes item)
         {
 
-            switch (posType)
+            switch (item.PosResType)
             {
-                case EnumPosType.X1D1CX:
-                case EnumPosType.X2D1:
-                    DrawXDtoLine(item, posType);
-                    break;
-                case EnumPosType.RH:
-                    DrawXDtoLine(item, EnumPosType.X1D1CX);
-                    DrawXDtoLine(item, EnumPosType.X2D1);
+                case EnumPosResType.X1D1CX:
+                case EnumPosResType.X2D1:
+                    DrawXDtoLine(item);
                     break;
-                case EnumPosType.X3TwoDto:
-                case EnumPosType.X2Dfo:
-                    DrawX3toLine(item, posType);
+                case EnumPosResType.X3:
+                case EnumPosResType.X2Dfo:
+                    DrawX3toLine(item);
                     break;
 
                 default:
@@ -717,7 +701,7 @@ namespace XdCxRhDW.App.UserControl
 
         }
 
-        private async void DrawXDtoLine(PosRes item, EnumPosType posType)
+        private async void DrawXDtoLine(PosRes item)
         {
             try
             {
@@ -771,7 +755,7 @@ namespace XdCxRhDW.App.UserControl
                 var xdDtoLine = DrawDtoLineHelper.DtoLineXd(dtoLineXd);
                 mapControl1.DrawDtoPonit($"星地[{msat},[{station.CdbTxLon}°]]时差线", xdDtoLine);
 
-                if (posType == EnumPosType.X2D1)
+                if (item.PosResType == EnumPosResType.X2D1)
                 {
                     DtoLineTwoStartOption twoStartOption = new DtoLineTwoStartOption();
                     twoStartOption.MsEph = new double[] { cg.MainX.Value, cg.MainY.Value, cg.MainZ.Value, 0, 0, 0 };
@@ -789,12 +773,12 @@ namespace XdCxRhDW.App.UserControl
             }
             catch (Exception ex)
             {
-                Serilog.Log.Error($"绘制{posType.GetEnumDisplayName()}时差线失败", ex);
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{posType.GetEnumDisplayName()}时差线失败,失败信息:{ex.Message}");
+                Serilog.Log.Error($"绘制{item.PosResType.GetEnumDisplayName()}时差线失败", ex);
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{item.PosResType.GetEnumDisplayName()}时差线失败,失败信息:{ex.Message}");
             }
         }
 
-        private async void DrawX3toLine(PosRes item, EnumPosType posType)
+        private async void DrawX3toLine(PosRes item)
         {
             try
             {
@@ -838,8 +822,8 @@ namespace XdCxRhDW.App.UserControl
 
                 var msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
                 var tsDtoLine = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);
-                mapControl1.DrawDtoPonit($"{posType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat}]时差线", tsDtoLine);
-                if (posType == EnumPosType.X3TwoDto)
+                mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1Code.Value)?.Sat}]时差线", tsDtoLine);
+                if (item.PosResType == EnumPosResType.X3)
                 {
                     twoStartOption.NsEph = new double[] { cg.Adja2X.Value, cg.Adja2Y.Value, cg.Adja2Z.Value, 0, 0, 0 };
                     twoStartOption.TargetDto = cg.Dto2.Value;
@@ -847,29 +831,29 @@ namespace XdCxRhDW.App.UserControl
                     twoStartOption.PosLon = item.PosLon;
                     twoStartOption.PosLat = item.PosLat;
                     var tsDtoLine1 = DrawDtoLineHelper.DtoLineXDTwoStart(twoStartOption);
-                    mapControl1.DrawDtoPonit($"{posType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat}]时差线", tsDtoLine1);
+                    mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat}]时差线", tsDtoLine1);
                 }
             }
             catch (Exception ex)
             {
-                Serilog.Log.Error($"绘制{posType.GetEnumDisplayName()}时差线失败", ex);
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{posType.GetEnumDisplayName()}时差线失败,失败信息:{ex.Message}");
+                Serilog.Log.Error($"绘制{item.PosResType.GetEnumDisplayName()}时差线失败", ex);
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{item.PosResType.GetEnumDisplayName()}时差线失败,失败信息:{ex.Message}");
             }
         }
-        private void DrawDfoLine(PosRes item, EnumPosType posType)
+        private void DrawDfoLine(PosRes item)
         {
-            switch (posType)
+            switch (item.PosResType)
             {
-                case EnumPosType.X3TwoDfo:
-                case EnumPosType.X2Dfo:
-                    DrawX3DfoLine(item, posType);
+                case EnumPosResType.X3TwoDfo:
+                case EnumPosResType.X2Dfo:
+                    DrawX3DfoLine(item);
                     break;
                 default:
                     break;
             }
 
         }
-        private async void DrawX3DfoLine(PosRes item, EnumPosType posType)
+        private async void DrawX3DfoLine(PosRes item)
         {
             try
             {
@@ -918,21 +902,21 @@ namespace XdCxRhDW.App.UserControl
                 twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja1Dfo.Value;
                 var msat = listSat.FirstOrDefault(m => m.SatCode == cg.MainCode.Value)?.Sat;
                 var tsDtoLine = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
-                mapControl1.DrawDtoPonit($"{posType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1X.Value)?.Sat}]频差线", tsDtoLine);
+                mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja1X.Value)?.Sat}]频差线", tsDtoLine);
 
-                if (posType == EnumPosType.X3TwoDfo)
+                if (item.PosResType == EnumPosResType.X3TwoDfo)
                 {
                     twoStartOption.NsEph = new double[] { cg.Adja2X.Value, cg.Adja2Y.Value, cg.Adja2Z.Value, cg.Adja2Vx.Value, cg.Adja2Vy.Value, cg.Adja2Vz.Value };
                     twoStartOption.TargetDfo = cg.Dfo2.Value;
                     twoStartOption.RefDfo = cg.YbMainDfo.Value - cg.YbAdja2Dfo.Value;
                     var tsDtoLine1 = DrawDfoLineHelper.DfoLineTwoStart(twoStartOption);
-                    mapControl1.DrawDtoPonit($"{posType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat}]频差线", tsDtoLine1);
+                    mapControl1.DrawDtoPonit($"{item.PosResType.GetEnumDisplayName()}[{msat},{listSat.FirstOrDefault(m => m.SatCode == cg.Adja2Code.Value)?.Sat}]频差线", tsDtoLine1);
                 }
             }
             catch (Exception ex)
             {
-                Serilog.Log.Error($"绘制{posType.GetEnumDisplayName()}频差线失败", ex);
-                DxHelper.MsgBoxHelper.ShowWarning($"绘制{posType.GetEnumDisplayName()}频差线失败,失败信息:{ex.Message}");
+                Serilog.Log.Error($"绘制{item.PosResType.GetEnumDisplayName()}频差线失败", ex);
+                DxHelper.MsgBoxHelper.ShowWarning($"绘制{item.PosResType.GetEnumDisplayName()}频差线失败,失败信息:{ex.Message}");
             }
         }
         private async void DrawCXLine(PosRes item)

+ 2 - 2
XdCxRhDW.App/UserControl/X1D1GDOPParam.cs

@@ -3,10 +3,10 @@ using ExtensionsDev;
 using System;
 using System.Data;
 using System.Linq;
+using System.Collections.Generic;
 using XdCxRhDW.Repostory.Model;
 using XdCxRhDW.Repostory.EFContext;
-using XdCxRhDW.App.Api.GDOP误差椭圆;
-using System.Collections.Generic;
+using XdCxRhDW.Core.Api;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X1D1GDOPParam : DevExpress.XtraEditors.XtraUserControl

+ 19 - 8
XdCxRhDW.App/UserControl/X2D1GDOPParam.cs

@@ -3,11 +3,10 @@ using ExtensionsDev;
 using System;
 using System.Data;
 using System.Linq;
+using System.Collections.Generic;
 using XdCxRhDW.Repostory.Model;
 using XdCxRhDW.Repostory.EFContext;
-using XdCxRhDW.App.Api.GDOP误差椭圆;
-using System.Collections.Generic;
-using System.Data.Entity;
+using XdCxRhDW.Core.Api;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X2D1GDOPParam : DevExpress.XtraEditors.XtraUserControl
@@ -25,6 +24,8 @@ namespace XdCxRhDW.App.UserControl
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
         };
+
+        private EnumPosResType PosResType;
         public X2D1GDOPParam(PosRes item)
         {
             InitializeComponent();
@@ -39,6 +40,12 @@ namespace XdCxRhDW.App.UserControl
             List<string> xlall = new List<string>();
             string mainTle = string.Empty;
             string adjaTle = string.Empty;
+
+            PosResType = item.PosResType;
+            if (PosResType == EnumPosResType.X2D1NoRef)
+            {
+                layoutControlItem14.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            }
             using (RHDWContext db = new RHDWContext())
             {
                 var sats = db.SatInfos.ToList();
@@ -76,6 +83,8 @@ namespace XdCxRhDW.App.UserControl
 
             txtTleMain.UseDefault().SetStringData(xlall).Text = mainTle;
             txtTleAdja.UseDefault().SetStringData(xlall).Text = adjaTle;
+
+
         }
 
 
@@ -86,12 +95,9 @@ namespace XdCxRhDW.App.UserControl
 
             var cdb = new double[] { Model.StationLon, Model.StationLat, 0 };
             var refstation = new double[] { Model.RefLon, Model.RefLat, 0 };
+
             var (listSat, data) = GdopHelper.Gdop2Sat1D(Model.TleMain, Model.TleAdja, Model.CapTime, cdb
-                             , Model.DtousErr, Model.SatLocErr, refstation);
-            if (data == null)
-            {
-                return;
-            }
+                     , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X2D1NoRef ? null : refstation);
             foreach (var errLins in data)//画GDOP
             {
                 var mapDots = errLins.MapDots.Select(p => p).Select(p => (p.Lon, p.Lat));
@@ -151,5 +157,10 @@ namespace XdCxRhDW.App.UserControl
         /// </summary>
         public double SatLocErr { get; set; } = 10000;
 
+        /// <summary>
+        /// 定位类型
+        /// </summary>
+        public EnumPosResType PosResType { get; set; }
+
     }
 }

+ 1 - 4
XdCxRhDW.App/UserControl/X2DFGDOPParam.cs

@@ -4,14 +4,11 @@ using DxHelper;
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
 using System.Linq;
-using XdCxRhDW.App.Api.GDOP误差椭圆;
+using XdCxRhDW.Core.Api;
 using XdCxRhDW.Repostory.EFContext;
 using XdCxRhDW.Repostory.Model;
-
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X2DFGDOPParam : DevExpress.XtraEditors.XtraUserControl

+ 3 - 5
XdCxRhDW.App/UserControl/X3DFGDOPParam .cs

@@ -4,13 +4,11 @@ using DxHelper;
 using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
 using System.Linq;
-using XdCxRhDW.App.Api.GDOP误差椭圆;
-using XdCxRhDW.App.EFContext;
-using XdCxRhDW.App.Model;
+using XdCxRhDW.Core.Api;
+using XdCxRhDW.Repostory.EFContext;
+using XdCxRhDW.Repostory.Model;
 
 namespace XdCxRhDW.App.UserControl
 {

+ 11 - 4
XdCxRhDW.App/UserControl/X3GDOPParam.cs

@@ -3,10 +3,10 @@ using ExtensionsDev;
 using System;
 using System.Data;
 using System.Linq;
+using System.Collections.Generic;
 using XdCxRhDW.Repostory.Model;
 using XdCxRhDW.Repostory.EFContext;
-using XdCxRhDW.App.Api.GDOP误差椭圆;
-using System.Collections.Generic;
+using XdCxRhDW.Core.Api;
 namespace XdCxRhDW.App.UserControl
 {
     public partial class X3GDOPParam : DevExpress.XtraEditors.XtraUserControl
@@ -23,6 +23,7 @@ namespace XdCxRhDW.App.UserControl
             DtousErr = Convert.ToDouble(txtDtousErr1.Text),
             SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
         };
+        private EnumPosResType PosResType;
         public X3GDOPParam(PosRes item)
         {
             InitializeComponent();
@@ -34,6 +35,12 @@ namespace XdCxRhDW.App.UserControl
             this.txtCapTime.DateTime = item.SigTime;
             this.txtDtousErr1.EditValue = 1;
             this.txtSatLocErr1.EditValue = 1000;
+
+            PosResType =  item.PosResType;
+            if (PosResType == EnumPosResType.X3NoRef)
+            {
+                layoutControlItem14.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            }
             List<string> xlall = new List<string>();
             string mainTle = string.Empty;
             string adjaTle1 = string.Empty;
@@ -50,7 +57,7 @@ namespace XdCxRhDW.App.UserControl
                 var xlList = db.XlInfos.OrderBy(p => p.SatName).OrderByDescending(p => p.TimeBJ).ToList();
                 xlall.AddRange(xlList.Select(m => m.TwoLine));
                 if (xlall.Count() == 0) return;
-                if (cg.MainCode.HasValue&&xlList.Any(m => m.SatCode == cg.MainCode.Value))
+                if (cg.MainCode.HasValue && xlList.Any(m => m.SatCode == cg.MainCode.Value))
                 {
                     mainTle = xlList.First(m => m.SatCode == cg.MainCode.Value).TwoLine;
                 }
@@ -90,7 +97,7 @@ namespace XdCxRhDW.App.UserControl
             mapControl1.ClearMap();
             var refs = new double[] { Model.RefLon, Model.RefLat, 0 };
             var (listSat, data) = GdopHelper.Gdop3Sat(Model.TleMain, Model.TleAdja1, Model.TleAdja2, Model.CapTime
-                              , Model.DtousErr, Model.SatLocErr, refs);
+                              , Model.DtousErr, Model.SatLocErr, PosResType == EnumPosResType.X3NoRef ? null : refs);
             if (data == null)
             {
                 return;

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

@@ -395,6 +395,12 @@
     <Compile Include="UserControl\X2DFGDOPParam.Designer.cs">
       <DependentUpon>X2DFGDOPParam.cs</DependentUpon>
     </Compile>
+    <Compile Include="UserControl\X3DFGDOPParam .cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="UserControl\X3DFGDOPParam .Designer.cs">
+      <DependentUpon>X3DFGDOPParam .cs</DependentUpon>
+    </Compile>
     <Compile Include="UserControl\X3GDOPParam.cs">
       <SubType>UserControl</SubType>
     </Compile>

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


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


+ 1 - 1
XdCxRhDW.Core/Api/GDOP误差椭圆/GDOPAPi.cs

@@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace XdCxRhDW.App.Api.GDOP误差椭圆
+namespace XdCxRhDW.Core.Api
 {
     public static class GDOPApi
     {

+ 1 - 1
XdCxRhDW.Core/Api/GDOP误差椭圆/GdopConfig.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 
-namespace XdCxRhDW.App.Api.GDOP误差椭圆
+namespace XdCxRhDW.Core.Api
 {
     
     /// <summary>

+ 14 - 14
XdCxRhDW.Core/Api/GDOP误差椭圆/GdopHelper.cs

@@ -4,7 +4,7 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Runtime.InteropServices;
 
-namespace XdCxRhDW.App.Api.GDOP误差椭圆
+namespace XdCxRhDW.Core.Api
 {
     public static class GdopHelper
     {
@@ -22,7 +22,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
         /// <param name="dtousErr">时差误差</param>
         /// <param name="ephLocErr">星历误差</param>
         /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapPoints>) Gdop2Sat1D(string mainLines, string adajLines, DateTime captime, double[] cdbPos, double dtousErr, double ephLocErr, double[] refPos = null)
+        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop2Sat1D(string mainLines, string adajLines, DateTime captime, double[] cdbPos, double dtousErr, double ephLocErr, double[] refPos = null)
         {
             int satCount = 2;
             //该值和points 一一对应
@@ -56,7 +56,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<SatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines);
+            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -80,7 +80,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
         /// <param name="ephLocErr">星历误差</param>
         /// <param name="refPos">参考站位置 3</param>
         /// <returns></returns>
-        public static (List<SatInfo>, List<ErrDistanceMapPoints>) Gdop1Sat1D(string mainLines, DateTime captime, double[] cdbPos, double[] cxPos, double dtousErr, double doaErr, double ephLocErr, double[] refPos = null)
+        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop1Sat1D(string mainLines, DateTime captime, double[] cdbPos, double[] cxPos, double dtousErr, double doaErr, double ephLocErr, double[] refPos = null)
         {
             int satCount = 1;
             //该值和points 一一对应
@@ -110,7 +110,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<SatInfo> satInfos = ParseResult(satCount, satllh, mainLines);
+            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -123,7 +123,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
             return (satInfos, errs);
         }
 
-        public static (List<SatInfo>, List<ErrDistanceMapPoints>) Gdop3Sat(string mainLines, string adajLines, string adajLines2,
+        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop3Sat(string mainLines, string adajLines, string adajLines2,
             DateTime captime, double dtousErr, double ephLocErr, double[] refPos = null)
         {
             int satCount = 3;
@@ -158,7 +158,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<SatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines, adajLines2);
+            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines, adajLines2);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -171,7 +171,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
             return (satInfos, errs);
         }
 
-        public static (List<SatInfo>, List<ErrDistanceMapPoints>) Gdop3SatDF(string mainLines, string adajLines, string adajLines2,
+        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop3SatDF(string mainLines, string adajLines, string adajLines2,
           DateTime captime, double fuHz1, double fuHz2, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
         {
             int satCount = 3;
@@ -196,7 +196,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<SatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines, adajLines2);
+            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines, adajLines2);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -209,7 +209,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
             return (satInfos, errs);
         }
 
-        public static (List<SatInfo>, List<ErrDistanceMapPoints>) Gdop2SatDRef(string mainLines, string adajLines,
+        public static (List<MapSatInfo>, List<ErrDistanceMapPoints>) Gdop2SatDRef(string mainLines, string adajLines,
       DateTime captime, double fuHz1, double fuHz2, double dtousErr, double dfoErr, double ephLocErr, double ephVErr, double[] refPos)
         {
             int satCount = 2;
@@ -234,7 +234,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
                 points.Add(levelval);
             }
             GDOPApi.FreeGDOPBuf(res);
-            List<SatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines);
+            List<MapSatInfo> satInfos = ParseResult(satCount, satllh, mainLines, adajLines);
             List<ErrDistanceMapPoints> errs = new List<ErrDistanceMapPoints>();
             for (int i = 0; i < points.Count; i++)
             {
@@ -263,14 +263,14 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
         }
 
 
-        private static List<SatInfo> ParseResult(int satCount, double[] satllh, params string[] ephLine)
+        private static List<MapSatInfo> ParseResult(int satCount, double[] satllh, params string[] ephLine)
         {
 
-            List<SatInfo> list = new List<SatInfo>();
+            List<MapSatInfo> list = new List<MapSatInfo>();
             int len = 3;
             for (int i = 0; i < satCount; i++)
             {
-                SatInfo satInfo = new SatInfo();
+                MapSatInfo satInfo = new MapSatInfo();
                 var ephstrs = ephLine[i].Split(new string[] { " ", "U" }, StringSplitOptions.RemoveEmptyEntries);
                 if (ephstrs.Length == 16)
                 {

+ 2 - 2
XdCxRhDW.Core/Api/GDOP误差椭圆/MapItem.cs

@@ -4,7 +4,7 @@ using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
 
-namespace XdCxRhDW.App.Api.GDOP误差椭圆
+namespace XdCxRhDW.Core.Api
 {
     /// <summary>
     /// 对应地图上一个点
@@ -35,7 +35,7 @@ namespace XdCxRhDW.App.Api.GDOP误差椭圆
         public string ErrDistanceKm => $"{ErrDistance / 1e3}km";
         public List<MapDot> MapDots { get; set; } = new List<MapDot>();
     }
-    public class SatInfo
+    public class MapSatInfo
     {
         public int? SatCode { get; set; }
         public double SatLon { get; set; }

+ 1 - 1
XdCxRhDW.Core/HttpHelper.cs

@@ -40,7 +40,7 @@ namespace XdCxRhDW.Core
         {
             var handler = new HttpClientHandler() { UseCookies = false };
             HttpClient client = new HttpClient(handler);
-            client.Timeout = TimeSpan.FromSeconds(10);
+            client.Timeout = TimeSpan.FromSeconds(20);
             var message = new HttpRequestMessage(HttpMethod.Post, url);
             message.Content = data;
 

+ 0 - 6
XdCxRhDW.Core/XdCxRhDW.Core.csproj

@@ -72,12 +72,6 @@
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>
     <None Include="Api\GDOP误差椭圆\GDOP\GDOP.h" />
-    <None Include="Api\GDOP误差椭圆\GDOP\GDOP_Analysis.dll">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-    <None Include="Api\GDOP误差椭圆\GDOP\GDOP_Draw.dll">
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
     <None Include="Api\GDOP误差椭圆\GDOP\Tle2XYZ.dll">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </None>

+ 38 - 38
XdCxRhDW.WebApi/Controllers/DetectCgController.cs

@@ -172,26 +172,26 @@ namespace XdCxRhDW.WebApi.Controllers
       /// </summary>
       /// <param name="token"></param>
       /// <returns></returns>
-        [HttpPost]
-        public async Task<AjaxResult<bool>> StopEstimationCalc(string token)
-        {
-            return await Task.Run(() =>
-            {
-                lock (thisLock)
-                {
-                    if (keyValues.ContainsKey(token))
-                    {
-                        keyValues[token].StopCalc();
-                        return Success(true);
-                    }
-                    else
-                    {
-                        return Success(false);
-                    }
-                }
-            });
+        //[HttpPost]
+        //public async Task<AjaxResult<bool>> StopEstimationCalc(string token)
+        //{
+        //    return await Task.Run(() =>
+        //    {
+        //        lock (thisLock)
+        //        {
+        //            if (keyValues.ContainsKey(token))
+        //            {
+        //                keyValues[token].StopCalc();
+        //                return Success(true);
+        //            }
+        //            else
+        //            {
+        //                return Success(false);
+        //            }
+        //        }
+        //    });
 
-        }
+        //}
 
 
 
@@ -282,26 +282,26 @@ namespace XdCxRhDW.WebApi.Controllers
         /// </summary>
         /// <param name="token"></param>
         /// <returns></returns>
-        [HttpPost]
-        public async Task<AjaxResult<bool>> StopDetectCalc(string token)
-        {
-            return await Task.Run(() =>
-            {
-                lock (thisLock)
-                {
-                    if (keyValues.ContainsKey(token))
-                    {
-                        keyValues[token].StopDm();
-                        return Success(true);
-                    }
-                    else
-                    {
-                        return Success(false);
-                    }
-                }
-            });
+        //[HttpPost]
+        //public async Task<AjaxResult<bool>> StopDetectCalc(string token)
+        //{
+        //    return await Task.Run(() =>
+        //    {
+        //        lock (thisLock)
+        //        {
+        //            if (keyValues.ContainsKey(token))
+        //            {
+        //                keyValues[token].StopDm();
+        //                return Success(true);
+        //            }
+        //            else
+        //            {
+        //                return Success(false);
+        //            }
+        //        }
+        //    });
 
-        }
+        //}
 
         /// <summary>
         /// 上传文件

+ 1 - 1
XdCxRhDw.Dto/EstimationResDto.cs

@@ -42,7 +42,7 @@ namespace XdCxRhDw.Dto
         public double TimeMs { get; set; }
 
         /// <summary>
-        /// ???
+        /// 标识
         /// </summary>
         public string Token { get; set; }