wyq 1 year ago
parent
commit
2c4f92d147

+ 1 - 1
Service/X2LeoTaskServer54/App.config

@@ -21,7 +21,7 @@
 		<add key ="Adja1SatInfo" value="40892,-4629555.87,4978929.91,1487241.78,-4890.2693,-3337.6709,-4031.3087"/>
 
 		<!---参考下行频点 MHZ-->
-		<add key="RefFreqDownMHz"  value="261"/>
+		<add key="RefFreqDownMHz"  value="265"/>
 
 		<!--定位时差系数-->
 		<add key="PosDtoFactor" value="1"/>

+ 2 - 2
Service/X2LeoTaskServer54/HistoryFile.cs

@@ -38,9 +38,9 @@ namespace X2LeoTaskServer54
         public int Fs { get; set; }
 
         /// <summary>
-        /// 是否是目标信号
+        /// 是否是参考信号
         /// </summary>
-        public bool BeTarget { get; set; }
+        public bool BeRef{ get; set; }
     }
 
 }

+ 3 - 3
Service/X2LeoTaskServer54/Service/TaskService.cs

@@ -122,8 +122,8 @@ namespace X2LeoTaskServer54.Service
                         {
                             if (cts.IsCancellationRequested) break;
                             var adTime = groupFile.First().AdTime;
-                            var tarItems = groupFile.Where(m => m.BeTarget).GroupBy(p => p.FreqDownMHz);//N个目标
-                            var refItems = groupFile.Where(m => !m.BeTarget);//一个参考
+                            var tarItems = groupFile.Where(m => !m.BeRef).GroupBy(p => p.FreqDownMHz);//N个目标
+                            var refItems = groupFile.Where(m => m.BeRef);//一个参考
                             if (refItems.Count() != 2)
                             {
                                 await LogHelper.Warning($"【任务{dto.ID}】{adTime:yyyyMMddHHmmss}时刻-参考信号{RefFreqDownMHz}MHz-AD文件个数不为2,跳过此组数据");
@@ -507,7 +507,7 @@ namespace X2LeoTaskServer54.Service
                 FreqDownMHz = freqDownMHz,
                 Fs = Convert.ToInt32(arr[2]),
                 Ch = Convert.ToInt32(arr[3]),
-                BeTarget = RefFreqDownMHz != freqDownMHz,//判断是不是目标频点
+                BeRef = RefFreqDownMHz == freqDownMHz,//判断是不是参考频点
 
             };
             return adFile;

+ 1 - 18
XdCxRhDW.App/EditForms/TarDfoLeoX1Calc.cs

@@ -1,24 +1,7 @@
-using DevExpress.XtraEditors;
-using DevExpress.XtraEditors.Controls;
-using ExtensionsDev;
-using Newtonsoft.Json.Linq;
+using ExtensionsDev;
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Data.Entity;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Documents;
 using System.Windows.Forms;
-using System.Windows.Input;
-using XdCxRhDW.Api;
 using XdCxRhDW.Api.AddIns;
-using XdCxRhDW.Entity;
-using XdCxRhDW.Repostory;
 
 namespace XdCxRhDW.App.EditForms
 {

+ 147 - 68
XdCxRhDW.App/EditForms/TarDfoLeoX2Calc.Designer.cs

@@ -39,6 +39,7 @@
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject();
             DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject();
             this.layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
+            this.listBoxRes = new DevExpress.XtraEditors.ListBoxControl();
             this.btnOk = new DevExpress.XtraEditors.SimpleButton();
             this.txtTar = new DevExpress.XtraEditors.TextEdit();
             this.txtX1 = new DevExpress.XtraEditors.TextEdit();
@@ -54,11 +55,13 @@
             this.txtVY2 = new DevExpress.XtraEditors.TextEdit();
             this.txtVZ2 = new DevExpress.XtraEditors.TextEdit();
             this.txtTarFuMhz = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtRefFuMhz = new DevExpress.XtraEditors.ButtonEdit();
+            this.txtRec = new DevExpress.XtraEditors.TextEdit();
+            this.txtRef = new DevExpress.XtraEditors.TextEdit();
             this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
             this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
             this.emptySpaceItem3 = new DevExpress.XtraLayout.EmptySpaceItem();
-            this.txtRes = new DevExpress.XtraLayout.SimpleLabelItem();
             this.lcX1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.lcY1 = new DevExpress.XtraLayout.LayoutControlItem();
             this.lcZ1 = new DevExpress.XtraLayout.LayoutControlItem();
@@ -72,10 +75,13 @@
             this.lcVY2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.lcVZ2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem22 = new DevExpress.XtraLayout.LayoutControlItem();
-            this.txtRefFuMhz = new DevExpress.XtraEditors.ButtonEdit();
+            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
             this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
+            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).BeginInit();
             this.layoutControl1.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.listBoxRes)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTar.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtX1.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtY1.Properties)).BeginInit();
