feiyu02
2025-10-21 eb3dd00b0b7fcda477229d518d250f9c842b790b
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,