From d04e699fcd11aa715439d8ab87827a3984450ccd Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期一, 22 十一月 2021 17:39:13 +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