From 2a5571f1b498eea1f4030d1f0faa42899e174aed Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 11 十一月 2021 11:32:46 +0800
Subject: [PATCH] 1. 修复风向均值算法结果为弧度,需要再转换为角度

---
 src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt b/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
index e16d1f2..6b4b939 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
@@ -262,6 +262,7 @@
             val avgU = u / c
             val avgV = v / c
             var a = atan(avgU / avgV)
+            a = Math.toDegrees(a)
             /**
              * avgU>0;avgV>0: 鐪熷疄瑙掑害澶勪簬绗竴璞¢檺锛屼慨姝e�间负+0掳
              * avgU>0;avgV<0: 鐪熷疄瑙掑害澶勪簬绗簩璞¢檺锛屼慨姝e�间负+180掳

--
Gitblit v1.9.3