|
@@ -1682,14 +1682,20 @@ 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;
|
|
|
|
|
|
+// x=-x;
|
|
y= ui->ea_cf_y->text().toDouble();
|
|
y= ui->ea_cf_y->text().toDouble();
|
|
head=m_structMGpsImu.yaw;
|
|
head=m_structMGpsImu.yaw;
|
|
-
|
|
|
|
|
|
+ if (head>90)
|
|
|
|
+ {
|
|
|
|
+ head=360-(head-90);
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ head=90-head;
|
|
|
|
+ }
|
|
double now_x,now_y,lat,lon,aim_x,aim_y,aim_lat,aim_lon,dis,add_x,add_y;
|
|
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));
|
|
|
|
|
|
+ add_x=y*qCos(qDegreesToRadians(head))+x*qSin(qDegreesToRadians(head));
|
|
|
|
+ add_y=y*qSin(qDegreesToRadians(head))-x*qCos(qDegreesToRadians(head));
|
|
|
|
|
|
aim_x=now_x+add_x;
|
|
aim_x=now_x+add_x;
|
|
aim_y=now_y+add_y;
|
|
aim_y=now_y+add_y;
|
|
@@ -1760,16 +1766,21 @@ void MainWindow::on_ns_cf_clicked()
|
|
x=-x;
|
|
x=-x;
|
|
y= ui->ns_cf_y->text().toDouble();
|
|
y= ui->ns_cf_y->text().toDouble();
|
|
head=m_structMGpsImu.yaw;
|
|
head=m_structMGpsImu.yaw;
|
|
-
|
|
|
|
|
|
+ if (head>90)
|
|
|
|
+ {
|
|
|
|
+ head=360-(head-90);
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ head=90-head;
|
|
|
|
+ }
|
|
double now_x,now_y,lat,lon,aim_x,aim_y,aim_lat,aim_lon,dis,add_x,add_y;
|
|
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));
|
|
|
|
|
|
+ add_x=y*qCos(qDegreesToRadians(head))+x*qSin(qDegreesToRadians(head));
|
|
|
|
+ add_y=y*qSin(qDegreesToRadians(head))-x*qCos(qDegreesToRadians(head));
|
|
|
|
|
|
aim_x=now_x+add_x;
|
|
aim_x=now_x+add_x;
|
|
aim_y=now_y+add_y;
|
|
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)) {
|