[路距计算添加自驾状态日志]
This commit is contained in:
yangyakun
2023-06-27 16:55:01 +08:00
parent 07bccd0e2a
commit 78af09a838

View File

@@ -4,6 +4,7 @@ import com.mogo.commons.AbsMogoApplication
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.map.MogoLocation
import com.mogo.eagle.core.function.api.autopilot.IMoGoPlanningRottingListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ02ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.d
@@ -203,6 +204,8 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
fun calculateRouteSumLength(
location: MogoLocation,
) {
val autoPilotState = CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().state
val locationInfo = "自动驾驶状态:$autoPilotState line信息${lineId}定位信息:${location.latitude},${location.longitude},${location.heading}"
if (mRoutePoints.isNullOrEmpty()) return
// 计算起始站点在轨迹中的信息 这个是一个常量
if (startStationInfo.stationPoint != null
@@ -219,7 +222,6 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
this.startStationInfo.distance = startStationInfo.third
preCarLocationIndexInTrajectory = startStationInfo.first
val calculateData = "距离起始站点最近的点:${startStationInfo.first} 点在站的后面:${startStationInfo.second} 距离点的距离:${startStationInfo.third}"
val locationInfo = "line信息${lineId}定位信息:${location.latitude},${location.longitude},${location.heading}"
writeLog(calculateData,locationInfo)
}
@@ -237,7 +239,6 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
this.endStationInfo.index = endStationInfo.first
this.endStationInfo.distance = endStationInfo.third
val calculateData = "距离结束站点最近的点:${endStationInfo.first} 点在站的后面:${endStationInfo.second} 距离点的距离:${endStationInfo.third}"
val locationInfo = "line信息${lineId}定位信息:${location.latitude},${location.longitude},${location.heading}"
writeLog(calculateData, locationInfo)
}
@@ -253,7 +254,6 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
)
}
val calculateData = "距离结束站点最近的点:${carLocationInfo.first} 点在站的后面:${carLocationInfo.second} 距离点的距离:${carLocationInfo.third}"
val locationInfo = "line信息${lineId}定位信息:${location.latitude},${location.longitude},${location.heading}"
writeLog(calculateData, locationInfo)
if(carLocationInfo.second==null||carLocationInfo.third>1_000){
preCarLocationIndexInTrajectory = 0