From 82682452a1615f5b917de02c7ac7821168e67019 Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Thu, 10 Oct 2024 17:07:17 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]=E5=88=97=E8=BD=A6=E5=9C=A8?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=BD=A8=E4=B8=8A=E6=97=B6=EF=BC=8C=E4=BC=9A?= =?UTF-8?q?=E4=BC=98=E5=85=88=E5=81=9C=E5=9C=A8=E8=BD=A8=E9=81=93=E7=9A=84?= =?UTF-8?q?=E5=81=9C=E8=BD=A6=E7=82=B9=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cbtc/robot/SimulationRobotService.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; } } }