XZGDOPParam .cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. using DevExpress.Mvvm.ModuleInjection.Native;
  2. using DevExpress.XtraEditors;
  3. using DxHelper;
  4. using ExtensionsDev;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.ComponentModel;
  8. using System.Data;
  9. using System.Drawing;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows.Forms;
  14. using XzXdDw.App;
  15. using XzXdDw.App.Model;
  16. namespace XdCxRhDW.App.UserControl
  17. {
  18. public partial class XZGDOPParam : DevExpress.XtraEditors.XtraUserControl
  19. {
  20. public GDOP星座协同接口 Model => new GDOP星座协同接口()
  21. {
  22. TleLeo1 = txtTleLeo1.Text.Trim(),
  23. TleLeo2 = txtTleLeo2.Text.Trim(),
  24. CapTime = txtCapTime.DateTime,
  25. RefLon = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[0].Trim()),
  26. RefLat = Convert.ToDouble(txtRefLocation1.Text.Replace(",", ",").Split(',')[1].Trim()),
  27. DtousErr = Convert.ToDouble(txtDtousErr1.Text),
  28. DfoErr = Convert.ToDouble(txtDfoErr1.Text),
  29. SatLocErr = Convert.ToDouble(txtSatLocErr1.Text),
  30. EphVelErr = Convert.ToDouble(txtEphVelErr1.Text),
  31. fu1 = Convert.ToDouble(txtFu1.Text) * 1e6,
  32. fu2 = Convert.ToDouble(txtFu2.Text) * 1e6,
  33. };
  34. public XZGDOPParam(TxInfo refTx, DateTime sigTime, double upfreqHz1, double upfreqHz2)
  35. {
  36. InitializeComponent();
  37. txtCapTime.UseDefault();
  38. txtTleLeo1.UseDoubleClickToSelectAll();
  39. txtTleLeo2.UseDoubleClickToSelectAll();
  40. txtRefLocation1.UseDoubleClickToSelectAll();
  41. this.txtCapTime.DateTime = sigTime;
  42. this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
  43. txtTleLeo1.UseDefault().SetStringData(TestData.AllTle).Text = TestData.tleleo1;
  44. txtTleLeo2.UseDefault().SetStringData(TestData.AllTle).Text = TestData.tleleo2;
  45. this.txtDtousErr1.EditValue = TestData.DtousErr;
  46. this.txtDfoErr1.EditValue = TestData.DfoHzErr;
  47. this.txtSatLocErr1.EditValue = TestData.SatLocErr;
  48. this.txtEphVelErr1.EditValue = TestData.EphVelErr;
  49. this.txtFu1.EditValue = upfreqHz1 * 1e-6;
  50. this.txtFu2.EditValue = upfreqHz2 * 1e-6;
  51. }
  52. private void btnOK_Click(object sender, EventArgs e)
  53. {
  54. PopupHelper.HidePopup(this);
  55. }
  56. }
  57. public class GDOP星座协同接口
  58. {
  59. /// <summary>
  60. /// 主星星历(Tle)
  61. /// </summary>
  62. public string TleLeo1 { get; set; }
  63. /// <summary>
  64. /// 邻星星历(Tle)
  65. /// </summary>
  66. public string TleLeo2 { get; set; }
  67. /// <summary>
  68. /// 采集时刻
  69. /// </summary>
  70. public DateTime CapTime { get; set; }
  71. /// <summary>
  72. /// 参考站位置经度
  73. /// </summary>
  74. public double RefLon { get; set; }
  75. /// <summary>
  76. /// 参考站位置纬度
  77. /// </summary>
  78. public double RefLat { get; set; }
  79. /// <summary>
  80. /// 时差误差(单位us)
  81. /// </summary>
  82. public double DtousErr { get; set; } = 1;
  83. /// <summary>
  84. /// 频差误差(Hz)
  85. /// </summary>
  86. public double DfoErr { get; set; }
  87. /// <summary>
  88. /// 星历位置误差(单位米)
  89. /// </summary>
  90. public double SatLocErr { get; set; } = 10000;
  91. /// <summary>
  92. ///星历速度误差
  93. /// </summary>
  94. public double EphVelErr { get; set; }
  95. /// <summary>
  96. /// 上行频点1(Hz)
  97. /// </summary>
  98. public double fu1 { get; set; }
  99. /// <summary>
  100. /// 上行频点2(Hz)
  101. /// </summary>
  102. public double fu2 { get; set; }
  103. }
  104. }