1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- 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 CG.App.Api.时差粗值预测;
- using CG.App.Api.星历推算;
- using XzXdDw.App;
- namespace CG.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);
- }
- }
- }
|