|
@@ -261,11 +261,11 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
}
|
|
}
|
|
|
|
|
|
if(front_car_id>0){
|
|
if(front_car_id>0){
|
|
- if(front_car.front_car_dis>30){
|
|
|
|
|
|
+ if(front_car.front_car_dis>35){
|
|
front_car_decide_avoid=true;
|
|
front_car_decide_avoid=true;
|
|
- }else if((front_car.front_car_dis<=30)&&(front_car.avoidX==0)){
|
|
|
|
|
|
+ }else if((front_car.front_car_dis<=35)&&(front_car.avoidX==0)){
|
|
front_car_decide_avoid=false;
|
|
front_car_decide_avoid=false;
|
|
- }else if((front_car.front_car_dis<=30)&&(front_car.avoidX!=0)){
|
|
|
|
|
|
+ }else if((front_car.front_car_dis<=35)&&(front_car.avoidX!=0)){
|
|
front_car_decide_avoid=true;
|
|
front_car_decide_avoid=true;
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -1514,9 +1514,11 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
}
|
|
}
|
|
#ifdef AVOID_NEW
|
|
#ifdef AVOID_NEW
|
|
- if((vehState==avoiding)||(vehState==backOri)||(avoidXNew!=0)||(vehState==preAvoid))
|
|
|
|
|
|
+ if((vehState==avoiding)||(vehState==preAvoid))
|
|
{
|
|
{
|
|
dSpeed = min(8.0,dSpeed);
|
|
dSpeed = min(8.0,dSpeed);
|
|
|
|
+ }else if((vehState==backOri)||(avoidXNew!=0)){
|
|
|
|
+ dSpeed = min(12.0,dSpeed);
|
|
}
|
|
}
|
|
#else
|
|
#else
|
|
if((vehState==avoiding)||(vehState==backOri)||(roadNow != roadOri)||(vehState==preAvoid))
|
|
if((vehState==avoiding)||(vehState==backOri)||(roadNow != roadOri)||(vehState==preAvoid))
|
|
@@ -1535,9 +1537,17 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
}
|
|
}
|
|
|
|
|
|
if(front_car_id>0){
|
|
if(front_car_id>0){
|
|
- if((front_car.vehState!=0)&&(front_car.front_car_dis<30)){
|
|
|
|
- dSpeed=min(dSpeed,front_car.front_car_ins.speed);
|
|
|
|
|
|
+ static bool brake_state=false;
|
|
|
|
+ if(((front_car.vehState!=0)||(front_car.avoidX!=0))&&(front_car.front_car_dis<15)){
|
|
|
|
+ brake_state=true;
|
|
}
|
|
}
|
|
|
|
+ if(brake_state==true){
|
|
|
|
+ dSpeed=min(dSpeed,ServiceCarStatus.mroadmode_vel.mfmode18);
|
|
|
|
+ }
|
|
|
|
+ if(((front_car.vehState==0)&&(front_car.avoidX==0))||(front_car.front_car_dis>25)){
|
|
|
|
+ brake_state=false;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
dSpeed = limitSpeed(controlAng, dSpeed);
|
|
dSpeed = limitSpeed(controlAng, dSpeed);
|
|
@@ -1813,13 +1823,13 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
}*/
|
|
}*/
|
|
|
|
|
|
road_permit_avoid=false;
|
|
road_permit_avoid=false;
|
|
- if(PathPoint+600<gpsMapLine.size()){
|
|
|
|
|
|
+ if(PathPoint+400<gpsMapLine.size()){
|
|
int road_permit_sum=0;
|
|
int road_permit_sum=0;
|
|
- for(int k=PathPoint;k<PathPoint+600;k++){
|
|
|
|
|
|
+ for(int k=PathPoint;k<PathPoint+400;k++){
|
|
if((gpsMapLine[k]->mbnoavoid==false)&&(gpsMapLine[k]->roadSum>1))
|
|
if((gpsMapLine[k]->mbnoavoid==false)&&(gpsMapLine[k]->roadSum>1))
|
|
road_permit_sum++;
|
|
road_permit_sum++;
|
|
}
|
|
}
|
|
- if(road_permit_sum>=600)
|
|
|
|
|
|
+ if(road_permit_sum>=400)
|
|
road_permit_avoid=true;
|
|
road_permit_avoid=true;
|
|
}
|
|
}
|
|
|
|
|