修改大铁列车提速后停不准的问题

This commit is contained in:
joylink_zhangsai 2023-02-08 15:10:54 +08:00
parent b13b2e6cbb
commit a33c94a477
2 changed files with 2 additions and 9 deletions

View File

@ -292,8 +292,8 @@ public class SpeedCurve {
if (needLimitSpeed != null && needLimitSpeed * 0.9f < limitSpeed) { //新的限速更小 if (needLimitSpeed != null && needLimitSpeed * 0.9f < limitSpeed) { //新的限速更小
endPosition = new SectionPosition(base, logic.getEndOffsetByDirection(!right)); //限速起始点 endPosition = new SectionPosition(base, logic.getEndOffsetByDirection(!right)); //限速起始点
distance = CalculateService.calculateDistance(headPosition, endPosition, right, false); distance = CalculateService.calculateDistance(headPosition, endPosition, right, false);
if (distance != null && (distance > 500 || distance > totalLen)) //限速点在车头前方限速点距车头不超过500m过早考虑限速没有意义 // if (distance != null && (distance > 500 || distance > totalLen)) //限速点在车头前方限速点距车头不超过500m过早考虑限速没有意义
break; // break; 由于大铁列车车速快很多接近到500m才考虑限速就来不及了故删除此逻辑
if (distance != null && distance > 0) { if (distance != null && distance > 0) {
//取最靠下的速度曲线 //取最靠下的速度曲线
SpeedCurve limitSpeedCurve = buildTargetSpeedCurve(distance, v0, needLimitSpeed * 0.9f, limitSpeed); //到达新限速点的速度曲线 SpeedCurve limitSpeedCurve = buildTargetSpeedCurve(distance, v0, needLimitSpeed * 0.9f, limitSpeed); //到达新限速点的速度曲线

View File

@ -177,13 +177,6 @@ public class SimulationRobotService {
} else if (train.isRobotNeedRun() && (train.isRMMode() || train.isNRMMode())) { //CM应当根据推荐速度驾驶待实现 } else if (train.isRobotNeedRun() && (train.isRMMode() || train.isNRMMode())) { //CM应当根据推荐速度驾驶待实现
newRobotDrive(simulation, driver, train); newRobotDrive(simulation, driver, train);
} }
// //机器人驾驶
// if (driver.getCommand() != null || train.getRobotTargetPosition() != null) { //如果有和驾驶行为不冲突的指令这里需要做修改
// robotDriveByCommand(simulation, driver, train);
// } else if (train.isRobotDriveForward()) {
// //地铁的自动驾驶暂时也用大铁的逻辑因为地铁线路没有行车日志所以效果等同于只看信号
// railRobotDrive(simulation, train);
// }
} }
} }