| | |
| | | return Math.sqrt(deltaX * deltaX + deltaY * deltaY); |
| | | } |
| | | |
| | | public DirectionType calcDirectionType(int[] originIdx, int[] oppositeIdx) { |
| | | if (oppositeIdx[0] < originIdx[0] && oppositeIdx[1] == originIdx[1]) { |
| | | return DirectionType.TOP; |
| | | } |
| | | if (oppositeIdx[0] > originIdx[0] && oppositeIdx[1] == originIdx[1]) { |
| | | return DirectionType.BOTTOM; |
| | | } |
| | | if (oppositeIdx[0] == originIdx[0] && oppositeIdx[1] > originIdx[1]) { |
| | | return DirectionType.RIGHT; |
| | | } |
| | | if (oppositeIdx[0] == originIdx[0] && oppositeIdx[1] < originIdx[1]) { |
| | | return DirectionType.LEFT; |
| | | } |
| | | return DirectionType.NONE; |
| | | } |
| | | |
| | | public void lockPath(Integer lev, List<String> pathList, String agvNo) { |
| | | List<int[]> codeMatrixIdxList = mapDataDispatcher.getCodeMatrixIdxList(lev, pathList); |
| | | mapDataDispatcher.modifyDynamicMatrix(lev, codeMatrixIdxList, agvNo); |