From 53857f42f777e2b9753b8f00cce1a60ce3dcb8fd Mon Sep 17 00:00:00 2001
From: Riku <risaku@163.com>
Date: 星期三, 15 十月 2025 22:42:29 +0800
Subject: [PATCH] 2025.10.15 修改高德地图地理逆编码结果,让地理位置信息更加详细
---
src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/exceptiontype/ExceptionValueMutation.kt | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/exceptiontype/ExceptionValueMutation.kt b/src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/exceptiontype/ExceptionValueMutation.kt
index 0a9e73c..7b09f49 100644
--- a/src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/exceptiontype/ExceptionValueMutation.kt
+++ b/src/main/kotlin/com/flightfeather/uav/biz/dataanalysis/exceptiontype/ExceptionValueMutation.kt
@@ -1,7 +1,8 @@
package com.flightfeather.uav.biz.dataanalysis.exceptiontype
-import com.flightfeather.uav.biz.dataanalysis.BaseExceptionContinuous
import com.flightfeather.uav.biz.dataanalysis.model.DataAnalysisConfig
+import com.flightfeather.uav.biz.dataanalysis.model.ExceptionResult
+import com.flightfeather.uav.biz.dataanalysis.model.ExceptionTag
import com.flightfeather.uav.biz.dataanalysis.model.ExceptionType
import com.flightfeather.uav.domain.entity.BaseRealTimeData
import com.flightfeather.uav.socket.eunm.FactorType
@@ -10,7 +11,7 @@
/**
* 閲忕骇绐佸彉寮傚父鍒嗘瀽
*/
-class ExceptionValueMutation(config: DataAnalysisConfig) : BaseExceptionContinuous(config) {
+class ExceptionValueMutation(config: DataAnalysisConfig) : ExceptionContinuous(config) {
/**
* 鏈紓甯哥殑杩炵画鍙戠敓娆℃暟浼氭牴鎹紓甯哥殑绋嬪害鍙樺寲
@@ -19,6 +20,8 @@
private var special = false
override fun getExceptionType(): ExceptionType = ExceptionType.TYPE4
+
+ override var judgeMethod: JudgeMethod = JudgeMethod.M2
override fun judgeException(p: BaseRealTimeData?, n: BaseRealTimeData): MutableMap<FactorType, Boolean> {
val res = mutableMapOf<FactorType, Boolean>()
@@ -34,28 +37,25 @@
val b2 = r >= config.mutationRate
if (b1) special = true
res[f] = (b1 || b2)
+// if (res[f] == true) println("p: $pValue --- n: $nValue --- r: $r")
}
-// repeat(config.factorCount) { i->
-// if (p?.getByFactorIndex(i) == null || n.getByFactorIndex(i) == null) {
-// res.add(false)
-// return@repeat
-// }
-// val pValue = p.getByFactorIndex(i)!!
-// val nValue = n.getByFactorIndex(i)!!
-// val r = abs((pValue - nValue) / pValue)
-// val b1 = r >= (2 * config.mutationRate)
-// val b2 = r >= config.mutationRate
-// if (b1) special = true
-// res.add(b1 || b2)
-// }
return res
}
- override fun judgeDuration(sIndex: Int, eIndex: Int): Boolean {
+ override fun judgeExceptionCount(tag: ExceptionTag, factorType: FactorType?): Boolean {
+ // 棣栦釜鏁版嵁娌℃湁鍓嶄竴涓暟鎹弬鐓э紝涓嶇畻寮傚父鍊硷紝鏈�鍚庝竴涓暟鎹槸鍒ゆ柇缁撴潫鐨勬甯稿�硷紝鍥犳寮傚父鏁版嵁涓暟鐨勮绠椾笅鏍囦负sIndex鍜宔Index
+ val sIndex = tag.sIndex
+ val eIndex = tag.eIndex - 1
+
val b1 = special && (eIndex - sIndex) >= (config.mutationNum / 2)
val b2 = (eIndex - sIndex) >= config.mutationNum
special = false
+// println("sIndex: $sIndex --- eIndex: $eIndex --- special: $special")
return b1 || b2
}
+
+ override fun onNewResult(result: List<ExceptionResult>) {
+ TODO("Not yet implemented")
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3