Browse Source

修改查询星历

wyq 1 year ago
parent
commit
f82e2c2a79

+ 3 - 3
XdCxRhDW.App/UserControl/UCEphXYZ.Designer.cs

@@ -71,7 +71,7 @@
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph)});
             this.ephX.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephX.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephX.Properties.MaskSettings.Set("mask", "f3");
+            this.ephX.Properties.MaskSettings.Set("mask", "f4");
             this.ephX.Properties.MaxLength = 10;
             this.ephX.Properties.UseMaskAsDisplayFormat = true;
             this.ephX.Size = new System.Drawing.Size(169, 20);
@@ -86,7 +86,7 @@
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph)});
             this.ephY.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephY.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephY.Properties.MaskSettings.Set("mask", "f3");
+            this.ephY.Properties.MaskSettings.Set("mask", "f4");
             this.ephY.Properties.MaxLength = 10;
             this.ephY.Properties.UseMaskAsDisplayFormat = true;
             this.ephY.Size = new System.Drawing.Size(146, 20);
@@ -101,7 +101,7 @@
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph)});
             this.ephZ.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephZ.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephZ.Properties.MaskSettings.Set("mask", "f3");
+            this.ephZ.Properties.MaskSettings.Set("mask", "f4");
             this.ephZ.Properties.MaxLength = 10;
             this.ephZ.Properties.UseMaskAsDisplayFormat = true;
             this.ephZ.Size = new System.Drawing.Size(143, 20);

+ 3 - 3
XdCxRhDW.App/UserControl/UCEphXYZ.cs

@@ -27,11 +27,11 @@ namespace XdCxRhDW.App.UserControl
             SatCode = satCode;
 
             layoutControlItemx.AllowHtmlStringInCaption = true;
-            ephX.EditValue = eph.x.HasValue ? Math.Round(eph.x.Value, 3) : 0;
+            ephX.EditValue = eph.x.HasValue ? Math.Round(eph.x.Value, 4) : 0;
             layoutControlItemx.Text = $"{title}<size=12><color=0,103,192> [{satCode}]</color></size>星历X";
-            ephY.EditValue = eph.y.HasValue ? Math.Round(eph.y.Value, 3) : 0;
+            ephY.EditValue = eph.y.HasValue ? Math.Round(eph.y.Value, 4) : 0;
             layoutControlItemy.Text = $"{title}星历Y";
-            ephZ.EditValue = eph.z.HasValue ? Math.Round(eph.z.Value, 3) : 0;
+            ephZ.EditValue = eph.z.HasValue ? Math.Round(eph.z.Value, 4) : 0;
             layoutControlItemz.Text = $"{title}星历Z";
             ephX.ForeColor = ephY.ForeColor = ephZ.ForeColor = color;
         }

+ 6 - 6
XdCxRhDW.App/UserControl/UCEphXYZParam.Designer.cs

@@ -101,7 +101,7 @@
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph)});
             this.ephX.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephX.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephX.Properties.MaskSettings.Set("mask", "f3");
+            this.ephX.Properties.MaskSettings.Set("mask", "f4");
             this.ephX.Properties.MaxLength = 10;
             this.ephX.Properties.UseMaskAsDisplayFormat = true;
             this.ephX.Size = new System.Drawing.Size(169, 20);
@@ -116,7 +116,7 @@
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph)});
             this.ephY.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephY.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephY.Properties.MaskSettings.Set("mask", "f3");
+            this.ephY.Properties.MaskSettings.Set("mask", "f4");
             this.ephY.Properties.MaxLength = 10;
             this.ephY.Properties.UseMaskAsDisplayFormat = true;
             this.ephY.Size = new System.Drawing.Size(146, 20);
@@ -131,7 +131,7 @@
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph)});
             this.ephZ.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephZ.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephZ.Properties.MaskSettings.Set("mask", "f3");
+            this.ephZ.Properties.MaskSettings.Set("mask", "f4");
             this.ephZ.Properties.MaxLength = 10;
             this.ephZ.Properties.UseMaskAsDisplayFormat = true;
             this.ephZ.Size = new System.Drawing.Size(143, 20);
@@ -147,7 +147,7 @@
             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.ephVX.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephVX.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephVX.Properties.MaskSettings.Set("mask", "f3");
+            this.ephVX.Properties.MaskSettings.Set("mask", "f4");
             this.ephVX.Properties.MaxLength = 10;
             this.ephVX.Properties.UseMaskAsDisplayFormat = true;
             this.ephVX.Size = new System.Drawing.Size(169, 20);
@@ -163,7 +163,7 @@
             new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "m/s", -1, false, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)});
             this.ephVY.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephVY.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephVY.Properties.MaskSettings.Set("mask", "f3");
