|
@@ -1682,16 +1682,17 @@ void MainWindow::on_ea_cf_clicked()
|
|
{
|
|
{
|
|
double x,y,head;
|
|
double x,y,head;
|
|
x= ui->ea_cf_x->text().toDouble();
|
|
x= ui->ea_cf_x->text().toDouble();
|
|
|
|
+ x=-x;
|
|
y= ui->ea_cf_y->text().toDouble();
|
|
y= ui->ea_cf_y->text().toDouble();
|
|
head=m_structMGpsImu.yaw;
|
|
head=m_structMGpsImu.yaw;
|
|
|
|
|
|
- double now_x,now_y,lat,lon,aim_x,aim_y,aim_lat,aim_lon;
|
|
|
|
|
|
+ double now_x,now_y,lat,lon,aim_x,aim_y,aim_lat,aim_lon,dis,add_x,add_y;
|
|
GaussProjCal(m_structMGpsImu.gps_lng,m_structMGpsImu.gps_lat,now_x,now_y);
|
|
GaussProjCal(m_structMGpsImu.gps_lng,m_structMGpsImu.gps_lat,now_x,now_y);
|
|
|
|
+ add_x=x*qCos(qDegreesToRadians(head))+y*qSin(qDegreesToRadians(head));
|
|
|
|
+ add_y=x*qSin(qDegreesToRadians(head))-y*qCos(qDegreesToRadians(head));
|
|
|
|
|
|
- x=x*qCos(qDegreesToRadians(head));
|
|
|
|
- y=y*qSin(qDegreesToRadians(head));
|
|
|
|
- aim_x=now_x+x;
|
|
|
|
- aim_y=now_y+y;
|
|
|
|
|
|
+ aim_x=now_x+add_x;
|
|
|
|
+ aim_y=now_y+add_y;
|
|
GaussProjInvCal(aim_x,aim_y,&aim_lon,&aim_lat);
|
|
GaussProjInvCal(aim_x,aim_y,&aim_lon,&aim_lat);
|
|
|
|
|
|
|
|
|
|
@@ -1756,19 +1757,19 @@ void MainWindow::on_ns_cf_clicked()
|
|
{
|
|
{
|
|
double x,y,head;
|
|
double x,y,head;
|
|
x= ui->ns_cf_x->text().toDouble();
|
|
x= ui->ns_cf_x->text().toDouble();
|
|
|
|
+ x=-x;
|
|
y= ui->ns_cf_y->text().toDouble();
|
|
y= ui->ns_cf_y->text().toDouble();
|
|
head=m_structMGpsImu.yaw;
|
|
head=m_structMGpsImu.yaw;
|
|
|
|
|
|
- double now_x,now_y,lat,lon,aim_x,aim_y,aim_lat,aim_lon;
|
|
|
|
|
|
+ double now_x,now_y,lat,lon,aim_x,aim_y,aim_lat,aim_lon,dis,add_x,add_y;
|
|
GaussProjCal(m_structMGpsImu.gps_lng,m_structMGpsImu.gps_lat,now_x,now_y);
|
|
GaussProjCal(m_structMGpsImu.gps_lng,m_structMGpsImu.gps_lat,now_x,now_y);
|
|
|
|
+ add_x=x*qCos(qDegreesToRadians(head))+y*qSin(qDegreesToRadians(head));
|
|
|
|
+ add_y=x*qSin(qDegreesToRadians(head))-y*qCos(qDegreesToRadians(head));
|
|
|
|
|
|
- x=x*qCos(qDegreesToRadians(head));
|
|
|
|
- y=y*qSin(qDegreesToRadians(head));
|
|
|
|
- aim_x=now_x+x;
|
|
|
|
- aim_y=now_y+y;
|
|
|
|
|
|
+ aim_x=now_x+add_x;
|
|
|
|
+ aim_y=now_y+add_y;
|
|
GaussProjInvCal(aim_x,aim_y,&aim_lon,&aim_lat);
|
|
GaussProjInvCal(aim_x,aim_y,&aim_lon,&aim_lat);
|
|
|
|
|
|
-
|
|
|
|
QFile inputFile("./v2xTcpClient.xml"); // 替换成你的XML文件路径
|
|
QFile inputFile("./v2xTcpClient.xml"); // 替换成你的XML文件路径
|
|
|
|
|
|
if (!inputFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
|
if (!inputFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
|