From c9bd42373d2f2b33a7dc5811a8fc6cc816c0548a Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Tue, 18 Oct 2022 19:04:55 +0800 Subject: [PATCH] =?UTF-8?q?[2.11.0=20fix]=20bus=E5=8F=B8=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E8=A7=A3=E5=86=B3Map280=E7=89=88=E6=9C=AC=E5=88=B0=E7=AB=99?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=AF=86=E9=9B=86=E4=B8=AD=E9=97=B4=E7=AB=99?= =?UTF-8?q?=E6=BB=91=E5=8A=A8=E5=87=BA=E5=8F=91=E7=AB=8B=E9=A9=AC=E5=88=B0?= =?UTF-8?q?=E7=AB=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/bus/model/BusOrderModel.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java index 4e9f1e8fb4..ab7446e7a4 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/model/BusOrderModel.java @@ -858,7 +858,23 @@ public class BusOrderModel { if (isArrivedStation) return; isArrivedStation = true; - CallerLogger.INSTANCE.d( M_BUS + TAG, "行程日志-到站==backgroundCurrentStationIndex=" + backgroundCurrentStationIndex); + //MAP 280 每隔100ms左右返回一次到站, 导致在到达中间站后再次滑动出发后会有时间差,收到一次到站,出现问题 + //此处比对 自驾告诉的到站站点坐标和本地应到站站点坐标, 一致时才能到站 + if (data != null && data.getEndLocation() != null){ + double latitude = data.getEndLocation().getLatitude(); //wgs + double longitude = data.getEndLocation().getLongitude(); + int arrivedStationIndex = backgroundCurrentStationIndex + 1; + BusStationBean arriveStation = stationList.get(arrivedStationIndex); + if (Double.doubleToLongBits(latitude) != Double.doubleToLongBits(arriveStation.getLat()) + || Double.doubleToLongBits(longitude) != Double.doubleToLongBits(arriveStation.getLon())){ + CallerLogger.INSTANCE.e( M_BUS + TAG, "行程日志-到站拦截,到站坐标不一致" ); + return; + } + } + + CallerLogger.INSTANCE.d( M_BUS + TAG, "行程日志-当前==backgroundCurrentStationIndex=" + + backgroundCurrentStationIndex); + isGoingToNextStation = false; arriveSiteStation();