*
hmpc
2025-01-14 bea9ce3e44313734fa264cc9c69d1313d6162006
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -267,10 +267,20 @@
                            && rgvProtocol.getTaskNo1() == 0
                            && rgvProtocol.getAlarm() == 0) {
                        if (rgvProtocol.getStatusType() == RgvStatusType.ROAM) {
                            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) * proportion * rgvDate))) {
//                            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) * proportion * rgvDate))) {
//                                continue;
//                            }
                            List<BasDevpPosition> basDevpPositions = basDevpPositionService.selectList(new EntityWrapper<BasDevpPosition>().orderBy("plc_position", true));
                            if (basDevpPositions.isEmpty()) {
                                log.error("获取所有站点信息异常,RGV任务下发失败,请联系管理员!!!");
                                break runRgv;
                            }
                            List<Integer> devpList = SortTheExecutionOfTheCarUtil.BasDevpPositionExtractSites(basDevpPositions);
                            if (!SortTheExecutionOfTheCarUtil.calculateShortestDistanceDirection(devpList,rgvProtocol.getEndStaM(),wrkMast.getSourceStaNo())){
                                continue;
                            }
                        }