diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt index f9a38cd5e1..ecbfc30d95 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt @@ -81,7 +81,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener { Log.d("V2NIdentifyDrawer", "---callback -- drawShiGu --- 1 ---") } val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() - var filtered = events.filterIsInstance().filter { itx -> + val filtered = events.filterIsInstance().filter { itx -> DrivingDirectionUtils.getDegreeOfCar2Poi( car.longitude, car.latitude, @@ -104,15 +104,6 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } else { Log.d("V2NIdentifyDrawer", "---callback -- drawShiGu --- 2 ---") } - val data = filtered - filtered = filtered.filter { itx -> - val trackedSourceList = itx.trackedSourceList - trackedSourceList.isNotEmpty() && trackedSourceList.find { it.source != 1 } != null - } - if (filtered.isEmpty()) { - V2XBizTrace.onAck(data, mapOf("shiGong-shiGu-filter-2" to "数据来源不对"), true) - return@Callback true - } filtered.forEach { itx -> val id = itx.v2XUuid.ifEmpty { itx.uuid.toString() } V2XBizTrace.onAck(itx, "filtered -> ${itx.type}") @@ -484,16 +475,26 @@ internal object V2NIdentifyDrawer: IEventDismissListener { override fun onAutopilotIdentifyDataUpdate(trafficData: List?) { super.onAutopilotIdentifyDataUpdate(trafficData) - val shiGong = trafficData?.filter { it.type == 501 || it.type == 502 } + //source: 1 -> 感知数据; 2 -> 融合数据 + var hit = false + val shiGong = trafficData?.filter { itx -> (itx.type == 501 || itx.type == 502) && itx.trackedSourceList.find { it.source != 1 } != null } if (!shiGong.isNullOrEmpty()) { + hit = true drawShiGong(shiGong) } - val shiGu = trafficData?.filter { it.type == 13 } + val shiGu = trafficData?.filter { itx -> itx.type == 13 && itx.trackedSourceList.find { it.source != 1 } != null } if (!shiGu.isNullOrEmpty()) { + hit = true drawShiGu(shiGu) } + + if (!hit && trafficData?.find { it.type == 501 || it.type == 502 || it.type == 13 } != null) { + V2XBizTrace.onAck(trafficData, "感知类型-V2N", false) + } } + + override fun onAutopilotV2nCongestionEvent(header: Header, rsi: RSI_PB) { super.onAutopilotV2nCongestionEvent(header, rsi) V2XBizTrace.onAck("onAutopilotV2nCongestionEvent", rsi) @@ -508,6 +509,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } private fun drawShiGong(events: List) { + V2XBizTrace.onAck(events,"onV2NShiGong", false) Log.d("V2NIdentifyDrawer", "---drawShiGong --- 1 ---:${events.size}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]") if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { Log.d("V2NIdentifyDrawer", "---drawShiGong --- 2 ---") @@ -517,6 +519,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } private fun drawShiGu(events: List) { + V2XBizTrace.onAck(events,"onV2NShiGu", false) Log.d("V2NIdentifyDrawer", "---drawShiGu --- 1 ---:${events.size}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]") if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { handler.removeMessages(MSG_WHAT_DRAW_SHIGU) @@ -525,6 +528,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } private fun drawYongDu(events: List) { + V2XBizTrace.onAck(events,"onV2NYongDu", false) Log.d("V2NIdentifyDrawer", "---drawYongDu --- 1 ---:${events.size}, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]") if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) { handler.removeMessages(MSG_WHAT_DRAW_YONGDU)