[common]
[启动自驾距离条件]
This commit is contained in:
yangyakun
2023-11-22 11:46:25 +08:00
parent 91e0017776
commit 09c70e2448
2 changed files with 34 additions and 6 deletions

View File

@@ -670,18 +670,24 @@ object TrajectoryAndDistanceManager : IMoGoPlanningRottingListener {
return if (redCatche.isNullOrEmpty()) {
distanceWithStartStation()
} else {
distanceWithTrajectory(redCatche)
val currentPoint =
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
distanceWithTrajectory(redCatche,currentPoint)
}
} else {
return if (this.lineId == 0L || this.lineId == null) {
distanceWithTrajectory(mRoutePoints!!)
val currentPoint =
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
distanceWithTrajectory(mRoutePoints!!,currentPoint)
} else {
if (lineId != this.lineId) {
// 判断距离起始站的距离
distanceWithStartStation()
} else {
distanceWithTrajectory(mRoutePoints!!)
val currentPoint =
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
distanceWithTrajectory(mRoutePoints!!,currentPoint)
}
}
}
@@ -715,9 +721,7 @@ object TrajectoryAndDistanceManager : IMoGoPlanningRottingListener {
/**
* 距离轨迹的距离
*/
private fun distanceWithTrajectory(redCatche: MutableList<MogoLocation>): String {
val currentPoint =
CallerChassisLocationGCJ02ListenerManager.getChassisLocationGCJ02()
fun distanceWithTrajectory(redCatche: MutableList<MogoLocation>,currentPoint:MogoLocation): String {
// 判断距离轨迹的距离
val carLocationInfo: Triple<Int, Boolean?, Float> =
CoordinateCalculateRouteUtil.getNearestPointInfo(

File diff suppressed because one or more lines are too long