[8.1.2][opt]预测功能新增些日志
This commit is contained in:
@@ -7,17 +7,16 @@ import com.mogo.eagle.core.data.traffic.TrafficData
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotIdentifyListener
|
||||
import com.mogo.eagle.core.function.api.base.IMoGoSubscriber
|
||||
import com.mogo.eagle.core.function.api.datacenter.obu.IMoGoObuStatusListener
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.PredictionDataManager
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.PredictionOverlayDrawer
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager.getLocationHeading
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager.getWgs84Lat
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationWGS84ListenerManager.getWgs84Lon
|
||||
import com.mogo.eagle.core.function.call.obu.CallerObuWarningListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.map.MogoMap
|
||||
import com.mogo.map.MogoMap.Companion.mapInstance
|
||||
import com.mogo.map.utils.LocationUtils
|
||||
import com.zhjt.mogo.adas.data.Adas.TrackedObjectClassID
|
||||
import com.zhjt.mogo.adas.data.Adas.TrackedObjectType
|
||||
import mogo.telematics.pad.MessagePad
|
||||
@@ -119,14 +118,23 @@ class MapIdentifySubscriber private constructor() : IMoGoSubscriber,
|
||||
// PredictionDataManager.getInstance()?.updateData(carPoiList1!!, 0)
|
||||
// PredictionDataManager.getInstance()?.updateData(carPoiList2!!, 2)
|
||||
} else {
|
||||
if (isUnKnownType(preObj.classtype) || preObj.predictionTrajectoryList.isNullOrEmpty() || mogoMap == null) return@forEach
|
||||
if (isUnKnownType(preObj.classtype) || preObj.predictionTrajectoryList.isNullOrEmpty() || mogoMap == null) {
|
||||
CallerLogger.d(TAG, "未知感知物或者没有预测数据或者地图实例拿不到,直接返回!")
|
||||
return@forEach
|
||||
}
|
||||
point = preObj.predictionTrajectoryList[0].trajectoryPointsList[0]
|
||||
arr = mogoMap.switchData(point.x, point.y, false)
|
||||
arr?.let { lonLatArr ->
|
||||
// 感知物不在当前视椎体内则不渲染其预测轨迹
|
||||
if (!mogoMap.isInCurrentFrame(lonLatArr[0], lonLatArr[1])) return@forEach
|
||||
if (!mogoMap.isInCurrentFrame(lonLatArr[0], lonLatArr[1])) {
|
||||
CallerLogger.d(TAG, "当前它车感知物不在视椎体内,不渲染预测轨迹!")
|
||||
return@forEach
|
||||
}
|
||||
val distance = com.mogo.eagle.core.utilcode.util.LocationUtils.getDistance(getWgs84Lat(), getWgs84Lon(), lonLatArr[1], lonLatArr[0])
|
||||
if (distance > 28) return@forEach
|
||||
if (distance > 28) {
|
||||
CallerLogger.d(TAG, "当前它车感知物距离自车大于28米,不渲染预测轨迹!")
|
||||
return@forEach
|
||||
}
|
||||
}
|
||||
preObj.predictionTrajectoryList[0].trajectoryPointsList.forEachIndexed { index, point ->
|
||||
if (index in 0..44 && index % 2 == 0) {// 步长为2,减少点
|
||||
|
||||
Reference in New Issue
Block a user