[3.3.0]
[feature] [最近的点日志记录]
This commit is contained in:
@@ -172,14 +172,16 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
|
||||
&& startStationInfo.distance == null
|
||||
) {
|
||||
//要前往的站在轨迹中对应的点的信息
|
||||
val startStationInfoInTra = CoordinateCalculateRouteUtil.getNearestPointInfo(
|
||||
val startStationInfo = CoordinateCalculateRouteUtil.getNearestPointInfo(
|
||||
preCarLocationIndexInTrajectory, mRoutePoints!!.size,mRoutePoints!!, startStationInfo.stationPoint!!,1
|
||||
)
|
||||
startStationInfo.isNext = startStationInfoInTra.second
|
||||
startStationInfo.index = startStationInfoInTra.first
|
||||
startStationInfo.distance = startStationInfoInTra.third
|
||||
preCarLocationIndexInTrajectory = startStationInfoInTra.first
|
||||
writeLog(startStationInfoInTra,location)
|
||||
this.startStationInfo.isNext = startStationInfo.second
|
||||
this.startStationInfo.index = startStationInfo.first
|
||||
this.startStationInfo.distance = startStationInfo.third
|
||||
preCarLocationIndexInTrajectory = startStationInfo.first
|
||||
val calculateData = "距离起始站点最近的点:${startStationInfo.first} 点在站的后面:${startStationInfo.second} 距离点的距离:${startStationInfo.third}"
|
||||
val locationInfo = "定位信息:${location.latitude},${location.longitude}"
|
||||
writeLog(calculateData,locationInfo)
|
||||
}
|
||||
|
||||
// 计算结束站点在轨迹中的信息 这个是一个常量可以缓存
|
||||
@@ -189,13 +191,15 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
|
||||
&& endStationInfo.distance == null
|
||||
) {
|
||||
//要前往的站在轨迹中对应的点
|
||||
val stationPointInRouteIndex = CoordinateCalculateRouteUtil.getNearestPointInfo(
|
||||
val endStationInfo = CoordinateCalculateRouteUtil.getNearestPointInfo(
|
||||
preCarLocationIndexInTrajectory,mRoutePoints!!.size, mRoutePoints!!, endStationInfo.stationPoint!!,3
|
||||
)
|
||||
endStationInfo.isNext = stationPointInRouteIndex.second
|
||||
endStationInfo.index = stationPointInRouteIndex.first
|
||||
endStationInfo.distance = stationPointInRouteIndex.third
|
||||
writeLog(stationPointInRouteIndex, location)
|
||||
this.endStationInfo.isNext = endStationInfo.second
|
||||
this.endStationInfo.index = endStationInfo.first
|
||||
this.endStationInfo.distance = endStationInfo.third
|
||||
val calculateData = "距离结束站点最近的点:${endStationInfo.first} 点在站的后面:${endStationInfo.second} 距离点的距离:${endStationInfo.third}"
|
||||
val locationInfo = "定位信息:${location.latitude},${location.longitude}"
|
||||
writeLog(calculateData, locationInfo)
|
||||
}
|
||||
|
||||
val carLocationInfo:Triple<Int,Boolean?,Float>
|
||||
@@ -209,7 +213,9 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
|
||||
preCarLocationIndexInTrajectory,endStationInfo.index!!+1, mRoutePoints!!, location,2
|
||||
)
|
||||
}
|
||||
writeLog(carLocationInfo, location)
|
||||
val calculateData = "距离结束站点最近的点:${carLocationInfo.first} 点在站的后面:${carLocationInfo.second} 距离点的距离:${carLocationInfo.third}"
|
||||
val locationInfo = "定位信息:${location.latitude},${location.longitude}"
|
||||
writeLog(calculateData, locationInfo)
|
||||
if(carLocationInfo.second==null||carLocationInfo.third>1_000){
|
||||
preCarLocationIndexInTrajectory = 0
|
||||
return
|
||||
@@ -359,14 +365,14 @@ object TrajectoryAndDistanceManager: IMoGoPlanningRottingListener{
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_SOCKET_AUTOPILOT,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_ADAS,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_OCH,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_OCH,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_OCH_COMMON_DISTANCE,
|
||||
paramIndexes = [0,1]
|
||||
)
|
||||
fun writeLog(carLocationInfo: Triple<Int, Boolean?, Float>, location: MogoLocation) {
|
||||
d(M_OCHCOMMON+ TAG,"距离车最近的点:${carLocationInfo.first} 当前位置在点的前后:${carLocationInfo.second} 距离点的距离:${carLocationInfo.third}")
|
||||
d(M_OCHCOMMON+ TAG,"定位信息:${location}")
|
||||
fun writeLog(carLocationInfo: String, location: String) {
|
||||
d(M_OCHCOMMON+ TAG,carLocationInfo)
|
||||
d(M_OCHCOMMON+ TAG,location)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -455,6 +455,18 @@ public class BusPassengerModel {
|
||||
|
||||
private final IMoGoAutopilotStatusListener mGoAutopilotStatusListener = new IMoGoAutopilotStatusListener(){
|
||||
|
||||
@Override
|
||||
public void onAutopilotDockerInfo(@NonNull String dockerVersion) {
|
||||
IMoGoAutopilotStatusListener.super.onAutopilotDockerInfo(dockerVersion);
|
||||
// TODO: 2023/6/19 mingjun
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(int state) {
|
||||
IMoGoAutopilotStatusListener.super.onAutopilotStatusResponse(state);
|
||||
// TODO: 2023/6/19 mingjun
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotRouteLineId(long lineId) {
|
||||
|
||||
|
||||
@@ -658,4 +658,15 @@ public class SweeperTaskModel implements IMoGoSweeperFutianCloudTaskListener, IM
|
||||
CallerLogger.INSTANCE.d(M_SWEEPER + TAG, "onSweeperFutianCloudTaskUnknown:" + string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotStatusResponse(int state) {
|
||||
IMoGoAutopilotStatusListener.super.onAutopilotStatusResponse(state);
|
||||
// TODO: 2023/6/19 bingbing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotDockerInfo(@NonNull String dockerVersion) {
|
||||
IMoGoAutopilotStatusListener.super.onAutopilotDockerInfo(dockerVersion);
|
||||
// TODO: 2023/6/19 bingbing
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,8 @@ class TraceManager : IMoGoCloudListener, IMoGoAutopilotCarConfigListener {
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_HD_MAP_BIZ)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_WEAK_NETWORK] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_RECORD_WEAK_NETWORK)
|
||||
fwBuildMap[ChainConstant.CHAIN_TYPE_OCH] =
|
||||
FwBuild(true, -1, pkgName + ChainConstant.CHAIN_LINK_LOG_OCH)
|
||||
|
||||
|
||||
traceInfoCache[ChainConstant.CHAIN_TYPE_INIT_STATUS] =
|
||||
|
||||
@@ -20,6 +20,8 @@ class ChainConstant {
|
||||
const val CHAIN_SOURCE_ANR = 11
|
||||
// 弱网监测
|
||||
const val CHAIN_SOURCE_WEAK_NETWORK = 12
|
||||
// OCH业务
|
||||
const val CHAIN_SOURCE_OCH = 13
|
||||
|
||||
const val CHAIN_TYPE_INIT_STATUS = 0
|
||||
const val CHAIN_TYPE_GNSS = 1
|
||||
@@ -36,6 +38,7 @@ class ChainConstant {
|
||||
const val CHAIN_TYPE_HD_MAP = 300
|
||||
const val CHAIN_TYPE_ANR = 400
|
||||
const val CHAIN_TYPE_WEAK_NETWORK = 500
|
||||
const val CHAIN_TYPE_OCH = 600
|
||||
|
||||
const val CHAIN_LINK_LOG_INIT = "-eagleInitStatus"
|
||||
const val CHAIN_LINK_LOG_ADAS_GNSS = "-adasGnssInfo"
|
||||
@@ -52,6 +55,7 @@ class ChainConstant {
|
||||
const val CHAIN_LINK_LOG_HD_MAP_BIZ = "-eagleHDMapBiz"
|
||||
const val CHAIN_LINK_LOG_RECORD_ANR = "-eagleRecordANR"
|
||||
const val CHAIN_LINK_LOG_RECORD_WEAK_NETWORK = "-eagleRecordWeakNetwork"
|
||||
const val CHAIN_LINK_LOG_OCH = "-eagleOch"
|
||||
|
||||
const val CHAIN_CODE_MULTI_CONNECT = "CHAIN_CODE_MULTI_CONNECT"
|
||||
const val CHAIN_CODE_ADAS_CAR_CONFIG = "CHAIN_CODE_ADAS_CAR_CONFIG"
|
||||
|
||||
Reference in New Issue
Block a user