diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java index a69f89ca8..eca955870 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/SimulationRobotService.java @@ -345,10 +345,15 @@ public class SimulationRobotService { || Objects.equals(vrSignal.getAspect(), signal.getGuideAspect())) { //引导信号 if (!Objects.equals(signal, throughSignal) || !Objects.equals(vrSignal.getAspect(), throughAspect)) { - SectionPosition noPassPosition = CalculateService.calculateNextPositionByStartAndLen( - signalPosition, !right, 2, true); - if (targetPosition == null || noPassPosition.isAheadOf(targetPosition, right)) { - targetPosition = noPassPosition; + SectionPosition tempPosition; + if (section.isFunctionTrack()) { //解决福州一列车从车辆段开出来时,在转换轨停车位置有误,导致无法发车的问题 + tempPosition = new SectionPosition(section, section.getStopPointByDirection(right)); + } else { + tempPosition = CalculateService.calculateNextPositionByStartAndLen( + signalPosition, !right, 2, true); + } + if (targetPosition == null || tempPosition.isAheadOf(targetPosition, right)) { + targetPosition = tempPosition; } } }