Browse Source

add hapo station park debug log

zhangjia 4 years ago
parent
commit
8596767b63
1 changed files with 9 additions and 12 deletions
  1. 9 12
      src/decition/decition_brain/decition/decide_gps_00.cpp

+ 9 - 12
src/decition/decition_brain/decition/decide_gps_00.cpp

@@ -1758,7 +1758,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
             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("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);
+                          station_nearest.station_location.gps_lng);
             //进入站点模式
             if((ServiceCarStatus.stationCmd.stationStop==0x00))
             {
@@ -1815,20 +1815,11 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
 
         aim_gps_ins.gps_lat=ServiceCarStatus.amilat;
         aim_gps_ins.gps_lng=ServiceCarStatus.amilng;
-        //   gps2xy(ServiceCarStatus.amilat, ServiceCarStatus.amilng, &aim_gps_ins.gps_x, &aim_gps_ins.gps_y);
-        GaussProjCal( aim_gps_ins.gps_lng, aim_gps_ins.gps_lat,  &aim_gps_ins.gps_x, &aim_gps_ins.gps_y);
-        std::cout<<"lng"<<ServiceCarStatus.amilng<<std::endl;
-        qDebug("lat:%f", aim_gps_ins.gps_lat);
-        qDebug("lon:%f", aim_gps_ins.gps_lng);
 
-        std::cout<<"lat"<<ServiceCarStatus.amilat<<std::endl;
+        GaussProjCal( aim_gps_ins.gps_lng, aim_gps_ins.gps_lat,  &aim_gps_ins.gps_x, &aim_gps_ins.gps_y);
         double dis = GetDistance(aim_gps_ins, now_gps_ins);
         Point2D pt = Coordinate_Transfer((aim_gps_ins).gps_x, (aim_gps_ins).gps_y, now_gps_ins);
 
-        std::cout << "\n呼车dis距离:%f\n" << dis << std::endl;
-        std::cout << "\n呼车Y距离:%f\n" << pt.y << std::endl;
-
-        //         if (dis<20 && pt.y<8&& realspeed<0.1)
         if (dis<20 && pt.y<5 && abs(pt.x)<3)
         {
             dSpeed = 0;
@@ -1853,6 +1844,12 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
         {
             dSpeed = min(20.0, dSpeed);
         }
+
+        //站点停车log
+        givlog->debug("brain_v2x","aim_gps_ins.gps_lat: %.7f, aim_gps_ins.gps_lng: %.7f, dis: %.2f, dSpeed: %.1f",
+                      aim_gps_ins.gps_lat, aim_gps_ins.gps_lng,
+                      dis,dSpeed);
+
     }
 
 
@@ -1915,7 +1912,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
 
     if(ServiceCarStatus.stationCmd.mode_manual_drive==true)
     {
-        gps_decition->driveMode=0;
+        gps_decition->mode=0;       //云平台控制切手动驾驶
     }