From e99f1cd836475a059ed6fdcbd4235416ba108dd1 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 03 十二月 2021 17:16:00 +0800
Subject: [PATCH] 1. 新增用电量日分析功能

---
 src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt |    3 ++-
 1 files changed, 2 insertions(+), 1 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..2c6cc71 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/entity/BaseRealTimeData.kt
@@ -110,7 +110,7 @@
     }
 }
 
-fun List<RealTimeDataGrid>.avg(): RealTimeDataGridMin {
+fun List<BaseRealTimeData>.avg(): RealTimeDataGridMin {
     //椋庡悜閲囩敤鍗曚綅鐭㈤噺娉曟眰鍙栧潎鍊�
     var u = .0//涓滆タ鏂逛綅鍒嗛噺鎬诲拰
     var v = .0//鍗楀寳鏂逛綅鍒嗛噺鎬诲拰
@@ -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