[6.5.0][道路事件] 经纬度弄反了,导致绘制不可见
This commit is contained in:
@@ -82,12 +82,6 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
private const val MSG_WHAT_DRAW_GREEN_WAVE = 0x1014 // 绿波通行
|
||||
private const val MSG_WHAT_DRAW_PEOPLE_CROSS = 0x1015 // 行人横穿
|
||||
|
||||
private val builder_people_cross by lazy {
|
||||
Point.Options.Builder(V2XConst.V2X_MARKER_OWNER, MAP_MARKER).isUseGps(true).anchorColor("#D65D5AFF").set3DMode(true).icon3DRes(TrafficTypeEnum.TYPE_TRAFFIC_ID_PEOPLE.traffic3DIconId)
|
||||
}
|
||||
|
||||
private val markers by lazy { ConcurrentHashMap<String, MarkerWrapper>() }
|
||||
|
||||
private val callback = Handler.Callback { msg ->
|
||||
if (msg.what == MSG_WHAT_DRAW_SHIGONE || msg.what == MSG_WHAT_DRAW_SHIGU) {
|
||||
val events = msg.obj as? List<*>
|
||||
@@ -133,8 +127,8 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
val polygon = itx.polygonList.map { Pair.create(it.longitude, it.latitude) }
|
||||
marker(Marker(id,
|
||||
poiType,
|
||||
itx.latitude,
|
||||
itx.longitude,
|
||||
itx.latitude,
|
||||
itx.heading,
|
||||
polygon,
|
||||
null,
|
||||
@@ -254,7 +248,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
AiRoadMarker.aiMakers.getOrPut(id) {
|
||||
AiRoadMarker().apply {
|
||||
val poiType = getPoiType(itx.eventType).poiType
|
||||
marker(Marker(id, poiType, lat, lon, car.heading, null, null,
|
||||
marker(Marker(id, poiType, lon, lat, car.heading, null, null,
|
||||
V2XRoadEventEntity().also { e ->
|
||||
e.poiType = poiType
|
||||
e.location = MarkerLocation().also { l ->
|
||||
@@ -391,9 +385,11 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
}
|
||||
}
|
||||
} else if (msg.what == MSG_WHAT_DRAW_PEOPLE_CROSS) {
|
||||
Logger.i(TAG, "people cross -- 1 --")
|
||||
val data = msg.obj as? MessagePad.Event ?: return@Callback true
|
||||
AiRoadMarker.aiMakers.getOrPut(data.eventId) {
|
||||
val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
Logger.i(TAG, "people cross -- 2 --")
|
||||
val isDriver = AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)
|
||||
val carLocation = CallerChassisLocationWGS84ListenerManager.getChassisLocationWGS84()
|
||||
val distance = CoordinateUtils.calculateLineDistance(carLocation.longitude, carLocation.latitude, data.longitude, data.latitude)
|
||||
if (distance > 150) {
|
||||
@@ -401,6 +397,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
V2XBizTrace.onAck(TAG, mapOf("people cross" to "distance > 150"), true)
|
||||
return@Callback true
|
||||
}
|
||||
Logger.i(TAG, "people cross -- 3 --")
|
||||
val cameraIp = if(TextUtils.isEmpty(data.exts)) ""
|
||||
else (GsonUtils.fromJson(data.exts, Map::class.java)["cameraIp"])?:""
|
||||
// 弹事件框
|
||||
@@ -415,6 +412,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
data.latitude)
|
||||
AiRoadMarker()
|
||||
}.also {
|
||||
Logger.i(TAG, "people cross -- 4 --")
|
||||
it.marker(Marker(data.eventId, EventTypeEnumNew.TYPE_SOCKET_ROAD_PEOPLE_CROSS.poiType, data.longitude, data.latitude, 0.0), drawMarker = true, false, isHighFrequency = true)
|
||||
}.receive()
|
||||
}
|
||||
@@ -487,7 +485,7 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
}
|
||||
}
|
||||
|
||||
private fun computeCrossCountBetween(start: kotlin.Triple<Double, Double, Double>, end: kotlin.Pair<Double, Double>): Int {
|
||||
private fun computeCrossCountBetween(start: Triple<Double, Double, Double>, end: kotlin.Pair<Double, Double>): Int {
|
||||
val points = V2NUtils.generateIntermediatePoints(kotlin.Pair(start.first, start.second), end, 50.0 * 1e-7)
|
||||
V2XBizTrace.onAck(points, "computeCrossCountBetween", true)
|
||||
var crossId = MapDataWrapper.getCrossRoad(start.first, start.second, start.third)?.cross_id_end
|
||||
@@ -607,7 +605,6 @@ internal object V2NIdentifyDrawer: IEventDismissListener {
|
||||
private fun drawPeopleCross(event: MessagePad.Event) {
|
||||
Log.d("V2NIdentifyDrawer", "---drawPeopleCross---: $event, [${FunctionBuildConfig.v2nMainSwitch}, ${FunctionBuildConfig.isNewV2NData}]")
|
||||
if (V2NCarTypeCheck.verifyCarType() && FunctionBuildConfig.v2nMainSwitch && FunctionBuildConfig.isNewV2NData) {
|
||||
handler.removeMessages(MSG_WHAT_DRAW_PEOPLE_CROSS)
|
||||
handler.sendMessage(Message.obtain(handler, MSG_WHAT_DRAW_PEOPLE_CROSS, event))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.eagle.core.data.map.entity.V2XRoadEventEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerRoadV2NEventWindowListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
|
||||
import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.eagle.core.utilcode.util.DrivingDirectionUtils
|
||||
import com.mogo.eagle.function.biz.v2x.V2XBizTrace
|
||||
@@ -100,6 +101,7 @@ class AiRoadMarker {
|
||||
fun marker(marker: Marker, drawMarker: Boolean, drawRoadLine: Boolean = false, isHighFrequency:Boolean = false) {
|
||||
val markerId = marker.id
|
||||
if (isHighFrequency && drawMarker) {
|
||||
Logger.d(TAG, "marker --->poiType: $marker, ${EventTypeEnumNew.getMarker3DRes(marker.poiType)}")
|
||||
val builder = getOrPutPointOptionBuilder(markerId, V2XConst.V2X_MARKER_OWNER, MAP_MARKER)
|
||||
builder
|
||||
.set3DMode(true)
|
||||
@@ -117,6 +119,7 @@ class AiRoadMarker {
|
||||
}
|
||||
val wrapper = MarkerWrapper(markerId, marker.poi_lon, marker.poi_lat, 1, elapsedDistance = distance)
|
||||
wrapper.onRemoved = {
|
||||
Logger.d(TAG, "222 -> marker --->poiType: $marker, ${EventTypeEnumNew.getMarker3DRes(marker.poiType)}")
|
||||
CallerRoadV2NEventWindowListenerManager.dismiss(markerId)
|
||||
builders.remove(markerId)
|
||||
markerIds.remove(p.id)
|
||||
@@ -365,8 +368,8 @@ class AiRoadMarker {
|
||||
data class Marker(
|
||||
val id: String,
|
||||
val poiType: String,
|
||||
val poi_lat: Double,
|
||||
val poi_lon: Double,
|
||||
val poi_lat: Double,
|
||||
val poi_angle: Double,
|
||||
val polygon: List<Pair<Double, Double>>? = null,
|
||||
var farthestPoint: Pair<Double, Double>? = null,
|
||||
|
||||
@@ -142,11 +142,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
if (gnssInfo != null) {
|
||||
if (1 == FunctionBuildConfig.gpsProvider) {
|
||||
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
|
||||
CallerAutoPilotStatusListenerManager.updateAutoPilotLocAndTime(
|
||||
gnssInfo.satelliteTime,
|
||||
gnssInfo.longitude,
|
||||
gnssInfo.latitude
|
||||
)
|
||||
CallerAutoPilotStatusListenerManager.updateAutoPilotLocAndTime(gnssInfo.satelliteTime, gnssInfo.longitude, gnssInfo.latitude, gnssInfo.heading)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,11 +287,7 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
// 同步给MAP地图
|
||||
CallerObuLocationWGS84ListenerManager.invokeObuLocationWGS84(gnssInfo)
|
||||
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
|
||||
CallerAutoPilotStatusListenerManager.updateAutoPilotLocAndTime(
|
||||
System.currentTimeMillis() / 1000.0,
|
||||
gnssInfo.longitude,
|
||||
gnssInfo.latitude
|
||||
)
|
||||
CallerAutoPilotStatusListenerManager.updateAutoPilotLocAndTime(System.currentTimeMillis() / 1000.0, gnssInfo.longitude, gnssInfo.latitude, gnssInfo.heading)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user