@@ -90,11 +96,13 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtVY2.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtVZ2.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTarFuMhz.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRefFuMhz.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRec.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRef.Properties)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtRes)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.lcX1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.lcY1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.lcZ1)).BeginInit();
@@ -108,12 +116,15 @@
             ((System.ComponentModel.ISupportInitialize)(this.lcVY2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.lcVZ2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtRefFuMhz.Properties)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
             this.SuspendLayout();
             // 
             // layoutControl1
             // 
+            this.layoutControl1.Controls.Add(this.listBoxRes);
             this.layoutControl1.Controls.Add(this.btnOk);
             this.layoutControl1.Controls.Add(this.txtTar);
             this.layoutControl1.Controls.Add(this.txtX1);
@@ -130,18 +141,28 @@
             this.layoutControl1.Controls.Add(this.txtVZ2);
             this.layoutControl1.Controls.Add(this.txtTarFuMhz);
             this.layoutControl1.Controls.Add(this.txtRefFuMhz);
+            this.layoutControl1.Controls.Add(this.txtRec);
+            this.layoutControl1.Controls.Add(this.txtRef);
             this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.layoutControl1.Location = new System.Drawing.Point(0, 0);
             this.layoutControl1.Name = "layoutControl1";
             this.layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(831, 101, 650, 400);
             this.layoutControl1.Root = this.Root;
-            this.layoutControl1.Size = new System.Drawing.Size(475, 439);
+            this.layoutControl1.Size = new System.Drawing.Size(475, 583);
             this.layoutControl1.TabIndex = 0;
             this.layoutControl1.Text = "layoutControl1";
             // 
+            // listBoxRes
+            // 
+            this.listBoxRes.Location = new System.Drawing.Point(22, 440);
+            this.listBoxRes.Name = "listBoxRes";
+            this.listBoxRes.Size = new System.Drawing.Size(431, 121);
+            this.listBoxRes.StyleController = this.layoutControl1;
+            this.listBoxRes.TabIndex = 11;
+            // 
             // btnOk
             // 
-            this.btnOk.Location = new System.Drawing.Point(337, 354);
+            this.btnOk.Location = new System.Drawing.Point(337, 410);
             this.btnOk.Name = "btnOk";
             this.btnOk.Size = new System.Drawing.Size(116, 26);
             this.btnOk.StyleController = this.layoutControl1;
@@ -161,7 +182,7 @@
             // txtX1
             // 
             this.txtX1.EditValue = "-1608418.46";
-            this.txtX1.Location = new System.Drawing.Point(22, 171);
+            this.txtX1.Location = new System.Drawing.Point(22, 227);
             this.txtX1.Name = "txtX1";
             this.txtX1.Size = new System.Drawing.Size(138, 20);
             this.txtX1.StyleController = this.layoutControl1;
@@ -170,7 +191,7 @@
             // txtY1
             // 
             this.txtY1.EditValue = "5994257.60";
-            this.txtY1.Location = new System.Drawing.Point(164, 171);
+            this.txtY1.Location = new System.Drawing.Point(164, 227);
             this.txtY1.Name = "txtY1";
             this.txtY1.Size = new System.Drawing.Size(138, 20);
             this.txtY1.StyleController = this.layoutControl1;
@@ -179,7 +200,7 @@
             // txtZ1
             // 
             this.txtZ1.EditValue = "3139819.89";
-            this.txtZ1.Location = new System.Drawing.Point(306, 171);
+            this.txtZ1.Location = new System.Drawing.Point(306, 227);
             this.txtZ1.Name = "txtZ1";
             this.txtZ1.Size = new System.Drawing.Size(147, 20);
             this.txtZ1.StyleController = this.layoutControl1;
@@ -188,7 +209,7 @@
             // txtVX1
             // 
             this.txtVX1.EditValue = "-6632.8731";
-            this.txtVX1.Location = new System.Drawing.Point(22, 221);
+            this.txtVX1.Location = new System.Drawing.Point(22, 277);
             this.txtVX1.Name = "txtVX1";
             this.txtVX1.Size = new System.Drawing.Size(138, 20);
             this.txtVX1.StyleController = this.layoutControl1;
@@ -197,7 +218,7 @@
             // txtVY1
             // 
             this.txtVY1.EditValue = "-373.9909";
-            this.txtVY1.Location = new System.Drawing.Point(164, 221);
+            this.txtVY1.Location = new System.Drawing.Point(164, 277);
             this.txtVY1.Name = "txtVY1";
             this.txtVY1.Size = new System.Drawing.Size(138, 20);
             this.txtVY1.StyleController = this.layoutControl1;
@@ -206,7 +227,7 @@
             // txtVZ1
             // 
             this.txtVZ1.EditValue = "-2678.2335";
-            this.txtVZ1.Location = new System.Drawing.Point(306, 221);
+            this.txtVZ1.Location = new System.Drawing.Point(306, 277);
             this.txtVZ1.Name = "txtVZ1";
             this.txtVZ1.Size = new System.Drawing.Size(147, 20);
             this.txtVZ1.StyleController = this.layoutControl1;
@@ -215,7 +236,7 @@
             // txtX2
             // 
             this.txtX2.EditValue = "-4629555.87";
-            this.txtX2.Location = new System.Drawing.Point(22, 271);
+            this.txtX2.Location = new System.Drawing.Point(22, 327);
             this.txtX2.Name = "txtX2";
             this.txtX2.Size = new System.Drawing.Size(138, 20);
             this.txtX2.StyleController = this.layoutControl1;
@@ -224,7 +245,7 @@
             // txtY2
             // 
             this.txtY2.EditValue = "4978929.91";
-            this.txtY2.Location = new System.Drawing.Point(164, 271);
+            this.txtY2.Location = new System.Drawing.Point(164, 327);
             this.txtY2.Name = "txtY2";
             this.txtY2.Size = new System.Drawing.Size(138, 20);
             this.txtY2.StyleController = this.layoutControl1;
@@ -233,7 +254,7 @@
             // txtZ2
             // 
             this.txtZ2.EditValue = "1487241.78";
-            this.txtZ2.Location = new System.Drawing.Point(306, 271);
+            this.txtZ2.Location = new System.Drawing.Point(306, 327);
             this.txtZ2.Name = "txtZ2";
             this.txtZ2.Size = new System.Drawing.Size(147, 20);
             this.txtZ2.StyleController = this.layoutControl1;
@@ -242,7 +263,7 @@
             // txtVX2
             // 
             this.txtVX2.EditValue = "-4890.2693";
-            this.txtVX2.Location = new System.Drawing.Point(22, 321);
+            this.txtVX2.Location = new System.Drawing.Point(22, 377);
             this.txtVX2.Name = "txtVX2";
             this.txtVX2.Size = new System.Drawing.Size(138, 20);
             this.txtVX2.StyleController = this.layoutControl1;
@@ -251,7 +272,7 @@
             // txtVY2
             // 
             this.txtVY2.EditValue = "-3337.6709";
-            this.txtVY2.Location = new System.Drawing.Point(164, 321);
+            this.txtVY2.Location = new System.Drawing.Point(164, 377);
             this.txtVY2.Name = "txtVY2";
             this.txtVY2.Size = new System.Drawing.Size(138, 20);
             this.txtVY2.StyleController = this.layoutControl1;
@@ -260,7 +281,7 @@
             // txtVZ2
             // 
             this.txtVZ2.EditValue = "-4031.3087";
-            this.txtVZ2.Location = new System.Drawing.Point(306, 321);
+            this.txtVZ2.Location = new System.Drawing.Point(306, 377);
             this.txtVZ2.Name = "txtVZ2";
             this.txtVZ2.Size = new System.Drawing.Size(147, 20);
             this.txtVZ2.StyleController = this.layoutControl1;
@@ -269,15 +290,45 @@
             // txtTarFuMhz
             // 
             this.txtTarFuMhz.EditValue = "260";
-            this.txtTarFuMhz.Location = new System.Drawing.Point(22, 83);
+            this.txtTarFuMhz.Location = new System.Drawing.Point(22, 183);
             this.txtTarFuMhz.MaximumSize = new System.Drawing.Size(0, 20);
             this.txtTarFuMhz.Name = "txtTarFuMhz";
             this.txtTarFuMhz.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtTarFuMhz.Size = new System.Drawing.Size(431, 20);
+            this.txtTarFuMhz.Size = new System.Drawing.Size(216, 20);
             this.txtTarFuMhz.StyleController = this.layoutControl1;
             this.txtTarFuMhz.TabIndex = 10;
             // 
+            // txtRefFuMhz
+            // 
+            this.txtRefFuMhz.EditValue = "265";
+            this.txtRefFuMhz.Location = new System.Drawing.Point(242, 183);
+            this.txtRefFuMhz.MaximumSize = new System.Drawing.Size(0, 20);
+            this.txtRefFuMhz.Name = "txtRefFuMhz";
+            this.txtRefFuMhz.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
+            this.txtRefFuMhz.Size = new System.Drawing.Size(211, 20);
+            this.txtRefFuMhz.StyleController = this.layoutControl1;
+            this.txtRefFuMhz.TabIndex = 10;
+            // 
+            // txtRec
+            // 
+            this.txtRec.EditValue = "";
+            this.txtRec.Location = new System.Drawing.Point(22, 83);
+            this.txtRec.Name = "txtRec";
+            this.txtRec.Size = new System.Drawing.Size(431, 20);
+            this.txtRec.StyleController = this.layoutControl1;
+            this.txtRec.TabIndex = 9;
+            // 
+            // txtRef
+            // 
+            this.txtRef.EditValue = "";
+            this.txtRef.Location = new System.Drawing.Point(22, 133);
+            this.txtRef.Name = "txtRef";
+            this.txtRef.Size = new System.Drawing.Size(431, 20);
+            this.txtRef.StyleController = this.layoutControl1;
+            this.txtRef.TabIndex = 9;
+            // 
             // Root
             // 
             this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
@@ -286,7 +337,6 @@
             this.layoutControlItem5,
             this.layoutControlItem6,
             this.emptySpaceItem3,
-            this.txtRes,
             this.lcX1,
             this.lcY1,
             this.lcZ1,
@@ -300,16 +350,19 @@
             this.lcVY2,
             this.lcVZ2,
             this.layoutControlItem22,
-            this.layoutControlItem1});
+            this.layoutControlItem7,
+            this.layoutControlItem2,
+            this.layoutControlItem1,
+            this.layoutControlItem3});
             this.Root.Name = "Root";
             this.Root.Padding = new DevExpress.XtraLayout.Utils.Padding(20, 20, 20, 20);
