瀏覽代碼

hapo station

lijinliang 4 年之前
父節點
當前提交
047619fc68

+ 15 - 12
src/decition/decition_brain/decition/brain.cpp

@@ -1309,7 +1309,7 @@ void iv::decition::BrainDecition::Updatev2x(const char *pdata, const int ndatasi
             ServiceCarStatus.stationCmd.carMode=v2x_message.carmode();
 
             qDebug("ServiceCarStatus.stationCmd.carMode:",ServiceCarStatus.stationCmd.carMode);
-            givlog->debug("ServiceCarStatus.stationCmd.carMode:",ServiceCarStatus.stationCmd.carMode);
+            givlog->debug("brain_v2x","ServiceCarStatus.stationCmd.carMode:%d",ServiceCarStatus.stationCmd.carMode);
     }
 
     ServiceCarStatus.stationCmd.has_emergencyStop=v2x_message.has_emergencystop();
@@ -1318,7 +1318,7 @@ void iv::decition::BrainDecition::Updatev2x(const char *pdata, const int ndatasi
             ServiceCarStatus.stationCmd.emergencyStop=v2x_message.emergencystop();
 
             qDebug("ServiceCarStatus.stationCmd.emergencyStop:",ServiceCarStatus.stationCmd.emergencyStop);
-            givlog->debug("ServiceCarStatus.stationCmd.emergencyStop:",ServiceCarStatus.stationCmd.emergencyStop);
+            givlog->debug("brain_v2x","ServiceCarStatus.stationCmd.emergencyStop:%d",ServiceCarStatus.stationCmd.emergencyStop);
     }
 
     ServiceCarStatus.stationCmd.has_stationStop=v2x_message.has_stationstop();
@@ -1327,19 +1327,22 @@ void iv::decition::BrainDecition::Updatev2x(const char *pdata, const int ndatasi
             ServiceCarStatus.stationCmd.stationStop=v2x_message.stationstop();
 
             qDebug("ServiceCarStatus.stationCmd.stationStop:",ServiceCarStatus.stationCmd.stationStop);
-            givlog->debug("ServiceCarStatus.stationCmd.stationStop:",ServiceCarStatus.stationCmd.stationStop);
+            givlog->debug("brain_v2x","ServiceCarStatus.stationCmd.stationStop:%d",ServiceCarStatus.stationCmd.stationStop);
     }
-
-    ServiceCarStatus.stationCmd.stationTotalNum=v2x_message.stationid_size();
-    for(int i=0;i++;i<ServiceCarStatus.stationCmd.stationTotalNum)
+    int num=v2x_message.stationid_size();
+    if(num>0)
     {
-        ServiceCarStatus.stationCmd.stationGps[i].gps_lat=v2x_message.stgps(v2x_message.stationid(i)).lat();
-        ServiceCarStatus.stationCmd.stationGps[i].gps_lng=v2x_message.stgps(v2x_message.stationid(i)).lon();
+        ServiceCarStatus.stationCmd.stationTotalNum=num;
+        for(int i=0;i<ServiceCarStatus.stationCmd.stationTotalNum;i++)
+        {
+            ServiceCarStatus.stationCmd.stationGps[i].gps_lat=v2x_message.stgps(i).lat();
+            ServiceCarStatus.stationCmd.stationGps[i].gps_lng=v2x_message.stgps(i).lon();
 
-        qDebug("stationGps: %d, lat: %.7f, lon: %.7f", v2x_message.stationid(i), ServiceCarStatus.stationCmd.stationGps[i].gps_lat, ServiceCarStatus.stationCmd.stationGps[i].gps_lng);
-        givlog->debug("stationGps: %d, lat: %.7f, lon: %.7f",
-                       v2x_message.stationid(i),ServiceCarStatus.stationCmd.stationGps[i].gps_lat,
-                      ServiceCarStatus.stationCmd.stationGps[i].gps_lng);
+            qDebug("stationGps: %d, lat: %.7f, lon: %.7f", v2x_message.stationid(i), ServiceCarStatus.stationCmd.stationGps[i].gps_lat, ServiceCarStatus.stationCmd.stationGps[i].gps_lng);
+            givlog->debug("brain_v2x","stationGps: %d, lat: %.7f, lon: %.7f",
+                           v2x_message.stationid(i),ServiceCarStatus.stationCmd.stationGps[i].gps_lat,
+                          ServiceCarStatus.stationCmd.stationGps[i].gps_lng);
+        }
     }
 
 }

+ 2 - 2
src/decition/decition_brain/decition/decide_gps_00.cpp

@@ -1756,7 +1756,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
             station_nearest=getNearestStation(now_gps_ins,station_received,gpsMapLine);
 
             qDebug("station_nearest: %d, lat: %.7f, lon: %.7f", station_nearest.map_index, station_nearest.station_location.gps_lat, ServiceCarStatus.amilng=station_nearest.station_location.gps_lng);
-            givlog->debug("station_nearest: %d, lat: %.7f, lon: %.7f",
+            givlog->debug("brain_v2x","station_nearest: %d, lat: %.7f, lon: %.7f",
                           station_nearest.map_index, station_nearest.station_location.gps_lat,
                           ServiceCarStatus.amilng=station_nearest.station_location.gps_lng);
             //进入站点模式
@@ -1973,7 +1973,7 @@ iv::Station iv::decition::DecideGps00::getNearestStation(iv::GPS_INS now_gps_ins
           }
     }
 
-    qDebug("station_index:",station_index);
+    qDebug("station_index:%d",station_index);
 
     return station_n[station_index];
 

+ 1 - 1
src/tool/map_lanetoxodr/mainwindow.cpp

@@ -3806,7 +3806,7 @@ std::vector<geobase> MainWindow::CreateUTurnGeo(double startx, double starty, do
     else
     {
         c2.mfLen = (2.0*M_PI - hdgdiff) * R;
-        c2.mR = R;//R*(-1);
+        c2.mR = R*(-1);
         c3.mfLen = c2.mfLen;
         c3.mR = R;
     }