Browse Source

add speed limit

zhangjia 4 years ago
parent
commit
5c0ba2366a

+ 1 - 1
src/decition/common/common/gps_type.h

@@ -44,7 +44,7 @@ namespace iv {
 
         int speed_mode = 0;
         int mode2 = 0;
-        double speed = 3.5;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
+        double speed = -1;			//速度  若导航点则为导航预设速度  若为当前点则为当前车速
 
         int roadMode;
         int runMode;

+ 7 - 0
src/decition/decition_brain/decition/decide_gps_00.cpp

@@ -1304,6 +1304,13 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
         dSpeed = min(25.0,dSpeed);
 
     }
+
+    if((gpsMapLine[PathPoint]->speed)>0.001)
+    {
+        dSpeed = min((gpsMapLine[PathPoint]->speed*3.6),dSpeed);
+    }
+
+
     dSecSpeed = dSpeed / 3.6;