-            this.Root.Size = new System.Drawing.Size(475, 439);
+            this.Root.Size = new System.Drawing.Size(475, 583);
             this.Root.TextVisible = false;
             // 
             // layoutControlItem5
             // 
             this.layoutControlItem5.Control = this.btnOk;
-            this.layoutControlItem5.Location = new System.Drawing.Point(315, 332);
+            this.layoutControlItem5.Location = new System.Drawing.Point(315, 388);
             this.layoutControlItem5.MaxSize = new System.Drawing.Size(120, 30);
             this.layoutControlItem5.MinSize = new System.Drawing.Size(120, 30);
             this.layoutControlItem5.Name = "layoutControlItem5";
@@ -336,29 +389,17 @@
             // emptySpaceItem3
             // 
             this.emptySpaceItem3.AllowHotTrack = false;
-            this.emptySpaceItem3.Location = new System.Drawing.Point(0, 332);
+            this.emptySpaceItem3.Location = new System.Drawing.Point(0, 388);
             this.emptySpaceItem3.Name = "emptySpaceItem3";
             this.emptySpaceItem3.Size = new System.Drawing.Size(315, 30);
             this.emptySpaceItem3.TextSize = new System.Drawing.Size(0, 0);
             // 
-            // txtRes
-            // 
-            this.txtRes.AllowHotTrack = false;
-            this.txtRes.Location = new System.Drawing.Point(0, 362);
-            this.txtRes.MaxSize = new System.Drawing.Size(0, 26);
-            this.txtRes.MinSize = new System.Drawing.Size(67, 26);
-            this.txtRes.Name = "txtRes";
-            this.txtRes.Size = new System.Drawing.Size(435, 37);
-            this.txtRes.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
-            this.txtRes.Text = " ";
-            this.txtRes.TextSize = new System.Drawing.Size(72, 14);
-            // 
             // lcX1
             // 
             this.lcX1.Control = this.txtX1;
             this.lcX1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcX1.CustomizationFormText = "主星坐标X";
