| | |
| | | return map.get(RgvPos); |
| | | } |
| | | |
| | | public Integer getRgvPosI2() { |
| | | public Integer getRgvPosI1() { |
| | | // key: 站点号 value: 基准物理位置 |
| | | Map<Integer, Integer> posMap = new HashMap<>(); |
| | | posMap.put(1004, 6534); |
| | |
| | | posMap.put(1024, 219684); |
| | | posMap.put(1028, 246724); |
| | | posMap.put(1031, 288194); |
| | | posMap.put(1035, 314954); |
| | | |
| | | |
| | | |
| | | int tolerance = 200; // 允许误差范围 |
| | | |
| | | for (Map.Entry<Integer, Integer> entry : posMap.entrySet()) { |
| | | int site = entry.getKey(); |
| | | int basePos = entry.getValue(); |
| | | if (Math.abs(RgvPos - basePos) <= tolerance) { |
| | | return site; |
| | | } |
| | | } |
| | | |
| | | return 0; // 没匹配到站点 |
| | | } |
| | | public Integer getRgvPosI2() { |
| | | // key: 站点号 value: 基准物理位置 |
| | | Map<Integer, Integer> posMap = new HashMap<>(); |
| | | posMap.put(2003, 314954); |
| | | posMap.put(2006, 288094); |
| | | posMap.put(2009, 246574); |
| | |
| | | posMap.put(2024, 75174); |
| | | posMap.put(2027, 33748); |
| | | posMap.put(2030, 6449); |
| | | |
| | | |
| | | int tolerance = 200; // 允许误差范围 |
| | | |
| | | for (Map.Entry<Integer, Integer> entry : posMap.entrySet()) { |