using DxHelper; using ExtensionsDev; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using XdCxRhDW.App.Api.时差粗值预测; using XdCxRhDW.App.Api.星历推算; using XzXdDw.App; namespace XdCxRhDW.App.UserControl { public partial class DtSXLParam : DevExpress.XtraEditors.XtraUserControl { public (double starLon, double startLat, double centerLon, double centerLat, double endLon, double endLat, double lonRange, double latRange) rect { get; set; } public DtSXLParam() { InitializeComponent(); } private void DtXDParam_Load(object sender, EventArgs e) { captime.UseDefault(); mainTle.Text = TestData.tleleo1; adajTle.Text = TestData.tleleo2; captime.DateTime = TestData.leoTime; } private void btnOk_Click(object sender, EventArgs e) { double[] center = new double[3]; center[0] = rect.centerLon; center[1] = rect.centerLat; //1.计算星历 var geo1 = Tle2XYZ.GetXyz(mainTle.Text, captime.DateTime); var geo2 = Tle2XYZ.GetXyz(adajTle.Text, captime.DateTime); //输出 double[] resule = new double[2]; DtApi.GetLEOTime(geo1, geo2, center, rect.lonRange, rect.latRange, resule); sxdtcetner.Text = $"{resule[0] * 1e6:F2}"; sxdtrange.Text = $"{resule[1] * 1e6:F2}"; } private void btnClose_Click(object sender, EventArgs e) { PopupHelper.HidePopup(this); } } }