-            this.lcX1.Location = new System.Drawing.Point(0, 132);
+            this.lcX1.Location = new System.Drawing.Point(0, 188);
             this.lcX1.MaxSize = new System.Drawing.Size(0, 50);
             this.lcX1.MinSize = new System.Drawing.Size(54, 50);
             this.lcX1.Name = "lcX1";
@@ -373,7 +414,7 @@
             this.lcY1.Control = this.txtY1;
             this.lcY1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcY1.CustomizationFormText = "星历X";
-            this.lcY1.Location = new System.Drawing.Point(142, 132);
+            this.lcY1.Location = new System.Drawing.Point(142, 188);
             this.lcY1.MaxSize = new System.Drawing.Size(0, 50);
             this.lcY1.MinSize = new System.Drawing.Size(54, 50);
             this.lcY1.Name = "lcY1";
@@ -388,7 +429,7 @@
             this.lcZ1.Control = this.txtZ1;
             this.lcZ1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcZ1.CustomizationFormText = "星历X";
-            this.lcZ1.Location = new System.Drawing.Point(284, 132);
+            this.lcZ1.Location = new System.Drawing.Point(284, 188);
             this.lcZ1.MaxSize = new System.Drawing.Size(0, 50);
             this.lcZ1.MinSize = new System.Drawing.Size(54, 50);
             this.lcZ1.Name = "lcZ1";
