feiyu02
2025-08-28 ddaa44400aa478058ffe9349d59904a130b7ce9c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
package com.flightfeather.uav.biz.sourcetrace.config
 
import com.flightfeather.uav.biz.FactorFilter
import com.flightfeather.uav.biz.dataanalysis.BaseAnalysisConfig
import com.flightfeather.uav.biz.sourcetrace.model.DistanceType
import com.flightfeather.uav.socket.eunm.FactorType
 
/**
 *
 * @date 2025/5/29
 * @author feiyu02
 */
class RTExcWindLevelConfig(factorFilter: FactorFilter): BaseAnalysisConfig(factorFilter) {
 
    inner class WindLevelCondition(
        val windSpeed: Pair<Double, Double>,
        val mutationRate: Pair<Double, Double>,
        val distanceType: DistanceType,
        val countLimit: Int,
    ){
}
    // 是否联网查找对应路段地址信息
    var isSearchAddress = true
 
    // 限定距离内(单位:米)
    var distanceLimit = 3000
    // 限定时间内(单位:分钟)
    var timeLimit = 3
 
    // 溯源扩散偏移角度(单位:度)
    var sourceTraceDegOffset = 120.0
 
    // 定时线索分析时间间隔(单位:分钟)
    var analysisPeriod = 5
    // 定时分析间隔中,立即进行线索分析的最小线索量(单位:个)
    var analysisCount = 4
 
    /****数据突变*****************************************************************************/
    // 0 - 1级风
    var windLevelCondition1 = WindLevelCondition(
        .0 to 1.5,
        0.5 to Double.MAX_VALUE,
        DistanceType.TYPE1,
        1
    )
 
    // 0 - 1级风
    var windLevelCondition1_1 = WindLevelCondition(
        .0 to 1.5,
        0.2 to 0.5,
        DistanceType.TYPE2,
        1
    )
 
    // 2 - 4级风
    var windLevelCondition2 = WindLevelCondition(
        1.6 to 7.9,
        0.2 to Double.MAX_VALUE,
        DistanceType.TYPE3,
        2
//        1
    )
 
    // 5 - 6级风
    var windLevelCondition3 = WindLevelCondition(
        8.0 to 13.8,
        0.1 to Double.MAX_VALUE,
        DistanceType.TYPE4,
        2
    )
 
    /****数据快速上升*****************************************************************************/
    // 在风速处于0 - 1.5 m/s 之间时
    var changeRateUp1 = mutableMapOf(
        // PM2.5在一个监测周期(4秒)上升量级大于等于4μg/m³,连续发生2次
        FactorType.PM25 to WindLevelCondition(
            .0 to 1.5,
            4.0 to Double.MAX_VALUE,
            DistanceType.TYPE1,
//            fixme: 2025.7.24 因为低风速下数据变化次数设置过多,导致遗漏识别
//            3
            2
        ),
        // PM10在一个监测周期(4秒)上升量级大于等于4μg/m³,连续发生2次
        FactorType.PM10 to WindLevelCondition(
            .0 to 1.5,
            4.0 to Double.MAX_VALUE,
            DistanceType.TYPE1,
            2
        ),
        // VOC在一个监测周期(4秒)上升量级大于等于6μg/m³,连续发生1次
        FactorType.VOC to WindLevelCondition(
            .0 to 1.5,
            6.0 to Double.MAX_VALUE,
            DistanceType.TYPE1,
            1
        ),
    )
    // 在风速处于1.6 - 7.9 m/s 之间时
    var changeRateUp2 = mutableMapOf(
        // PM2.5在一个监测周期(4秒)上升量级大于等于4μg/m³,连续发生3次
        FactorType.PM25 to WindLevelCondition(
            1.6 to 7.9,
            4.0 to Double.MAX_VALUE,
            DistanceType.TYPE3,
            2
        ),
        // PM10在一个监测周期(4秒)上升量级大于等于4μg/m³,连续发生3次
        FactorType.PM10 to WindLevelCondition(
            1.6 to 7.9,
            4.0 to Double.MAX_VALUE,
            DistanceType.TYPE3,
            2
        ),
        // VOC在一个监测周期(4秒)上升量级大于等于6μg/m³,连续发生1次
        FactorType.VOC to WindLevelCondition(
            1.6 to 7.9,
            6.0 to Double.MAX_VALUE,
            DistanceType.TYPE3,
            1
        ),
    )
    // 在风速处于8.0 - 13.8 m/s 之间时
    var changeRateUp3 = mutableMapOf(
        // PM2.5在一个监测周期(4秒)上升量级大于等于4μg/m³,连续发生3次
        FactorType.PM25 to WindLevelCondition(
            8.0 to 13.8,
            4.0 to Double.MAX_VALUE,
            DistanceType.TYPE4,
            2
        ),
        // PM10在一个监测周期(4秒)上升量级大于等于4μg/m³,连续发生3次
        FactorType.PM10 to WindLevelCondition(
            8.0 to 13.8,
            4.0 to Double.MAX_VALUE,
            DistanceType.TYPE4,
            2
        ),
        // VOC在一个监测周期(4秒)上升量级大于等于6μg/m³,连续发生1次
        FactorType.VOC to WindLevelCondition(
            8.0 to 13.8,
            6.0 to Double.MAX_VALUE,
            DistanceType.TYPE4,
            1
        ),
    )
 
    /****数据快速下降提醒*****************************************************************************/
    var changeRateWarnDown = mutableMapOf(
        // PM2.5在一个监测周期(4秒)内下降量级大于等于2μg/m³,连续发生3次
        FactorType.PM25 to WindLevelCondition(
            .0 to Double.MAX_VALUE,
            -Double.MAX_VALUE to -2.0,
            DistanceType.TYPE1,
            3
        ),
        // PM10在一个监测周期(4秒)内下降量级大于等于2μg/m³,连续发生3次
        FactorType.PM10 to WindLevelCondition(
            .0 to Double.MAX_VALUE,
            -Double.MAX_VALUE to -2.0,
            DistanceType.TYPE1,
            3
        ),
        // VOC在一个监测周期(4秒)内下降量级大于等于3μg/m³,连续发生3次
        FactorType.VOC to WindLevelCondition(
            .0 to Double.MAX_VALUE,
            -Double.MAX_VALUE to -3.0,
            DistanceType.TYPE1,
            3
        ),
    )
 
    /****数据有上升趋势提醒*****************************************************************************/
    var changeRateWarnUp = mutableMapOf(
        // PM2.5在一个监测周期(4秒)上升量级在2 - 4μg/m³之间,连续发生3次
        FactorType.PM25 to WindLevelCondition(
            .0 to Double.MAX_VALUE,
            2.0 to 4.0,
            DistanceType.TYPE1,
            2
        ),
        // PM10在一个监测周期(4秒)上升量级在2 - 4μg/m³之间,连续发生3次
        FactorType.PM10 to WindLevelCondition(
            .0 to Double.MAX_VALUE,
            2.0 to 4.0,
            DistanceType.TYPE1,
            2
        ),
        // VOC在一个监测周期(4秒)上升量级在3 - 6μg/m³之间,连续发生2次
        FactorType.VOC to WindLevelCondition(
            .0 to Double.MAX_VALUE,
            3.0 to 6.0,
            DistanceType.TYPE1,
            2
        ),
    )
 
    /****滑动平均值异常*****************************************************************************/
    // 求滑动平均值的数据组个数
    var changeTrendGroup = 12
    // 滑动平均值连续
    var changeTrendInterval = 12
    var changeTrendRate = .2
    // 滑动平均值变化率异常连续次数
    var changeTrendTimes = 3
}