XZGDOPParam .cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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, double upfreqHz1, double upfreqHz2)
  35. {
  36. InitializeComponent();
  37. txtCapTime.UseDefault();
  38. txtCapTime.DateTime = TestData.leoTime;
  39. txtTleLeo1.UseDoubleClickToSelectAll();
  40. txtTleLeo2.UseDoubleClickToSelectAll();
  41. txtRefLocation1.UseDoubleClickToSelectAll();
  42. this.txtCapTime.DateTime = TestData.leoTime;
  43. this.txtRefLocation1.Text = $"{refTx.Lon},{refTx.Lat}";
  44. txtTleLeo1.UseDefault().SetStringData(TestData.AllTle).Text = TestData.tleleo1;
  45. txtTleLeo2.UseDefault().SetStringData(TestData.AllTle).Text = TestData.tleleo2;
  46. this.txtDtousErr1.EditValue = TestData.DtousErr;
  47. this.txtDfoErr1.EditValue = TestData.DfoHzErr;
  48. this.txtSatLocErr1.EditValue = TestData.SatLocErr;
  49. this.txtEphVelErr1.EditValue = TestData.EphVelErr;
  50. this.txtFu1.EditValue = upfreqHz1 * 1e-6;
  51. this.txtFu2.EditValue = upfreqHz2 * 1e-6;
  52. }
  53. private void btnOK_Click(object sender, EventArgs e)
  54. {
  55. PopupHelper.HidePopup(this);
  56. }
  57. }
  58. public class GDOP星座协同接口
  59. {
  60. /// <summary>
  61. /// 主星星历(Tle)
  62. /// </summary>
  63. public string TleLeo1 { get; set; }
  64. /// <summary>
  65. /// 邻星星历(Tle)
  66. /// </summary>
  67. public string TleLeo2 { get; set; }
  68. /// <summary>
  69. /// 采集时刻
  70. /// </summary>
  71. public DateTime CapTime { get; set; }
  72. /// <summary>
  73. /// 参考站位置经度
  74. /// </summary>
  75. public double RefLon { get; set; }
  76. /// <summary>
  77. /// 参考站位置纬度
  78. /// </summary>
  79. public double RefLat { get; set; }
  80. /// <summary>
  81. /// 时差误差(单位us)
  82. /// </summary>
  83. public double DtousErr { get; set; } = 1;
  84. /// <summary>
  85. /// 频差误差(Hz)
  86. /// </summary>
  87. public double DfoErr { get; set; }
  88. /// <summary>
  89. /// 星历位置误差(单位米)
  90. /// </summary>
  91. public double SatLocErr { get; set; } = 10000;
  92. /// <summary>
  93. ///星历速度误差
  94. /// </summary>
  95. public double EphVelErr { get; set; }
  96. /// <summary>
  97. /// 上行频点1(Hz)
  98. /// </summary>
  99. public double fu1 { get; set; }
  100. /// <summary>
  101. /// 上行频点2(Hz)
  102. /// </summary>
  103. public double fu2 { get; set; }
  104. }
  105. }