From f486693e733b7939142a559310e12fb3459a8a56 Mon Sep 17 00:00:00 2001 From: renwj Date: Tue, 16 Jul 2024 18:05:35 +0800 Subject: [PATCH] =?UTF-8?q?[6.5.0][=E9=81=93=E8=B7=AF=E4=BA=8B=E4=BB=B6]?= =?UTF-8?q?=20=E9=81=93=E8=B7=AF=E6=96=BD=E5=B7=A5=E5=92=8C=E9=81=93?= =?UTF-8?q?=E8=B7=AF=E4=BA=8B=E4=BB=B6=E6=B7=BB=E5=8A=A0=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?source=E5=AD=97=E6=AE=B5=E5=8C=BA=E5=88=86=E6=9D=A5=E6=BA=90(nd?= =?UTF-8?q?e=E6=88=96=E6=84=9F=E7=9F=A5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 117 ++---------------- .../v2n/scenario/scene/airoad/AiRoadMarker.kt | 2 +- 2 files changed, 12 insertions(+), 107 deletions(-) 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 01fe5f583b..f9a38cd5e1 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() - val filtered = events.filterIsInstance().filter { itx -> + var filtered = events.filterIsInstance().filter { itx -> DrivingDirectionUtils.getDegreeOfCar2Poi( car.longitude, car.latitude, @@ -104,8 +104,17 @@ 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.uuid.toString() + val id = itx.v2XUuid.ifEmpty { itx.uuid.toString() } V2XBizTrace.onAck(itx, "filtered -> ${itx.type}") Log.d("V2NIdentifyDrawer", "---callback --- id: $id ---") AiRoadMarker.aiMakers.getOrPut(id) { @@ -197,110 +206,6 @@ internal object V2NIdentifyDrawer: IEventDismissListener { } } else if (msg.what == MSG_WHAT_DRAW_YONGDU) { Log.d("V2NIdentifyDrawer", "---callback -- drawYongDu --- 1 ---") -/* val events = msg.obj as? List<*> - if (events == null || events.isEmpty()) { - Log.d("V2NIdentifyDrawer", "---callback -- drawYongDu --- 1 filter is empty ---") - V2XBizTrace.onAck(TAG, mapOf("yongDu" to ""), true) - return@Callback true - } - val car = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() - val filtered = events.filterIsInstance().filter { itx -> - val eventLon = - itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } - ?: 0.0 - val eventLat = - itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 } - ?: 0.0 - DrivingDirectionUtils.getDegreeOfCar2Poi( - car.longitude, - car.latitude, - eventLon, - eventLat, - car.heading.toInt() - ) < 90 && CoordinateUtils.calculateLineDistance(car.longitude, car.latitude, eventLon, eventLat) <= 300 - } - if (filtered.isEmpty()) { - Log.d("V2NIdentifyDrawer", "---callback -- drawYongDu --- 2 filter is empty ---") - V2XBizTrace.onAck(TAG, mapOf("yongDu-filter" to ""), true) - return@Callback true - } - Log.d("V2NIdentifyDrawer", "---callback -- drawYongDu --- 2 ---") - filtered.forEach { itx -> - val id = itx.rteId.toString() - val lon = itx.eventPos?.offsetLL?.positionLatLon?.lon?.let { it * 1.0 / 10_000_000 } - ?: 0.0 - val lat = itx.eventPos?.offsetLL?.positionLatLon?.lat?.let { it * 1.0 / 10_000_000 } - ?: 0.0 - Log.d("V2NIdentifyDrawer", "---callback -- id: $id---") - AiRoadMarker.aiMakers.getOrPut(id) { - AiRoadMarker().apply { - val poiType = getPoiType(itx.eventType).poiType - marker(Marker(id, poiType, lon, lat, car.heading, null, null, - V2XRoadEventEntity().also { e -> - e.poiType = poiType - e.location = MarkerLocation().also { l -> - val p = CoordinateTransform.WGS84ToGCJ02(lon, lat) - l.lon = p[0] - l.lat = p[1] - l.angle = car.heading - } - e.noveltyInfo = MarkerExploreWay().also { - it.poiType = poiType - it.location = e.location - it.polygon = emptyList() - } - }), true, isDrawRoadLine(poiType) - ) - - val distance = CoordinateUtils.calculateLineDistance( - lon, - lat, - car.longitude, - car.latitude - ) - val alertContent = getAlertContent(poiType, distance.toDouble()) - val ttsContent = getTtsContent(poiType, distance.toDouble()) - V2XBizTrace.onAck(TAG, "绘制poi事件:$poiType") - saveMsgBox( - MsgBoxBean( - V2X, - V2XMsg( - poiType, - alertContent, - ttsContent, - CommunicationType.V2N.name - ) - ) - ) - CallerHmiManager.warningV2X( - poiType, - alertContent, - ttsContent, - object : IMoGoWarningStatusListener { - override fun onShow() { - super.onShow() - runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.START) } - CallerVisualAngleManager.changeScene(RoadEvent(2, SECONDS)) - } - - override fun onDismiss() { - super.onDismiss() - runCatching { CallerHmiManager.notifyXiaoZhiStatusChanged(V2N(EventTypeEnumNew.getEnumType(poiType)), State.STOP) } - CallerVisualAngleManager.changeScene(Default()) - } - }, - ALERT_WARNING_TOP, - 10000, - false - ) - //消息埋点 - V2XEventAnalyticsManager.triggerV2XEvent( - poiType, alertContent, ttsContent, - DataSourceType.AICLOUD, CommunicationType.V2N - ) - } - }.receive() - }*/ } else if (msg.what == MSG_WHAT_DRAW_OTHER_RETROGRADE_VEHICLE) { val event = msg.obj as? MessagePad.Event if (event == null) { diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt index 1d0f038c63..d27373bc91 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/v2n/scenario/scene/airoad/AiRoadMarker.kt @@ -115,7 +115,7 @@ class AiRoadMarker { .longitude(marker.poi_lon) .latitude(marker.poi_lat) if (marker.poiType == EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType) { - builder.anchorColor("#FFE1BA9A") + builder.anchorColor("#D6E1BA9A") } CallerMapUIServiceManager.getOverlayManager()?.showOrUpdatePoint(builder.build())?.let { p -> if (!markerIds.contains(markerId)) {