From 5b0d58c3f7f35f61c0a0437bac3ff708db57fe61 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 18 七月 2024 17:34:16 +0800
Subject: [PATCH] 1. 修正实时走航数据平滑处理算法,PM2.5、PM10、VOC采用新的修正算法

---
 src/main/kotlin/com/flightfeather/uav/socket/eunm/FactorType.kt |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/socket/eunm/FactorType.kt b/src/main/kotlin/com/flightfeather/uav/socket/eunm/FactorType.kt
index 0c934b4..5ae4e9f 100644
--- a/src/main/kotlin/com/flightfeather/uav/socket/eunm/FactorType.kt
+++ b/src/main/kotlin/com/flightfeather/uav/socket/eunm/FactorType.kt
@@ -152,6 +152,20 @@
             else -> null
         }
 
+        fun getMultiplier(name: String?): Double {
+            getByName(name)?.let {
+                return getMultiplier(it)
+            }
+            return 10.0
+        }
+
+        fun getMultiplier(type: FactorType): Double = when (type) {
+            PM25 -> 20.0
+            PM10 -> 20.0
+            VOC -> 10.0
+            else -> 10.0
+        }
+
         fun outputFactor(factorName: String?): Boolean {
             return when (factorName) {
                 NO2.des,

--
Gitblit v1.9.3