From eb999e84f6f2d14b1440db9e654fd3c2b2d6b473 Mon Sep 17 00:00:00 2001
From: zhaowenyu <35589726@qq.com>
Date: Tue, 16 Dec 2025 16:32:43 +0800
Subject: [PATCH] 2025-12-16 zwy 切换飞行器摄像头时加打印日志,看下参数
---
ard-work/src/main/java/com/ard/work/component/websocket/handler/NoFlyDistanceManager.java | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/ard-work/src/main/java/com/ard/work/component/websocket/handler/NoFlyDistanceManager.java b/ard-work/src/main/java/com/ard/work/component/websocket/handler/NoFlyDistanceManager.java
index 70aced6..6e89232 100644
--- a/ard-work/src/main/java/com/ard/work/component/websocket/handler/NoFlyDistanceManager.java
+++ b/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;
}
}
--
Gitblit v1.9.3