@@ -403,7 +444,7 @@
             this.lcVZ1.Control = this.txtVZ1;
             this.lcVZ1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcVZ1.CustomizationFormText = "星历X";
-            this.lcVZ1.Location = new System.Drawing.Point(284, 182);
+            this.lcVZ1.Location = new System.Drawing.Point(284, 238);
             this.lcVZ1.MaxSize = new System.Drawing.Size(0, 50);
             this.lcVZ1.MinSize = new System.Drawing.Size(54, 50);
             this.lcVZ1.Name = "lcVZ1";
@@ -418,7 +459,7 @@
             this.lcVX1.Control = this.txtVX1;
             this.lcVX1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcVX1.CustomizationFormText = "卫星1坐标X";
-            this.lcVX1.Location = new System.Drawing.Point(0, 182);
+            this.lcVX1.Location = new System.Drawing.Point(0, 238);
             this.lcVX1.MaxSize = new System.Drawing.Size(0, 50);
             this.lcVX1.MinSize = new System.Drawing.Size(54, 50);
             this.lcVX1.Name = "lcVX1";
@@ -433,7 +474,7 @@
             this.lcVY1.Control = this.txtVY1;
             this.lcVY1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcVY1.CustomizationFormText = "星历X";
-            this.lcVY1.Location = new System.Drawing.Point(142, 182);
+            this.lcVY1.Location = new System.Drawing.Point(142, 238);
             this.lcVY1.MaxSize = new System.Drawing.Size(0, 50);
             this.lcVY1.MinSize = new System.Drawing.Size(54, 50);
             this.lcVY1.Name = "lcVY1";
@@ -448,7 +489,7 @@
             this.lcX2.Control = this.txtX2;
             this.lcX2.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcX2.CustomizationFormText = "卫星1坐标X";
-            this.lcX2.Location = new System.Drawing.Point(0, 232);
+            this.lcX2.Location = new System.Drawing.Point(0, 288);
             this.lcX2.MaxSize = new System.Drawing.Size(0, 50);
             this.lcX2.MinSize = new System.Drawing.Size(54, 50);
             this.lcX2.Name = "lcX2";
@@ -463,7 +504,7 @@
             this.lcY2.Control = this.txtY2;
             this.lcY2.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcY2.CustomizationFormText = "星历X";
-            this.lcY2.Location = new System.Drawing.Point(142, 232);
+            this.lcY2.Location = new System.Drawing.Point(142, 288);
             this.lcY2.MaxSize = new System.Drawing.Size(0, 50);
             this.lcY2.MinSize = new System.Drawing.Size(54, 50);
             this.lcY2.Name = "lcY2";
@@ -478,7 +519,7 @@
             this.lcZ2.Control = this.txtZ2;
             this.lcZ2.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcZ2.CustomizationFormText = "星历X";
-            this.lcZ2.Location = new System.Drawing.Point(284, 232);
+            this.lcZ2.Location = new System.Drawing.Point(284, 288);
             this.lcZ2.MaxSize = new System.Drawing.Size(0, 50);
             this.lcZ2.MinSize = new System.Drawing.Size(54, 50);
             this.lcZ2.Name = "lcZ2";
@@ -493,7 +534,7 @@
             this.lcVX2.Control = this.txtVX2;
             this.lcVX2.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcVX2.CustomizationFormText = "卫星1坐标X";
-            this.lcVX2.Location = new System.Drawing.Point(0, 282);
+            this.lcVX2.Location = new System.Drawing.Point(0, 338);
             this.lcVX2.MaxSize = new System.Drawing.Size(0, 50);
             this.lcVX2.MinSize = new System.Drawing.Size(54, 50);
             this.lcVX2.Name = "lcVX2";
@@ -508,7 +549,7 @@
             this.lcVY2.Control = this.txtVY2;
             this.lcVY2.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcVY2.CustomizationFormText = "星历X";
