From 19c90b219bd80f82bfcf799a7adfd03fd469c0b7 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期三, 28 五月 2025 17:24:13 +0800 Subject: [PATCH] 1. 新增动态污染溯源新的判定逻辑(待完成) --- src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/RealTimeExceptionAnalysisController.kt | 36 ++++++++++++++++++++++++++---------- 1 files changed, 26 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/RealTimeExceptionAnalysisController.kt b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/RealTimeExceptionAnalysisController.kt index 9fb9090..4670667 100644 --- a/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/RealTimeExceptionAnalysisController.kt +++ b/src/main/kotlin/com/flightfeather/uav/biz/sourcetrace/RealTimeExceptionAnalysisController.kt @@ -2,6 +2,7 @@ import com.flightfeather.uav.biz.FactorFilter import com.flightfeather.uav.biz.dataanalysis.BaseExceptionAnalysis +import com.flightfeather.uav.biz.sourcetrace.exceptiontype.RealTimeExceptionSlideAverage import com.flightfeather.uav.biz.sourcetrace.exceptiontype.RealTimeExceptionValueMutation import com.flightfeather.uav.biz.sourcetrace.model.RealTimeExceptionResult import com.flightfeather.uav.common.utils.GsonUtils @@ -42,7 +43,7 @@ .withMain(FactorType.VOC) .create() ) - initTask(config) + initTask() } constructor(sceneInfoRep: SceneInfoRep) : this(sceneInfoRep, null) @@ -54,11 +55,14 @@ private val taskList = mutableListOf<BaseExceptionAnalysis<RealTimeAnalysisConfig, RealTimeExceptionResult>>() - private fun initTask(config: RealTimeAnalysisConfig) { + fun initTask() { taskList.clear() taskList.apply { add( RealTimeExceptionValueMutation(config) { exceptionCallback(it) }.also { it.init() } + ) + add( + RealTimeExceptionSlideAverage(config){ exceptionCallback(it)}.also { it.init() } ) } @@ -135,9 +139,11 @@ // 鏇存柊涓棿鐐逛俊鎭� ex.midData = avgData.apply { + dataTime = midData.dataTime + createTime = midData.createTime longitude = midData.longitude latitude = midData.latitude - } + }.toDataVo() // 鏇存柊婧簮鑼冨洿鍐呯殑姹℃煋鍦烘櫙淇℃伅 ex.relatedSceneList = result } @@ -160,14 +166,24 @@ val eDeg = windDir + defaultDegOffset val distance = windSpeed * durationMin * 60 - // 宸︿晶锛堥�嗘椂閽堜晶锛夐《鐐� - val p1 = MapUtil.getPointByLen(center, distance, sDeg * PI / 180) - // 椋庡悜鍙嶅悜椤剁偣 - val p2 = MapUtil.getPointByLen(center, distance, windDir * PI / 180) - // 鍙充晶锛堥『鏃堕拡渚э級椤剁偣 - val p3 = MapUtil.getPointByLen(center, distance, eDeg * PI / 180) + val result = mutableListOf(center) + var startDeg = sDeg + while (startDeg < eDeg) { + val p = MapUtil.getPointByLen(center, distance, startDeg * PI / 180) + result.add(p) + startDeg++ + } - return listOf(center, p1, p2, p3) + return result + +// // 宸︿晶锛堥�嗘椂閽堜晶锛夐《鐐� +// val p1 = MapUtil.getPointByLen(center, distance, sDeg * PI / 180) +// // 椋庡悜鍙嶅悜椤剁偣 +// val p2 = MapUtil.getPointByLen(center, distance, windDir * PI / 180) +// // 鍙充晶锛堥『鏃堕拡渚э級椤剁偣 +// val p3 = MapUtil.getPointByLen(center, distance, eDeg * PI / 180) +// +// return listOf(center, p1, p2, p3) } } \ No newline at end of file -- Gitblit v1.9.3