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) {