-            this.lcVY2.Location = new System.Drawing.Point(142, 282);
+            this.lcVY2.Location = new System.Drawing.Point(142, 338);
             this.lcVY2.MaxSize = new System.Drawing.Size(0, 50);
             this.lcVY2.MinSize = new System.Drawing.Size(54, 50);
             this.lcVY2.Name = "lcVY2";
@@ -523,7 +564,7 @@
             this.lcVZ2.Control = this.txtVZ2;
             this.lcVZ2.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.lcVZ2.CustomizationFormText = "星历X";
-            this.lcVZ2.Location = new System.Drawing.Point(284, 282);
+            this.lcVZ2.Location = new System.Drawing.Point(284, 338);
             this.lcVZ2.MaxSize = new System.Drawing.Size(0, 50);
             this.lcVZ2.MinSize = new System.Drawing.Size(54, 50);
             this.lcVZ2.Name = "lcVZ2";
@@ -536,48 +577,77 @@
             // layoutControlItem22
             // 
             this.layoutControlItem22.Control = this.txtTarFuMhz;
-            this.layoutControlItem22.Location = new System.Drawing.Point(0, 44);
+            this.layoutControlItem22.Location = new System.Drawing.Point(0, 144);
             this.layoutControlItem22.Name = "layoutControlItem22";
-            this.layoutControlItem22.Size = new System.Drawing.Size(435, 44);
+            this.layoutControlItem22.Size = new System.Drawing.Size(220, 44);
             this.layoutControlItem22.Text = "目标下行频点";
             this.layoutControlItem22.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem22.TextSize = new System.Drawing.Size(72, 14);
             // 
-            // txtRefFuMhz
-            // 
-            this.txtRefFuMhz.EditValue = "260";
-            this.txtRefFuMhz.Location = new System.Drawing.Point(22, 127);
-            this.txtRefFuMhz.MaximumSize = new System.Drawing.Size(0, 20);
-            this.txtRefFuMhz.Name = "txtRefFuMhz";
-            this.txtRefFuMhz.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "MHz", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
-            this.txtRefFuMhz.Size = new System.Drawing.Size(431, 20);
-            this.txtRefFuMhz.StyleController = this.layoutControl1;
-            this.txtRefFuMhz.TabIndex = 10;
+            // layoutControlItem7
+            // 
+            this.layoutControlItem7.Control = this.txtRec;
+            this.layoutControlItem7.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem7.CustomizationFormText = "星历X";
+            this.layoutControlItem7.Location = new System.Drawing.Point(0, 44);
+            this.layoutControlItem7.MaxSize = new System.Drawing.Size(0, 50);
+            this.layoutControlItem7.MinSize = new System.Drawing.Size(54, 50);
+            this.layoutControlItem7.Name = "layoutControlItem7";
+            this.layoutControlItem7.Size = new System.Drawing.Size(435, 50);
+            this.layoutControlItem7.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem7.Text = "接收站位置";
+            this.layoutControlItem7.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem7.TextSize = new System.Drawing.Size(72, 14);
+            // 
+            // layoutControlItem2
+            // 
+            this.layoutControlItem2.Control = this.txtRef;
+            this.layoutControlItem2.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
+            this.layoutControlItem2.CustomizationFormText = "星历X";
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 94);
+            this.layoutControlItem2.MaxSize = new System.Drawing.Size(0, 50);
+            this.layoutControlItem2.MinSize = new System.Drawing.Size(54, 50);
+            this.layoutControlItem2.Name = "layoutControlItem2";
+            this.layoutControlItem2.Size = new System.Drawing.Size(435, 50);
+            this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
+            this.layoutControlItem2.Text = "参考站位置";
+            this.layoutControlItem2.TextLocation = DevExpress.Utils.Locations.Top;
+            this.layoutControlItem2.TextSize = new System.Drawing.Size(72, 14);
             // 
             // layoutControlItem1
             // 
             this.layoutControlItem1.Control = this.txtRefFuMhz;
             this.layoutControlItem1.ControlAlignment = System.Drawing.ContentAlignment.TopLeft;
             this.layoutControlItem1.CustomizationFormText = "下行频点";
-            this.layoutControlItem1.Location = new System.Drawing.Point(0, 88);
+            this.layoutControlItem1.Location = new System.Drawing.Point(220, 144);
             this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Size = new System.Drawing.Size(435, 44);
+            this.layoutControlItem1.Size = new System.Drawing.Size(215, 44);
             this.layoutControlItem1.Text = "参考下行频点";
             this.layoutControlItem1.TextLocation = DevExpress.Utils.Locations.Top;
             this.layoutControlItem1.TextSize = new System.Drawing.Size(72, 14);
             // 
