|
@@ -466,7 +466,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
return gps_decition;
|
|
|
}else
|
|
|
{
|
|
|
- if(trumpet()>3000)
|
|
|
+ if(trumpet()>1000)
|
|
|
{
|
|
|
trumpetFirstCount=true;
|
|
|
vehState=dRever;
|
|
@@ -482,7 +482,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
{
|
|
|
if( vehState!=reverseCar && vehState!=reversing && vehState!=reverseCircle && vehState!=reverseDirect && vehState!=reverseArr )
|
|
|
{
|
|
|
- int bocheEN=Compute00().bocheCompute(now_gps_ins, aim_gps_ins);
|
|
|
+ int bocheEN=Compute00().bocheComputeNew(now_gps_ins, aim_gps_ins);
|
|
|
if(bocheEN==1)
|
|
|
{
|
|
|
ServiceCarStatus.bocheEnable=1;
|
|
@@ -510,7 +510,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- if(trumpet()>3000)
|
|
|
+ if(trumpet()>1000)
|
|
|
{
|
|
|
trumpetFirstCount=true;
|
|
|
vehState=reverseCar;
|
|
@@ -567,8 +567,9 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
iv::Point2D pt = iv::decition::Coordinate_Transfer(now_gps_ins.gps_x,now_gps_ins.gps_y,aim_gps_ins);
|
|
|
iv::Point2D ptnear = iv::decition::Coordinate_Transfer(Compute00().nearTpoint.gps_x,Compute00().nearTpoint.gps_y,aim_gps_ins);
|
|
|
|
|
|
- double fdistonear = fabs(pt.x - ptnear.x);
|
|
|
- if(fdistonear<0.5) //将吉利项目中的停车逻辑移植过来
|
|
|
+ double fdistonear = pt.x - ptnear.x;
|
|
|
+ if(ptnear.x < 0) fdistonear = ptnear.x - pt.x;
|
|
|
+ if(fdistonear<0.1)
|
|
|
// if (dis<2.0)//0.5
|
|
|
{
|
|
|
vehState = reverseCircle;
|
|
@@ -593,7 +594,10 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
{
|
|
|
double dis = GetDistance(now_gps_ins, Compute00().farTpoint);
|
|
|
double angdis =abs(now_gps_ins.ins_heading_angle - aim_gps_ins.ins_heading_angle);
|
|
|
- if((((angdis<5)||(angdis>355)))&&(dis<3.0))
|
|
|
+ iv::Point2D pt = iv::decition::Coordinate_Transfer(now_gps_ins.gps_x,now_gps_ins.gps_y,aim_gps_ins);
|
|
|
+ iv::Point2D ptfar = iv::decition::Coordinate_Transfer(Compute00().farTpoint.gps_x,Compute00().farTpoint.gps_y,aim_gps_ins);
|
|
|
+ double xx = pt.y - ptfar.y;
|
|
|
+ if((((angdis<2)||(angdis>358)))||(xx<(-0.3)))
|
|
|
// if((((angdis<4)||(angdis>356)))&&(dis<2.0))
|
|
|
{
|
|
|
vehState = reverseDirect;
|
|
@@ -602,14 +606,14 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
}
|
|
|
else {
|
|
|
- if (qiedianCount && trumpet()<0)
|
|
|
+ if (qiedianCount && trumpet()<1500)
|
|
|
// if (qiedianCount && trumpet()<1500)
|
|
|
{
|
|
|
|
|
|
// gps_decition->brake = 10;
|
|
|
// gps_decition->torque = 0;
|
|
|
dSpeed=0;
|
|
|
- minDecelerate=min(minDecelerate,-0.5f);
|
|
|
+ minDecelerate=min(minDecelerate,-1.5f);
|
|
|
phaseSpeedDecition(gps_decition, secSpeed, -1, 0, now_gps_ins);
|
|
|
}
|
|
|
else
|
|
@@ -626,7 +630,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
|
|
|
}
|
|
|
|
|
|
- controlAng = Compute00().bocheAngle*16.5;
|
|
|
+ controlAng = Compute00().mfWheelAngle[1];// Compute00().bocheAngle*16.5;
|
|
|
gps_decition->wheel_angle = 0 - controlAng*1.05;
|
|
|
|
|
|
cout<<"farTpointDistance================"<<dis<<endl;
|
|
@@ -640,7 +644,7 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
// double dis = GetDistance(now_gps_ins, aim_gps_ins);
|
|
|
Point2D pt = Coordinate_Transfer(now_gps_ins.gps_x,now_gps_ins.gps_y, aim_gps_ins);
|
|
|
|
|
|
- if ((pt.y)<0.5)
|
|
|
+ if ((pt.y)<0.1)
|
|
|
{
|
|
|
|
|
|
qiedianCount=true;
|
|
@@ -658,13 +662,13 @@ iv::decition::Decition iv::decition::DecideGps00::getDecideFromGPS(GPS_INS now_g
|
|
|
else {
|
|
|
|
|
|
//if (qiedianCount && trumpet()<0)
|
|
|
- if (qiedianCount && trumpet()<1000)
|
|
|
+ if (qiedianCount && trumpet()<1500)
|
|
|
{
|
|
|
|
|
|
// gps_decition->brake = 10;
|
|
|
// gps_decition->torque = 0;
|
|
|
dSpeed=0;
|
|
|
- minDecelerate=min(minDecelerate,-0.5f);
|
|
|
+ minDecelerate=min(minDecelerate,-1.5f);
|
|
|
phaseSpeedDecition(gps_decition, secSpeed, -1, 0, now_gps_ins);
|
|
|
}
|
|
|
else
|