You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.2 KiB
45 lines
1.2 KiB
#include "mainwindow.h"
|
|
#include "ui_mainwindow.h"
|
|
#include "Arith_VehicleCoordModule.h"
|
|
MainWindow::MainWindow(QWidget *parent)
|
|
: QMainWindow(parent)
|
|
, ui(new Ui::MainWindow)
|
|
{
|
|
ui->setupUi(this);
|
|
|
|
connect(ui->pushButton, &QPushButton::pressed,this,&MainWindow::cal);
|
|
|
|
this->setWindowTitle("CoordTrans");
|
|
}
|
|
|
|
MainWindow::~MainWindow()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void MainWindow::cal()
|
|
{
|
|
PointBLH self;
|
|
self.B = ui->lineEdit_SelfB->text().toFloat();
|
|
self.L = ui->lineEdit_SelfL->text().toFloat();
|
|
self.H = ui->lineEdit_SelfH->text().toFloat();
|
|
PointXYZ selfXYZ = getXYZFromBLH(self);
|
|
|
|
PointBLH target;
|
|
target.B = ui->lineEdit_targetB->text().toFloat();
|
|
target.L = ui->lineEdit_targetL->text().toFloat();
|
|
target.H = ui->lineEdit_targetH->text().toFloat();
|
|
PointXYZ targetXYZ = getXYZFromBLH(target);
|
|
|
|
PointXYZ nueXYZ = getNUEXYZFromCGCSXYZ(targetXYZ, selfXYZ);
|
|
|
|
PointXYZ CarXYZ = getCarXYZFromCarNUEXYZ(nueXYZ, 12, 0, 0);
|
|
|
|
Pole pole = getPoleFromXYZ(CarXYZ);
|
|
|
|
ui->lineEdit_Az->setText(QString::number(pole.beta));
|
|
|
|
ui->lineEdit_Pt->setText(QString::number(pole.alpha));
|
|
|
|
|
|
} |