+            // layoutControlItem3
+            // 
+            this.layoutControlItem3.Control = this.listBoxRes;
+            this.layoutControlItem3.Location = new System.Drawing.Point(0, 418);
+            this.layoutControlItem3.Name = "layoutControlItem3";
+            this.layoutControlItem3.Size = new System.Drawing.Size(435, 125);
+            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
+            this.layoutControlItem3.TextVisible = false;
+            // 
             // TarDfoLeoX2Calc
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(475, 439);
+            this.ClientSize = new System.Drawing.Size(475, 583);
             this.Controls.Add(this.layoutControl1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
             this.Name = "TarDfoLeoX2Calc";
             this.Text = "频差预测";
+            this.Load += new System.EventHandler(this.TarDfoLeoX2Calc_Load);
             ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit();
             this.layoutControl1.ResumeLayout(false);
+            ((System.ComponentModel.ISupportInitialize)(this.listBoxRes)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTar.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtX1.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtY1.Properties)).EndInit();
@@ -592,11 +662,13 @@
             ((System.ComponentModel.ISupportInitialize)(this.txtVY2.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtVZ2.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.txtTarFuMhz.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRefFuMhz.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRec.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.txtRef.Properties)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.emptySpaceItem3)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtRes)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.lcX1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.lcY1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.lcZ1)).EndInit();
@@ -610,8 +682,10 @@
             ((System.ComponentModel.ISupportInitialize)(this.lcVY2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.lcVZ2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem22)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.txtRefFuMhz.Properties)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
             this.ResumeLayout(false);
 
         }
@@ -625,7 +699,6 @@
         private DevExpress.XtraEditors.TextEdit txtTar;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
         private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem3;
-        private DevExpress.XtraLayout.SimpleLabelItem txtRes;
         private DevExpress.XtraEditors.TextEdit txtX1;
         private DevExpress.XtraEditors.TextEdit txtY1;
         private DevExpress.XtraEditors.TextEdit txtZ1;
@@ -654,5 +727,11 @@
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem22;
         private DevExpress.XtraEditors.ButtonEdit txtRefFuMhz;
         private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
+        private DevExpress.XtraEditors.TextEdit txtRec;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
+        private DevExpress.XtraEditors.TextEdit txtRef;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
+        private DevExpress.XtraEditors.ListBoxControl listBoxRes;
+        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
     }
 }

+ 60 - 19
XdCxRhDW.App/EditForms/TarDfoLeoX2Calc.cs

@@ -1,21 +1,9 @@
-using DevExpress.XtraEditors;
-using DevExpress.XtraEditors.Controls;
-using ExtensionsDev;
-using Newtonsoft.Json.Linq;
+using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Data.Entity;
-using System.Drawing;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Documents;
 using System.Windows.Forms;
-using System.Windows.Input;
-using XdCxRhDW.Api;
 using XdCxRhDW.Api.AddIns;
 using XdCxRhDW.Entity;
 using XdCxRhDW.Repostory;
@@ -68,17 +56,42 @@ namespace XdCxRhDW.App.EditForms
             txtVY2.EditValue = adja[++idx];
             txtVZ2.EditValue = adja[++idx];
         }
+        private async void TarDfoLeoX2Calc_Load(object sender, EventArgs e)
+        {
+            try
+            {
+                using (RHDWContext db = new RHDWContext())
+                {
+                    var rec = await db.TxInfos.Where(p => p.TxType == EnumTxType.Rec).FirstOrDefaultAsync();
+                    this.txtRec.Text = $"{rec.Lon},{rec.Lat}";
+
+                    var refstation = await db.TxInfos.Where(p => p.TxType == EnumTxType.Ref).FirstOrDefaultAsync();
+                    this.txtRef.Text = $"{refstation.Lon},{refstation.Lat}";
+                }
+            }
+            catch (Exception ex)
+            {
+                await LogHelper.Error("查询天线信息出错", ex);
+                DxHelper.MsgBoxHelper.ShowError("查询天线信息出错");
+            }
+
 
+        }
         private async void btnOk_Click(object sender, EventArgs e)
         {
             try
             {
+                this.listBoxRes.Items.Clear();
                 var strTar = txtTar.Text.Replace(",", ",");
-                var tarfuHz = (Convert.ToDouble(txtTarFuMhz.Text) + 44) * 1e6;
-                var reffuHz = (Convert.ToDouble(txtRefFuMhz.Text) + 44) * 1e6;
+                var strRef = txtRef.Text.Replace(",", ",");
+                var strRec = txtRec.Text.Replace(",", ",");
+
+                //var tarfuHz = (Convert.ToDouble(txtTarFuMhz.Text) + 44) * 1e6;
+               // var reffuHz = (Convert.ToDouble(txtRefFuMhz.Text) + 44) * 1e6;
+
+                var tarfuHz = (Convert.ToDouble(txtTarFuMhz.Text)) * 1e6;
+                var reffuHz = (Convert.ToDouble(txtRefFuMhz.Text)) * 1e6;
 
-                double lon = Convert.ToDouble(strTar.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)[0]);
-                double lat = Convert.ToDouble(strTar.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)[1]);
 
                 double x1 = Convert.ToDouble(txtX1.Text);
                 double y1 = Convert.ToDouble(txtY1.Text);
