From da47b796dcc6701c839b2409a7d7ebd33c472024 Mon Sep 17 00:00:00 2001 From: hmpc <hmpc> Date: 星期四, 09 一月 2025 13:47:49 +0800 Subject: [PATCH] * --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java index 56c6089..9eb97ab 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -60,6 +60,26 @@ /** * 绔欑偣浠诲姟妫�娴� 鏇存柊灏忚溅浣嶇疆淇℃伅 */ + public synchronized void updateStePositionNearby1() { + for (RgvSlave rgvSlave:slaveProperties.getRgv()) { + RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId()); + RgvProtocol rgvProtocol = rgvThread.getRgvProtocol(); + if (rgvProtocol == null) { + continue; + } + try{ + double finalVelocity = 0.0; // 鏈�缁堥�熷害 (m/s) + double distance = (Math.pow(finalVelocity, 2) - Math.pow(rgvProtocol.instantaneousSpeed/60, 2)) / (2 * acceleration); + BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("dev_no", 111)); + if (distance*proportion > ((SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPosition.getPlcPosition(),rgvProtocol.getRgvPos(),perimeter) + (rgvProtocol.instantaneousSpeed/60)*proportion*0.1))){ +// continue ; + } + } catch (Exception e){ + + } + } + } + public synchronized void updateStePositionNearby() { try{ List<WrkMast> wrkMasts = wrkMastService.selectList(new EntityWrapper<WrkMast>().eq("wrk_sts", 1L)); @@ -269,7 +289,7 @@ double finalVelocity = 0.0; // 鏈�缁堥�熷害 (m/s) double distance = (Math.pow(finalVelocity, 2) - Math.pow(rgvProtocol.instantaneousSpeed/60, 2)) / (2 * acceleration); BasDevpPosition basDevpPosition = basDevpPositionService.selectOne(new EntityWrapper<BasDevpPosition>().eq("dev_no", wrkMast.getSourceStaNo())); - if (distance*proportion > ((SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPosition.getPlcPosition(),rgvProtocol.getRgvPos(),perimeter) + (rgvProtocol.instantaneousSpeed/60)*10000*0.5))){ + if (distance*proportion > ((SortTheExecutionOfTheCarUtil.LatelyAndLessThan(basDevpPosition.getPlcPosition(),rgvProtocol.getRgvPos(),perimeter) + (rgvProtocol.instantaneousSpeed/60)*proportion*0.2))){ continue ; } } -- Gitblit v1.9.1