[M2] 乘客屏轨迹排查日志

This commit is contained in:
wangmingjun
2023-02-27 20:41:17 +08:00
parent e423e5b4ff
commit bdffe3b560

View File

@@ -192,19 +192,19 @@ class PM2DrivingModel private constructor() {
private val moGoAutopilotPlanningListener = object : IMoGoPlanningRottingListener{
override fun onAutopilotRotting(globalPathResp: MessagePad.GlobalPathResp?) {
val routePoints = globalPathResp?.wayPointsList
if (null != routePoints && routePoints.size > 0) {
updateRoutePoints(routePoints)
// startOrStopRouteAndWipe(true)
globalPathResp?.let {
d(SceneConstant.M_BUS_P + TAG, "och-rotting==wayPointsSize = " + it.wayPointsList.size)
updateRoutePoints(it.wayPointsList)
}
}
}
fun updateRoutePoints(routePoints: List<MessagePad.Location?>?) {
fun updateRoutePoints(routePoints: List<MessagePad.Location>?) {
mRoutePoints.clear()
val latLngModels = CoordinateCalculateRouteUtil
.coordinateConverterWgsToGcjLocations(mContext, routePoints)
d(SceneConstant.M_BUS_P + TAG, "och-rotting==latLngModels = " + latLngModels.size)
mRoutePoints.addAll(latLngModels)
calculateTwoStationsRoute()
}
@@ -336,7 +336,7 @@ class PM2DrivingModel private constructor() {
&& station.isLeaving && i + 1 < stations.size) {
mDrivingInfoCallback?.updateStationsInfo(stations as MutableList<PM2Station>, i + 1, false)
if (mNextStationIndex != i + 1) {
d(SceneConstant.M_BUS_P+TAG,"轨迹排查--开始行程")
d(SceneConstant.M_BUS_P+TAG,"och-rotting--start ")
mTwoStationsRouts.clear()
startRemainRouteInfo()
}
@@ -398,7 +398,7 @@ class PM2DrivingModel private constructor() {
break
}
for (lastPoints in lastPointsMap.values) {
d(SceneConstant.M_BUS_P + TAG, "轨迹排查==lastPoints.size() = " + lastPoints.size)
d(SceneConstant.M_BUS_P + TAG, "och-rotting==lastPoints.size() = " + lastPoints.size)
var lastSumLength = 0f
lastSumLength = if (lastPoints.size == 1) { //只是最后一个点,计算当前位置和最后一个点的距离
if (mNextStationIndex <= mStations.size - 1 && mNextStationIndex >= 0) {
@@ -417,7 +417,7 @@ class PM2DrivingModel private constructor() {
CoordinateCalculateRouteUtil.calculateRouteSumLength(lastPoints)
}
val lastTime = lastSumLength / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 //秒
d(SceneConstant.M_BUS_P + TAG, "轨迹排查==lastSumLength = $lastSumLength")
d(SceneConstant.M_BUS_P + TAG, "och-rotting==lastSumLength = $lastSumLength")
mDrivingInfoCallback?.updateRemainMT(
lastSumLength.toLong(),
lastTime.toLong()
@@ -447,7 +447,7 @@ class PM2DrivingModel private constructor() {
stationNext.gcjLat
)
d(SceneConstant.M_BUS_P + TAG, "轨迹排查==currentRouteIndex = " + currentRouteIndex
d(SceneConstant.M_BUS_P + TAG, "och-rotting==currentRouteIndex = " + currentRouteIndex
+ " nextRouteIndex = " + nextRouteIndex)
if (currentRouteIndex < nextRouteIndex) { //如果找到的next在起点的轨迹前面直接舍弃这个轨迹不显示