+            this.ephVY.Properties.MaskSettings.Set("mask", "f4");
             this.ephVY.Properties.MaxLength = 10;
             this.ephVY.Properties.UseMaskAsDisplayFormat = true;
             this.ephVY.Size = new System.Drawing.Size(146, 20);
@@ -179,7 +179,7 @@
             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.ephVZ.Properties.MaskSettings.Set("MaskManagerType", typeof(DevExpress.Data.Mask.NumericMaskManager));
             this.ephVZ.Properties.MaskSettings.Set("MaskManagerSignature", "allowNull=False");
-            this.ephVZ.Properties.MaskSettings.Set("mask", "f3");
+            this.ephVZ.Properties.MaskSettings.Set("mask", "f4");
             this.ephVZ.Properties.MaxLength = 10;
             this.ephVZ.Properties.UseMaskAsDisplayFormat = true;
             this.ephVZ.Size = new System.Drawing.Size(143, 20);

+ 6 - 6
XdCxRhDW.App/UserControl/UCEphXYZParam.cs

@@ -27,18 +27,18 @@ namespace XdCxRhDW.App.UserControl
             SatCode = satCode;
 
             layoutControlItemx.AllowHtmlStringInCaption = true;
-            ephX.EditValue = eph.x.HasValue ? Math.Round(eph.x.Value, 3) : 0;
+            ephX.EditValue = eph.x.HasValue ? Math.Round(eph.x.Value, 4) : 0;
             layoutControlItemx.Text = $"{title}<size=12><color=0,103,192> [{satCode}]</color></size>星历X";
-            ephY.EditValue = eph.y.HasValue ? Math.Round(eph.y.Value, 3) : 0;
+            ephY.EditValue = eph.y.HasValue ? Math.Round(eph.y.Value, 4) : 0;
             layoutControlItemy.Text = $"{title}星历Y";
-            ephZ.EditValue = eph.z.HasValue ? Math.Round(eph.z.Value, 3) : 0;
+            ephZ.EditValue = eph.z.HasValue ? Math.Round(eph.z.Value, 4) : 0;
             layoutControlItemz.Text = $"{title}星历Z";
 
-            ephVX.EditValue = eph.vx.HasValue ? Math.Round(eph.vx.Value, 3) : 0;
+            ephVX.EditValue = eph.vx.HasValue ? Math.Round(eph.vx.Value, 4) : 0;
             layoutControlItemvx.Text = $"{title}星历VX";
-            ephVY.EditValue = eph.vy.HasValue ? Math.Round(eph.vy.Value, 3) : 0;
+            ephVY.EditValue = eph.vy.HasValue ? Math.Round(eph.vy.Value, 4) : 0;
             layoutControlItemvy.Text = $"{title}星历VY";
-            ephVZ.EditValue = eph.vz.HasValue ? Math.Round(eph.vz.Value, 3) : 0;
+            ephVZ.EditValue = eph.vz.HasValue ? Math.Round(eph.vz.Value, 4) : 0;
             layoutControlItemvz.Text = $"{title}星历VZ";
 
             ephX.ForeColor = ephY.ForeColor = ephZ.ForeColor = ephVX.ForeColor = ephVY.ForeColor = ephVZ.ForeColor = color;

+ 4 - 4
XdCxRhDW.Repostory/XlRepository.cs

@@ -37,22 +37,22 @@ namespace XdCxRhDW.Repostory
         /// 获取某个星某个时刻最近的双行根(可能返回null)
         /// </summary>
         /// <param name="satCode">卫星编号</param>
-        /// <param name="timeBj">时刻</param>
+        /// <param name="sigTime">时刻</param>
         /// <returns></returns>
-        public static async Task<XlInfo> GetLatestAsync(int satCode, DateTime timeBj)
+        public static async Task<XlInfo> GetLatestAsync(int satCode, DateTime sigTime)
         {
             try
             {
                 using (RHDWContext db = new RHDWContext())
                 {
-                  var res= await db.XlInfos.SqlQuery($"SELECT min(abs(JULIANDAY(timebj)-JULIANDAY('{timeBj:yyyy-MM-dd HH:mm:ss}')))" +
+                  var res= await db.XlInfos.SqlQuery($"SELECT min(abs(JULIANDAY(TimeUTC)-JULIANDAY('{sigTime:yyyy-MM-dd HH:mm:ss}')))" +
                         $" as NearDaySpan,* FROM XlInfo where satcode={satCode}").FirstOrDefaultAsync();
                     return res;
                 }
             }
             catch (Exception ex)
             {
-                Serilog.Log.Error(ex, $"获取卫星[{satCode}]--{timeBj:yyyyMMddHHmmss}时刻附近的双行根数出错!");
+                Serilog.Log.Error(ex, $"获取卫星[{satCode}]--{sigTime:yyyyMMddHHmmss}时刻附近的双行根数出错!");
                 return null;
             }
         }