فهرست منبع

final stop logic for shenlan,not test

chenxiaowei 2 سال پیش
والد
کامیت
b8735aaa6d
1فایلهای تغییر یافته به همراه17 افزوده شده و 1 حذف شده
  1. 17 1
      src/decition/decition_brain_sf_changan_shenlan/decition/decide_gps_00.cpp

+ 17 - 1
src/decition/decition_brain_sf_changan_shenlan/decition/decide_gps_00.cpp

@@ -969,6 +969,8 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
             static int BrakePoint=-1;
             static bool final_brake=false;
             static double distance_to_end=1000;
+            static bool enterTofinal=false;  //20230417,shenlan
+            static double enterTofinal_speed=200;
             if(PathPoint+forecast_final_point>gpsMapLine.size())
             {
                 distance_to_end=computeDistToEnd(gpsMapLine,PathPoint);
@@ -993,6 +995,8 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
                 final_brake_lock=false;
                 brake_mode=false;
                 BrakePoint=-1;
+                enterTofinal=false;  //20230417,shenlan
+                enterTofinal_speed=200;
             }
             if(final_brake==true)
             {
@@ -1002,7 +1006,19 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
                 }
                 else
                 {
-                    dSpeed=min(dSpeed, 3.0);
+                    if(enterTofinal==false)  //20230417,shenlan)
+                    {
+                        enterTofinal_speed=realspeed-0.5;
+                        enterTofinal=true;
+                    }
+                    if(ServiceCarStatus.msysparam.mvehtype=="shenlan")
+                    {
+                       dSpeed=min(enterTofinal_speed, 3.0);
+                    }
+                    else
+                    {
+                       dSpeed=min(dSpeed, 3.0);
+                    }
                     final_brake_lock=true;
                     brake_mode=true;
                     if(distance_to_end<0.8)