@@ -96,7 +109,22 @@ namespace XdCxRhDW.App.EditForms
                 double vz2 = Convert.ToDouble(txtVZ2.Text);
                 double[] ephX2 = new double[6] { x2, y2, z2, vx2, vy2, vz2 };
 
-                double[] targetPos = new double[3] { lon, lat, 0 };
+                double[] targetPos = GetDoubles(strTar);
+                double[] refPos = GetDoubles(strRef);
+                double[] recPos = GetDoubles(strRec);
+
+                var tarEcef = PhysicsHelper.GeoToEcef((targetPos[0], targetPos[1], targetPos[2]));
+                var recEcef = PhysicsHelper.GeoToEcef((recPos[0], recPos[1], recPos[2]));
+                var refEcef = PhysicsHelper.GeoToEcef((refPos[0], refPos[1], refPos[2]));
+
+                var xlEcef1 = (x1, y1, z1);
+                var x2Ecef1 = (x2, y2, z2);
+
+                var dt1 = PhysicsHelper.Dto(tarEcef, xlEcef1, recEcef);
+                var dt2 = PhysicsHelper.Dto(tarEcef, x2Ecef1, recEcef);
+
+                var refdt1 = PhysicsHelper.Dto(tarEcef, xlEcef1, refEcef);
+                var refdt2 = PhysicsHelper.Dto(tarEcef, x2Ecef1, refEcef);
 
                 var df1 = DfoCalcAPI.DfoCalc(targetPos, ephX1, tarfuHz);
                 var df2 = DfoCalcAPI.DfoCalc(targetPos, ephX2, tarfuHz);
@@ -104,8 +132,13 @@ namespace XdCxRhDW.App.EditForms
 
                 var refdf1 = DfoCalcAPI.DfoCalc(targetPos, ephX1, reffuHz);
                 var refdf2 = DfoCalcAPI.DfoCalc(targetPos, ephX2, reffuHz);
+                List<string> list = new List<string>();
+                list.Add($"目标主邻时差预测值:{dt1 * 1e6 - dt2 * 1e6:f3}us");
+                list.Add($"参考主邻时差预测值:{refdt1 * 1e6 - refdt2 * 1e6:f3}us");
+                list.Add($"目标主邻频差预测值:{df1 - df2:f3}Hz ");
+                list.Add($"参考主邻频差预测值:{refdf1 - refdf2:f3}Hz");
 
-                this.txtRes.Text = $"目标主邻频差预测值:{df1 - df2:f3}Hz 参考主邻频差预测值:{refdf1 - refdf2:f3}Hz";
+                this.listBoxRes.Items.AddRange(list.ToArray());
             }
             catch (Exception ex)
             {
@@ -114,6 +147,14 @@ namespace XdCxRhDW.App.EditForms
             }
         }
 
+        private double[] GetDoubles(string str)
+        {
 
+            double lon = Convert.ToDouble(str.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)[0]);
+            double lat = Convert.ToDouble(str.Split(",".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)[1]);
+            double[] ds = new double[3] { lon, lat, 0 };
+            return ds;
+        }
+        
     }
 }

+ 1 - 9
XdCxRhDW.App/EditForms/TarDtoDfoCalc.cs

@@ -1,15 +1,7 @@
-using DevExpress.XtraEditors;
-using ExtensionsDev;
+using ExtensionsDev;
 using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
 using System.Data.Entity;
-using System.Drawing;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Documents;
 using System.Windows.Forms;
 using XdCxRhDW.Entity;
 using XdCxRhDW.Repostory;

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

@@ -586,6 +586,7 @@
     <EmbeddedResource Include="PopupControl\ShowCxCtrl.resx">
       <DependentUpon>ShowCxCtrl.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Properties\licenses.licx" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>