Ver código fonte

change driver_map_xodrload. fix laneoffset.

yuchuli 1 ano atrás
pai
commit
b99d18297e

+ 5 - 2
src/driver/driver_map_xodrload/globalplan.cpp

@@ -2079,6 +2079,8 @@ double getoff(Road * pRoad,int nlane,const double s)
 
     }
 
+    if(nlane<0)foff = foff*(-1);
+
     if(pRoad->GetLaneOffsetCount()>0)
     {
 
@@ -2097,10 +2099,11 @@ double getoff(Road * pRoad,int nlane,const double s)
         double s_off = s - pLO->GetS();
         double off1 = pLO->Geta() + pLO->Getb()*s_off + pLO->Getc() * s_off * s_off
                 +pLO->Getd() * s_off * s_off * s_off;
-        foff = foff - off1;
+        foff = foff + off1;
+
     }
 
-    if(nlane<0)foff = foff*(-1);
+
     return foff;
 }
 

+ 1 - 1
src/driver/driver_ntrip_client/driver_ntrip_client.pro

@@ -11,7 +11,7 @@ CONFIG -= app_bundle
 # deprecated API in order to know how to port your code away from it.
 DEFINES += QT_DEPRECATED_WARNINGS
 
-#DEFINES += DEBUG_NTRIP_MSG
+DEFINES += DEBUG_NTRIP_MSG
 
 # You can also make your code fail to compile if it uses deprecated APIs.
 # In order to do so, uncomment the following line.

+ 1 - 1
src/driver/driver_ntrip_client/ntrip_client.cpp

@@ -200,7 +200,7 @@ void ntrip_client::SendGPGGA()
     {
 #ifdef DEBUG_NTRIP_MSG
         char strSend[1000];
-        snprintf(strSend,1000,"$GPGGA,102342.00,3948.6248006,N,11633.1924828,E,1,13,1.5,46.4085,M,-9.452,M,99,AAAA*72\r\n");
+        snprintf(strSend,1000,"$GPGGA,102342.00,2821.872855,N,11748.559952,E,1,13,1.5,46.4085,M,-9.452,M,99,AAAA*72\r\n");
         socket_->write(strSend,strlen(strSend));
         socket_->flush();
 #endif