From eb3dd00b0b7fcda477229d518d250f9c842b790b Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 21 十月 2025 17:45:44 +0800
Subject: [PATCH] 2025.10.21 1. 走航季度报告相关数据计算逻辑调整
---
src/main/kotlin/com/flightfeather/uav/socket/eunm/FactorType.kt | 33 ++++++++++++++++++++++++++++-----
1 files changed, 28 insertions(+), 5 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 9874aa7..e99a0b7 100644
--- a/src/main/kotlin/com/flightfeather/uav/socket/eunm/FactorType.kt
+++ b/src/main/kotlin/com/flightfeather/uav/socket/eunm/FactorType.kt
@@ -27,6 +27,30 @@
HEIGHT(18, "HEIGHT", 3),
NO(19, "NO", 6);
+ fun getTxt(): String {
+ return when (this) {
+ NO2 -> "NO2"
+ CO -> "CO"
+ H2S -> "H2S"
+ SO2 -> "SO2"
+ O3 -> "O3"
+ PM25 -> "PM2.5"
+ PM10 -> "PM10"
+ TEMPERATURE -> "娓╁害"
+ HUMIDITY -> "婀垮害"
+ VOC -> "VOC"
+ NOI -> "NOI"
+ LNG -> "缁忓害"
+ LAT -> "绾害"
+ VELOCITY -> "杞﹂��"
+ TIME -> "鏃堕棿"
+ WIND_SPEED -> "椋庨��"
+ WIND_DIRECTION -> "椋庡悜"
+ HEIGHT -> "楂樺害"
+ NO -> "NO"
+ }
+ }
+
companion object {
/**
@@ -125,9 +149,9 @@
else -> null
}
- fun getVMax(name: String?): Double? {
+ fun getVMin(name: String?): Double? {
getByName(name)?.let {
- return getVMax(it)
+ return getVMin(it)
}
return null
}
@@ -135,7 +159,7 @@
/**
* 涓嶅鐞嗕綆浜庢鍊肩殑鍊�
*/
- fun getVMax(type: FactorType): Double? = when (type) {
+ fun getVMin(type: FactorType): Double = when (type) {
NO -> 1.0
NO2 -> 10.0
CO -> 100.0
@@ -155,7 +179,6 @@
WIND_SPEED -> 2.0
WIND_DIRECTION -> 0.0
HEIGHT -> 0.0
- else -> null
}
/**
@@ -175,7 +198,7 @@
else -> 10.0
}
- fun outputFactor(factorName: String?): Boolean {
+ fun isOutputFactor(factorName: String?): Boolean {
return when (factorName) {
NO2.des,
CO.des,
--
Gitblit v1.9.3