| | |
| | | /** |
| | | * 站点任务检测 更新小车位置信息 |
| | | */ |
| | | 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)); |
| | |
| | | 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 ; |
| | | } |
| | | } |