zhaowenyu
2026-02-12 983e76d2aed7d3f123bf39ec9df569023f7ce47f
ard-work/src/main/java/com/ard/work/component/websocket/handler/NoFlyDistanceManager.java
@@ -54,13 +54,10 @@
            List<Vertex> polygon = zone.getVertices();
            if (polygon == null || polygon.size() < 3) continue;
            double distanceDeg = NoFlyZoneUtils.pointToPolygonDistance(current, polygon);
            double distance = NoFlyZoneUtils.pointToPolygonDistance(current, polygon);
            // ⭐ 转成米
            double distanceMeter = NoFlyZoneUtils.degDistanceToMeter(distanceDeg, current.y);
            if (distanceMeter < minDistance) {
                minDistance = distanceMeter;
            if (distance < minDistance) {
                minDistance = distance;
                nearestZone = zone;
            }
        }