From 05133cd6297166be1f227a2ca353e88a861a59c4 Mon Sep 17 00:00:00 2001 From: renwj Date: Tue, 16 Jul 2024 10:58:10 +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=E5=8F=AA=E6=9C=89=E5=9C=A8=E8=BD=A6=E7=9A=84=E5=89=8D?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E4=BA=8B=E4=BB=B6=E6=89=8D=E8=A7=A6=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../biz/v2x/v2n/pnc/V2NIdentifyDrawer.kt | 32 ++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) 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 291108a3b9..01fe5f583b 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 @@ -325,6 +325,16 @@ internal object V2NIdentifyDrawer: IEventDismissListener { Logger.i(TAG, "isUseGps --> $isUseGps") val eventLocation = arrayOf(event.longitude, event.latitude) val carLocation = if (isUseGps) CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() else CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02() + if (DrivingDirectionUtils.getDegreeOfCar2Poi( + carLocation.longitude, + carLocation.latitude, + eventLocation[0], + eventLocation[1], + carLocation.heading.toInt() + ) >= 90) { + V2XBizTrace.onAck(event, "other-retrograde-vehicle" to "事件在车的后面,不触发", true) + return@Callback true + } AiRoadMarker.aiMakers.getOrPut(newEventId) { val distance = CoordinateUtils.calculateLineDistance(carLocation.longitude, carLocation.latitude, eventLocation[0], eventLocation[1]) if (distance > 150) { @@ -352,11 +362,21 @@ internal object V2NIdentifyDrawer: IEventDismissListener { val data = msg.obj as? V2nCrossSpeed ?: return@Callback true val destX = data.lng val destY = data.lat + val location = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() + if (DrivingDirectionUtils.getDegreeOfCar2Poi( + location.longitude, + location.latitude, + destX, + destY, + location.heading.toInt() + ) >= 90) { + V2XBizTrace.onAck(data, "green-wave-event" to "事件在车的后面,不触发", true) + return@Callback true + } val id = "${destX}_${destY}" AiRoadMarker.aiMakers.getOrPut(id) { AiRoadMarker().apply { try { - val location = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() val current = abs(location.gnssSpeed) * 3.6f.toInt() val min = abs(data.speedStraightMin * 3.6f).toInt() val max = abs(data.speedStraightMax * 3.6f).toInt() @@ -401,6 +421,16 @@ internal object V2NIdentifyDrawer: IEventDismissListener { val eventLocation = arrayOf(data.longitude, data.latitude) val carLocation = if (isUseGps) CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84() else CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02() val distance = CoordinateUtils.calculateLineDistance(carLocation.longitude, carLocation.latitude, eventLocation[0], eventLocation[1]) + if (DrivingDirectionUtils.getDegreeOfCar2Poi( + carLocation.longitude, + carLocation.latitude, + eventLocation[0], + eventLocation[1], + carLocation.heading.toInt() + ) >= 90) { + V2XBizTrace.onAck(data, "people-cross" to "事件在车的后面,不触发", true) + return@Callback true + } AiRoadMarker.aiMakers.getOrPut(data.eventId) { Logger.i(TAG, "people cross -- 2 --") if (distance > 150) {