[feature]
[添加线路信息]
This commit is contained in:
yangyakun
2023-06-21 08:11:26 +08:00
parent fca94a4e01
commit 64518d2f14

View File

@@ -77,13 +77,15 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
globalPathResp?.wayPointsList?.let {
if (it.size > 0) {
d(M_OCHCOMMON + TAG, "收到轨迹:${it.size}第一个点${it[0]}最后一个点:${it.last()}")
if(globalPathResp.lineId == lineId){
d(M_OCHCOMMON + TAG, "重复轨迹")
startCalculateDistanceLoop()
return
if(globalPathResp.lineId!=null) {
if (globalPathResp.lineId == lineId) {
d(M_OCHCOMMON + TAG, "重复轨迹")
startCalculateDistanceLoop()
return
}
this.lineId = globalPathResp.lineId
}
endCalculateDistanceLoop()
this.lineId = globalPathResp.lineId
updateRoutePoints(it)
preCarLocationIndexInTrajectory = 0
startCalculateDistanceLoop()
@@ -183,7 +185,7 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
this.startStationInfo.distance = startStationInfo.third
preCarLocationIndexInTrajectory = startStationInfo.first
val calculateData = "距离起始站点最近的点:${startStationInfo.first} 点在站的后面:${startStationInfo.second} 距离点的距离:${startStationInfo.third}"
val locationInfo = "定位信息:${location.latitude},${location.longitude},${location.heading}"
val locationInfo = "line信息${lineId}定位信息:${location.latitude},${location.longitude},${location.heading}"
writeLog(calculateData,locationInfo)
}
@@ -201,7 +203,7 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
this.endStationInfo.index = endStationInfo.first
this.endStationInfo.distance = endStationInfo.third
val calculateData = "距离结束站点最近的点:${endStationInfo.first} 点在站的后面:${endStationInfo.second} 距离点的距离:${endStationInfo.third}"
val locationInfo = "定位信息:${location.latitude},${location.longitude},${location.heading}"
val locationInfo = "line信息${lineId}定位信息:${location.latitude},${location.longitude},${location.heading}"
writeLog(calculateData, locationInfo)
}
@@ -217,7 +219,7 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
)
}
val calculateData = "距离结束站点最近的点:${carLocationInfo.first} 点在站的后面:${carLocationInfo.second} 距离点的距离:${carLocationInfo.third}"
val locationInfo = "定位信息:${location.latitude},${location.longitude},${location.heading}"
val locationInfo = "line信息${lineId}定位信息:${location.latitude},${location.longitude},${location.heading}"
writeLog(calculateData, locationInfo)
if(carLocationInfo.second==null||carLocationInfo.third>1_000){
preCarLocationIndexInTrajectory = 0