diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/callback/IBusPassengerAutopilotPlanningCallback.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/callback/IBusPassengerAutopilotPlanningCallback.java index 8d93dacbf1..b4c97ccd35 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/callback/IBusPassengerAutopilotPlanningCallback.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/callback/IBusPassengerAutopilotPlanningCallback.java @@ -13,6 +13,5 @@ import mogo.telematics.pad.MessagePad; public interface IBusPassengerAutopilotPlanningCallback { void routeResult(List models,int haveArrivedIndex); void routePlanningToNextStationChanged(long meters, long timeInSecond); - void setLineMarker(List models); void updateTotalDistance(); } diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java index c9fab03d3d..80b648d14c 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/model/BusPassengerModel.java @@ -49,7 +49,6 @@ import com.mogo.och.bus.passenger.network.BusPassengerServiceManager; import com.mogo.och.common.module.biz.network.OchCommonServiceCallback; import com.mogo.och.common.module.manager.AbnormalFactorsLoopManager; import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil; -import com.mogo.och.common.module.utils.ToastUtilsOch; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; @@ -410,7 +409,6 @@ public class BusPassengerModel { List routePoints = routeList.getWayPointsList(); if (null != routePoints && routePoints.size() > 0){ updateRoutePoints(routePoints); - setRouteLineMarker(); startToRouteAndWipe(); } } @@ -441,10 +439,10 @@ public class BusPassengerModel { int nextRouteIndex = CoordinateCalculateRouteUtil.getArrivedPointIndexNew(currentRouteIndex ,mRoutePoints ,stationNext.getGcjLon(),stationNext.getGcjLat()); - CallerLogger.INSTANCE.d(M_BUS_P + TAG, "currentRouteIndex = " + currentRouteIndex + CallerLogger.INSTANCE.d(M_BUS_P + TAG, "轨迹排查==currentRouteIndex = " + currentRouteIndex + ", nextRouteIndex = " + nextRouteIndex); if (currentRouteIndex < nextRouteIndex){ //如果找到的next在起点的轨迹前面,直接舍弃这个轨迹,不显示 - mTwoStationsRouts.addAll(mRoutePoints.subList(currentRouteIndex,nextRouteIndex)); + mTwoStationsRouts.addAll(mRoutePoints.subList(currentRouteIndex,nextRouteIndex + 1)); } } }else { //只有两个站点的时候整个路线就是两个站点之间的轨迹 @@ -476,16 +474,25 @@ public class BusPassengerModel { } for (List lastPoints: lastPointsMap.values()){ + CallerLogger.INSTANCE.d(M_BUS_P + TAG, "轨迹排查==lastPoints.size() = " + lastPoints.size()); float lastSumLength = 0; if (lastPoints.size() == 1){ //只是最后一个点,计算当前位置和最后一个点的距离 - lastSumLength = CoordinateUtils.calculateLineDistance( - lastPoints.get(0).getLongitude(), lastPoints.get(0).getLatitude(), - mLocation.getLongitude(), mLocation.getLatitude()); + if (mNextStationIndex <= mStations.size()-1 && mNextStationIndex >= 0){ + BusPassengerStation stationNext = mStations.get(mNextStationIndex); + lastSumLength = CoordinateUtils.calculateLineDistance( + stationNext.getGcjLon(), stationNext.getGcjLat(), + mLocation.getLongitude(), mLocation.getLatitude()); + }else { + lastSumLength = CoordinateUtils.calculateLineDistance( + lastPoints.get(0).getLongitude(), lastPoints.get(0).getLatitude(), + mLocation.getLongitude(), mLocation.getLatitude()); + } + }else { lastSumLength = CoordinateCalculateRouteUtil.calculateRouteSumLength(lastPoints); } double lastTime = lastSumLength / BusPassengerConst.BUS_AVERAGE_SPEED * 3.6 ; //秒 - CallerLogger.INSTANCE.d(M_BUS_P + TAG, "lastSumLength = " + lastSumLength); + CallerLogger.INSTANCE.d(M_BUS_P + TAG, "轨迹排查==lastSumLength = " + lastSumLength); if (mAutopilotPlanningCallback != null){ mAutopilotPlanningCallback.routePlanningToNextStationChanged((long)lastSumLength,(long) lastTime); } @@ -533,17 +540,6 @@ public class BusPassengerModel { } } - /** - * 设置小地图路径的起终点marker - */ - public void setRouteLineMarker(){ - if (mAutopilotPlanningCallback != null && mRoutePoints != null){ - List routePoints = CoordinateCalculateRouteUtil - .coordinateConverterLocationToLatLng(mContext,mRoutePoints); - mAutopilotPlanningCallback.setLineMarker(routePoints); - } - } - /** * 开始轮询计算剩余里程和时间 * @param isStart diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BaseBusPassengerPresenter.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BaseBusPassengerPresenter.java index f742af5eb1..b87abc0736 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BaseBusPassengerPresenter.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/presenter/BaseBusPassengerPresenter.java @@ -158,11 +158,6 @@ public class BaseBusPassengerPresenter extends Presenter mView.updateRoutePlanningToNextStation(meters, timeInSecond)); } - @Override - public void setLineMarker(List models) { - runOnUIThread(() -> mView.setLineMarker(models)); - } - @Override public void updateTotalDistance() { runOnUIThread(() -> mView.setProgressBarMax()); diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java index bbd2a17c1d..6a54479707 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerMapDirectionView.java @@ -51,10 +51,6 @@ public class BusPassengerMapDirectionView private TextureMapView mAMapNaviView; private AMap mAMap; private Marker mCarMarker; - private Marker mStartMarker; - private Marker mEndMarker; - - private int mCurrentIndex = -1; private List mCoordinatesLatLng = new ArrayList<>(); //轨迹坐标数据 private List mLineStationLatLng = new ArrayList<>();//站点坐标数据 @@ -128,10 +124,6 @@ public class BusPassengerMapDirectionView mCarMarker = mAMap.addMarker(new MarkerOptions() .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_car)) .anchor(0.5f, 0.5f)); - mStartMarker = mAMap.addMarker(new MarkerOptions() - .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point))); - mEndMarker = mAMap.addMarker(new MarkerOptions() - .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_end_point))); mArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrow_arrived); mUnArrivedRes = BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_arrow_un_arrive); @@ -199,20 +191,16 @@ public class BusPassengerMapDirectionView //圈定地图显示范围 LatLngBounds.Builder boundsBuilder = new LatLngBounds.Builder(); -// if (mLineStationLatLng.size() > 0){ -// //存放经纬度 -// for (int i = 0; i < mLineStationLatLng.size(); i++) { -// boundsBuilder.include(mLineStationLatLng.get(i)); -// } -// //第二个参数为四周留空宽度 -// } - if (mCoordinatesLatLng.size() > 0){ //存放经纬度 for (int i = 0; i < mCoordinatesLatLng.size(); i++) { boundsBuilder.include(mCoordinatesLatLng.get(i)); } //第二个参数为四周留空宽度 + }else if (mLineStationLatLng.size() > 0){ + for (int i = 0; i< mLineStationLatLng.size();i++){ + boundsBuilder.include(mLineStationLatLng.get(i)); + } } boundsBuilder.include(currentLatLng); @@ -271,33 +259,11 @@ public class BusPassengerMapDirectionView if (mPolyline != null) { mPolyline.remove(); } - if (mStartMarker != null) { - mStartMarker.setVisible(false); - } - if (mEndMarker != null) { - mEndMarker.setVisible(false); - } } @Override public void setLineMarker() { - if (mStartMarker != null) { - mStartMarker.setVisible(false); - } - if (mEndMarker != null) { - mEndMarker.setVisible(false); - } - if (mCoordinatesLatLng.size() > 2) { - // 设置开始结束Marker位置 - LatLng startLatLng = mCoordinatesLatLng.get(0); - LatLng endLatLng = mCoordinatesLatLng.get(mCoordinatesLatLng.size() - 1); - - mStartMarker.setPosition(startLatLng); - mEndMarker.setPosition(endLatLng); - mStartMarker.setVisible(true); - mEndMarker.setVisible(true); - } } public void clearCoordinatesLatLng(){ @@ -324,19 +290,12 @@ public class BusPassengerMapDirectionView if (mAMapNaviView != null) { mAMapNaviView.onPause(); } - mCurrentIndex = -1; } public void onDestroy() { if (mAMapNaviView != null) { mAMapNaviView.onDestroy(); } - mCurrentIndex = -1; - } - - public void setCoordinatesLatLng(List latLngs) { - mCoordinatesLatLng.clear(); - mCoordinatesLatLng.addAll(latLngs); } public void setCoordinatesLatLng(List latLngs,int haveArrivedIndex) { @@ -348,40 +307,28 @@ public class BusPassengerMapDirectionView public void clearLineMarkers(){ for (int i =0; i< mLineMarkers.size();i++){ mLineMarkers.get(i).setVisible(false); + mLineMarkers.get(i).remove(); } mLineMarkers.clear(); } - public void setLineMarkersAndDraw(List stationLatLngs){ + public void setLinePointMarkerAndDraw(List mLineStationsList, int currentIndex) { clearLineMarkers(); - for (int i = 0; i < stationLatLngs.size(); i++) { - Marker mWayPointMarker = mAMap.addMarker(new MarkerOptions() - .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point))); - mLineMarkers.add(mWayPointMarker); - } - if (mCoordinatesLatLng.size() == 0) { - for (int i = 0; i < mLineMarkers.size(); i++) { - mLineMarkers.get(i).setPosition(stationLatLngs.get(i)); - mLineMarkers.get(i).setVisible(true); - } - mCurrentIndex = -1; - } - } - - public void setLinePointMarkerAndDraw(List routeLineLatLngs, int currentIndex) { mLineStationLatLng.clear(); - mLineStationLatLng.addAll(routeLineLatLngs); + mLineStationLatLng.addAll(mLineStationsList); - if (mLineStationLatLng.size() > 0 && mCurrentIndex != currentIndex) { - if (mAMap != null && mLineMarkers.size() > 0) { - mCurrentIndex = currentIndex; - for (int i = 0; i < mLineMarkers.size(); i++) { - if (i != currentIndex && i + 1 != currentIndex) { - mLineMarkers.get(i).setPosition(mLineStationLatLng.get(i)); - mLineMarkers.get(i).setVisible(true); - } else { - mLineMarkers.get(i).setVisible(false); - } + if (mLineStationsList.size() > 0){ + for (int i = 0; i < mLineStationsList.size(); i++) { + if (currentIndex == i){ + Marker mEndMarker = mAMap.addMarker(new MarkerOptions() + .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_end_point))); + mEndMarker.setPosition(mLineStationsList.get(i)); + mLineMarkers.add(i,mEndMarker); + }else { + Marker mStartMarker = mAMap.addMarker(new MarkerOptions() + .icon(BitmapDescriptorFactory.fromResource(R.drawable.bus_p_map_view_dir_way_point))); + mStartMarker.setPosition(mLineStationsList.get(i)); + mLineMarkers.add(i,mStartMarker); } } } diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java index 5e345ae9a5..512046dca3 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/ui/BusPassengerRouteFragment.java @@ -26,7 +26,6 @@ import com.mogo.och.bus.passenger.constant.BusPassengerConst; import com.mogo.och.bus.passenger.presenter.BaseBusPassengerPresenter; import com.mogo.och.bus.passenger.ui.layoutmanager.CenterLayoutManager; import com.mogo.och.bus.passenger.utils.BPRouteDataTestUtils; -import com.mogo.och.common.module.utils.CoordinateCalculateRouteUtil; import com.mogo.och.common.module.wigets.MarqueeTextView; import java.util.ArrayList; @@ -46,7 +45,6 @@ public class BusPassengerRouteFragment extends private BusPassengerTrafficLightView mTrafficLightView; private List mStationsList = new ArrayList<>(); - private List mLineStationsList = new ArrayList<>(); private TextView mSpeedTv; private ConstraintLayout mNoLineInfoView; @@ -104,12 +102,6 @@ public class BusPassengerRouteFragment extends @Override public boolean onLongClick(View v) { BPRouteDataTestUtils.converToRouteData(); - UiThreadHandler.postDelayed(new Runnable() { - @Override - public void run() { - updateWayPointList(mStationsList,1); - } - },1000); return false; } }); @@ -156,22 +148,6 @@ public class BusPassengerRouteFragment extends } } - public void setLineMarker(List latLngList){ - if (latLngList.size() > 0) { - if (mMapDirectionView != null) { - mMapDirectionView.setCoordinatesLatLng(latLngList); - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.setLineMarker(); - } - }); - } - } else { - clearMapView(); - } - } - /** * 绘制 * @@ -213,18 +189,6 @@ public class BusPassengerRouteFragment extends } } - public void setLineMarkers(List list) { - if (mMapDirectionView != null) { - UiThreadHandler.post(new Runnable() { - @Override - public void run() { - mMapDirectionView.setLineMarkersAndDraw(list); - - } - }); - } - } - public void changeOperationStatus(boolean status) { if (status) { mNoLineInfoView.setVisibility(View.GONE); @@ -298,13 +262,13 @@ public class BusPassengerRouteFragment extends } private void updateWayPointList(List stations,int currentStationIndex) { - mLineStationsList.clear(); + List mLineStationsList = new ArrayList<>(); for (int i = 0; i< stations.size(); i++) {//站点集合 - LatLng latLng = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(getContext() - ,stations.get(i).getLon(),stations.get(i).getLat());// lat,lon +// LatLng latLng = CoordinateCalculateRouteUtil.coordinateConverterWgsToGcj(getContext() +// ,stations.get(i).getLon(),stations.get(i).getLat());// lat,lon + LatLng latLng = new LatLng(stations.get(i).getGcjLat(),stations.get(i).getGcjLon());// lat,lon mLineStationsList.add(latLng); } - setLineMarkers(mLineStationsList); if (mMapDirectionView != null) { UiThreadHandler.post(new Runnable() { diff --git a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPRouteDataTestUtils.java b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPRouteDataTestUtils.java index c9f8c83d62..ac7db3446d 100644 --- a/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPRouteDataTestUtils.java +++ b/OCH/mogo-och-bus-passenger/src/main/java/com/mogo/och/bus/passenger/utils/BPRouteDataTestUtils.java @@ -17,10 +17,20 @@ import mogo.telematics.pad.MessagePad; public class BPRouteDataTestUtils { //13号路口起-13号路口终 +// static String jsonStr ="{\n" + +// " \"models\": [\n" + +// " {\n" + +// " \"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927760268911,\"lon\":116.73512607061035,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927736555187,\"lon\":116.73498243020299,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927135941599,\"lon\":116.73482951462647,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199260672670036,\"lon\":116.73468429259535,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199251260349946,\"lon\":116.73453933465,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19924691997577,\"lon\":116.7343756435551,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199247953493625,\"lon\":116.73421240809087,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19924986849947,\"lon\":116.73400425509712,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199249431152175,\"lon\":116.73378579041055,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199248921305724,\"lon\":116.73357811807278,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19925012387371,\"lon\":116.73337650020184,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199252270195075,\"lon\":116.73318223781153,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992521615169,\"lon\":116.73298632625203,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19925202633083,\"lon\":116.73279582043983,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199261230205735,\"lon\":116.73263403473568,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199327991681926,\"lon\":116.73251962434813,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19944850496711,\"lon\":116.73249661840195,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199582026896415,\"lon\":116.73251038561487,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199743326352014,\"lon\":116.73253087453938,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199908347167394,\"lon\":116.73255070500186,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200065950595445,\"lon\":116.7325720694418,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20022747460407,\"lon\":116.73259461416663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200384057310536,\"lon\":116.73261575018056,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20053849777916,\"lon\":116.73263451936387,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200696919444624,\"lon\":116.7326540541723,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2008524952796,\"lon\":116.7326743511824,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20101429705625,\"lon\":116.73269393580199,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20118279997041,\"lon\":116.73271564378308,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201342388452076,\"lon\":116.73273653366076,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201476063822355,\"lon\":116.73275292393079,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20163479199852,\"lon\":116.73277440686762,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20181243476041,\"lon\":116.7328052766508,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201991767093304,\"lon\":116.7328453845644,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20215573733484,\"lon\":116.73287624009339,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202313648759784,\"lon\":116.73289887933315,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202434745374454,\"lon\":116.7329182210956,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20253164952098,\"lon\":116.73297539811277,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20258043275509,\"lon\":116.73312335324984,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20258233576585,\"lon\":116.73331077089557,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20257107560234,\"lon\":116.73351244039137,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202561578580514,\"lon\":116.73370176209845,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20256256788661,\"lon\":116.73391325024126,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20255633158834,\"lon\":116.73413195000244,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202543311179575,\"lon\":116.73436614303907,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20253067346457,\"lon\":116.73458032609663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20251776111356,\"lon\":116.73477082198242,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202503997557805,\"lon\":116.73498624001282,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20249129260376,\"lon\":116.73518976336872,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247877796589,\"lon\":116.73537786253135,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246651610268,\"lon\":116.73559239130266,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20245754388014,\"lon\":116.73574239922202,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20244749208,\"lon\":116.73589674090469,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243806550113,\"lon\":116.73607057284322,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243550556816,\"lon\":116.73628106525871,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243654127756,\"lon\":116.7364949950665,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243738221016,\"lon\":116.7367061649993,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243672476754,\"lon\":116.73691115930336,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243590788176,\"lon\":116.73710722104272,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202436434375336,\"lon\":116.73730688607075,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243749821501,\"lon\":116.73750140347998,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243625962803,\"lon\":116.73771330926793,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202434515480725,\"lon\":116.73791895606205,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2024326561388,\"lon\":116.73815206945737,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243092086137,\"lon\":116.73838655528765,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202430876006126,\"lon\":116.73861890759498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242914053177,\"lon\":116.73882029918758,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242843336561,\"lon\":116.73904465495175,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242661219026,\"lon\":116.73922453252953,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202426462811076,\"lon\":116.7393708046956,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242687134937,\"lon\":116.73954685547025,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242694967377,\"lon\":116.73975021183773,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202424630601236,\"lon\":116.73999740812975,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202422502184625,\"lon\":116.74028266774337,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202419634158936,\"lon\":116.7405942561498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241975959762,\"lon\":116.7409069557092,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241920524113,\"lon\":116.74120156191647,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241765540262,\"lon\":116.74149288504978,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241569149764,\"lon\":116.7418080096762,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202414529497084,\"lon\":116.74210262897205,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241419532155,\"lon\":116.74241767661879,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202413879360954,\"lon\":116.7427571218185,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241287045245,\"lon\":116.7431284691325,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241214965105,\"lon\":116.74343354359334,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241141271715,\"lon\":116.7437220210538,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2024080520075,\"lon\":116.74399113498052,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202391714280026,\"lon\":116.74427625698272,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20238163805639,\"lon\":116.74452083315958,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202379293010274,\"lon\":116.74475703837204,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202379007817086,\"lon\":116.7449961645494,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20237814181231,\"lon\":116.7452036063558,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202375477619896,\"lon\":116.74539567654291,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2023632396621,\"lon\":116.74555457589031,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20229396554444,\"lon\":116.7456716047369,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20217800547467,\"lon\":116.74574081942625,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202047498095304,\"lon\":116.74573659255675,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20188573786706,\"lon\":116.74571018281719,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201738240263026,\"lon\":116.74568463148606,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20157507049073,\"lon\":116.74565525041498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20137985142042,\"lon\":116.745619970576,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201187335613575,\"lon\":116.74558631350607,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20098251429043,\"lon\":116.74555055587679,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2007748533628,\"lon\":116.74551426934663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20057082986032,\"lon\":116.74547749663195,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20036944224329,\"lon\":116.74544156175533,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20016365229035,\"lon\":116.74540577510051,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1999958572445,\"lon\":116.74537505807076,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19984100521566,\"lon\":116.7453433678602,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1996863960282,\"lon\":116.74529675648621,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19953919567943,\"lon\":116.74525916493474,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19940587189373,\"lon\":116.74523402869453,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19929047792381,\"lon\":116.74518617038383,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922141745155,\"lon\":116.74506912884067,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920798885308,\"lon\":116.744896716334,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920912644279,\"lon\":116.74467216715483,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199209186509314,\"lon\":116.74448257515108,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920910709997,\"lon\":116.74430613406223,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992100786082,\"lon\":116.74410888316238,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921081961254,\"lon\":116.74391968819582,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921040855518,\"lon\":116.7437082083402,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921085053439,\"lon\":116.74346931155634,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921197237373,\"lon\":116.74325149697013,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921248248983,\"lon\":116.74301103786591,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992139724646,\"lon\":116.74277237066539,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199215818352386,\"lon\":116.74253219408898,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199216175018876,\"lon\":116.74228853120842,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199215970354246,\"lon\":116.74204663206451,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199216627492966,\"lon\":116.74183871233049,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921789170398,\"lon\":116.74165788334192,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922000138535,\"lon\":116.74144512197054,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199221559127494,\"lon\":116.741249370491,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922287231889,\"lon\":116.7410525810756,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922229019589,\"lon\":116.74085266662037,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992216995901,\"lon\":116.74061957723823,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922263073874,\"lon\":116.74041638149129,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922478093337,\"lon\":116.7402123910757,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199227066091595,\"lon\":116.74003419421553,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199228634241756,\"lon\":116.73985841944678,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922951636012,\"lon\":116.7397079274105,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199252095329484,\"lon\":116.73956265582487,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199346162997905,\"lon\":116.73944690416265,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199470799628024,\"lon\":116.73941941053417,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19962513314346,\"lon\":116.7394280706812,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199780626058924,\"lon\":116.73944255215424,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199961525343376,\"lon\":116.73945856750177,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20016196947193,\"lon\":116.73947572081121,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200384479551936,\"lon\":116.7394949225795,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200595083817475,\"lon\":116.73951027963179,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200792203321086,\"lon\":116.73952526850614,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200985930701684,\"lon\":116.73954125209579,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20115978977055,\"lon\":116.73955610094161,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201321019536124,\"lon\":116.7395695239138,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20147117943043,\"lon\":116.7395823299481,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20163699848565,\"lon\":116.73959633422596,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20178484338371,\"lon\":116.7396085776486,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201962185646316,\"lon\":116.73962351991214,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2021018923927,\"lon\":116.7396354059821,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2022137620686,\"lon\":116.73964348380458,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20232600820075,\"lon\":116.73961190446633,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241090270993,\"lon\":116.73951649703137,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20245777783807,\"lon\":116.73937664238166,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246906634823,\"lon\":116.73920146119093,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202470916682884,\"lon\":116.73898763065634,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247034830421,\"lon\":116.73878158418357,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246978204673,\"lon\":116.73857680142473,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247082638905,\"lon\":116.73834517890637,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202471943178196,\"lon\":116.7381047689514,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247131648035,\"lon\":116.73787761484981,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202470799473765,\"lon\":116.73766230702478,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247013054322,\"lon\":116.73743619407796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246999515433,\"lon\":116.73724916823292,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247199652478,\"lon\":116.73704888970806,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202473960263525,\"lon\":116.73684083235807,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202474504753205,\"lon\":116.73665462440796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247501354581,\"lon\":116.73650710371837,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246541231906,\"lon\":116.73635807696789,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202426768984274,\"lon\":116.73622283382787,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20236638788854,\"lon\":116.73610589402243,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20227106919894,\"lon\":116.73600895001849,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2021428343084,\"lon\":116.73596816020945,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20197815580698,\"lon\":116.73594623645097,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20181789535303,\"lon\":116.73593148707488,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201667906886954,\"lon\":116.73591743008926,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201505897730755,\"lon\":116.7359002912543,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20135083580946,\"lon\":116.73588579696379,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20118617904595,\"lon\":116.73586970398149,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20102374028594,\"lon\":116.73585314703226,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20085554043743,\"lon\":116.73583763953049,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20069451888229,\"lon\":116.73582073901778,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200530837344964,\"lon\":116.73580314359012,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2003608457064,\"lon\":116.73578183888779,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20021770046798,\"lon\":116.73575292592922,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20003454701824,\"lon\":116.7357174959358,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19986125116602,\"lon\":116.73569499961796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19969408518737,\"lon\":116.73567725223492,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19955533048882,\"lon\":116.73566375985422,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19943174810538,\"lon\":116.73564927714162,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19933167546824,\"lon\":116.735595995086,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199280357603875,\"lon\":116.73546293260645,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927848361656,\"lon\":116.73531579486274,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19928127892504,\"lon\":116.73505848474375,\"speed\": 0.0\n" + +// " }\n" + +// " ]\n" + +// "}"; + + //洱海轨迹 static String jsonStr ="{\n" + " \"models\": [\n" + " {\n" + - " \"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927760268911,\"lon\":116.73512607061035,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927736555187,\"lon\":116.73498243020299,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927135941599,\"lon\":116.73482951462647,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199260672670036,\"lon\":116.73468429259535,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199251260349946,\"lon\":116.73453933465,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19924691997577,\"lon\":116.7343756435551,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199247953493625,\"lon\":116.73421240809087,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19924986849947,\"lon\":116.73400425509712,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199249431152175,\"lon\":116.73378579041055,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199248921305724,\"lon\":116.73357811807278,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19925012387371,\"lon\":116.73337650020184,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199252270195075,\"lon\":116.73318223781153,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992521615169,\"lon\":116.73298632625203,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19925202633083,\"lon\":116.73279582043983,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199261230205735,\"lon\":116.73263403473568,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199327991681926,\"lon\":116.73251962434813,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19944850496711,\"lon\":116.73249661840195,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199582026896415,\"lon\":116.73251038561487,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199743326352014,\"lon\":116.73253087453938,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199908347167394,\"lon\":116.73255070500186,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200065950595445,\"lon\":116.7325720694418,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20022747460407,\"lon\":116.73259461416663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200384057310536,\"lon\":116.73261575018056,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20053849777916,\"lon\":116.73263451936387,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200696919444624,\"lon\":116.7326540541723,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2008524952796,\"lon\":116.7326743511824,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20101429705625,\"lon\":116.73269393580199,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20118279997041,\"lon\":116.73271564378308,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201342388452076,\"lon\":116.73273653366076,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201476063822355,\"lon\":116.73275292393079,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20163479199852,\"lon\":116.73277440686762,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20181243476041,\"lon\":116.7328052766508,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201991767093304,\"lon\":116.7328453845644,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20215573733484,\"lon\":116.73287624009339,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202313648759784,\"lon\":116.73289887933315,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202434745374454,\"lon\":116.7329182210956,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20253164952098,\"lon\":116.73297539811277,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20258043275509,\"lon\":116.73312335324984,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20258233576585,\"lon\":116.73331077089557,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20257107560234,\"lon\":116.73351244039137,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202561578580514,\"lon\":116.73370176209845,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20256256788661,\"lon\":116.73391325024126,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20255633158834,\"lon\":116.73413195000244,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202543311179575,\"lon\":116.73436614303907,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20253067346457,\"lon\":116.73458032609663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20251776111356,\"lon\":116.73477082198242,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202503997557805,\"lon\":116.73498624001282,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20249129260376,\"lon\":116.73518976336872,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247877796589,\"lon\":116.73537786253135,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246651610268,\"lon\":116.73559239130266,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20245754388014,\"lon\":116.73574239922202,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20244749208,\"lon\":116.73589674090469,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243806550113,\"lon\":116.73607057284322,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243550556816,\"lon\":116.73628106525871,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243654127756,\"lon\":116.7364949950665,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243738221016,\"lon\":116.7367061649993,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243672476754,\"lon\":116.73691115930336,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243590788176,\"lon\":116.73710722104272,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202436434375336,\"lon\":116.73730688607075,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243749821501,\"lon\":116.73750140347998,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243625962803,\"lon\":116.73771330926793,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202434515480725,\"lon\":116.73791895606205,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2024326561388,\"lon\":116.73815206945737,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20243092086137,\"lon\":116.73838655528765,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202430876006126,\"lon\":116.73861890759498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242914053177,\"lon\":116.73882029918758,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242843336561,\"lon\":116.73904465495175,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242661219026,\"lon\":116.73922453252953,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202426462811076,\"lon\":116.7393708046956,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242687134937,\"lon\":116.73954685547025,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20242694967377,\"lon\":116.73975021183773,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202424630601236,\"lon\":116.73999740812975,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202422502184625,\"lon\":116.74028266774337,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202419634158936,\"lon\":116.7405942561498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241975959762,\"lon\":116.7409069557092,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241920524113,\"lon\":116.74120156191647,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241765540262,\"lon\":116.74149288504978,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241569149764,\"lon\":116.7418080096762,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202414529497084,\"lon\":116.74210262897205,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241419532155,\"lon\":116.74241767661879,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202413879360954,\"lon\":116.7427571218185,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241287045245,\"lon\":116.7431284691325,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241214965105,\"lon\":116.74343354359334,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241141271715,\"lon\":116.7437220210538,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2024080520075,\"lon\":116.74399113498052,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202391714280026,\"lon\":116.74427625698272,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20238163805639,\"lon\":116.74452083315958,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202379293010274,\"lon\":116.74475703837204,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202379007817086,\"lon\":116.7449961645494,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20237814181231,\"lon\":116.7452036063558,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202375477619896,\"lon\":116.74539567654291,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2023632396621,\"lon\":116.74555457589031,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20229396554444,\"lon\":116.7456716047369,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20217800547467,\"lon\":116.74574081942625,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202047498095304,\"lon\":116.74573659255675,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20188573786706,\"lon\":116.74571018281719,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201738240263026,\"lon\":116.74568463148606,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20157507049073,\"lon\":116.74565525041498,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20137985142042,\"lon\":116.745619970576,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201187335613575,\"lon\":116.74558631350607,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20098251429043,\"lon\":116.74555055587679,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2007748533628,\"lon\":116.74551426934663,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20057082986032,\"lon\":116.74547749663195,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20036944224329,\"lon\":116.74544156175533,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20016365229035,\"lon\":116.74540577510051,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1999958572445,\"lon\":116.74537505807076,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19984100521566,\"lon\":116.7453433678602,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1996863960282,\"lon\":116.74529675648621,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19953919567943,\"lon\":116.74525916493474,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19940587189373,\"lon\":116.74523402869453,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19929047792381,\"lon\":116.74518617038383,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922141745155,\"lon\":116.74506912884067,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920798885308,\"lon\":116.744896716334,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920912644279,\"lon\":116.74467216715483,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199209186509314,\"lon\":116.74448257515108,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19920910709997,\"lon\":116.74430613406223,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992100786082,\"lon\":116.74410888316238,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921081961254,\"lon\":116.74391968819582,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921040855518,\"lon\":116.7437082083402,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921085053439,\"lon\":116.74346931155634,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921197237373,\"lon\":116.74325149697013,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921248248983,\"lon\":116.74301103786591,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992139724646,\"lon\":116.74277237066539,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199215818352386,\"lon\":116.74253219408898,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199216175018876,\"lon\":116.74228853120842,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199215970354246,\"lon\":116.74204663206451,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199216627492966,\"lon\":116.74183871233049,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19921789170398,\"lon\":116.74165788334192,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922000138535,\"lon\":116.74144512197054,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199221559127494,\"lon\":116.741249370491,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922287231889,\"lon\":116.7410525810756,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922229019589,\"lon\":116.74085266662037,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.1992216995901,\"lon\":116.74061957723823,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922263073874,\"lon\":116.74041638149129,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922478093337,\"lon\":116.7402123910757,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199227066091595,\"lon\":116.74003419421553,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199228634241756,\"lon\":116.73985841944678,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19922951636012,\"lon\":116.7397079274105,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199252095329484,\"lon\":116.73956265582487,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199346162997905,\"lon\":116.73944690416265,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199470799628024,\"lon\":116.73941941053417,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19962513314346,\"lon\":116.7394280706812,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199780626058924,\"lon\":116.73944255215424,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199961525343376,\"lon\":116.73945856750177,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20016196947193,\"lon\":116.73947572081121,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200384479551936,\"lon\":116.7394949225795,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200595083817475,\"lon\":116.73951027963179,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200792203321086,\"lon\":116.73952526850614,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200985930701684,\"lon\":116.73954125209579,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20115978977055,\"lon\":116.73955610094161,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201321019536124,\"lon\":116.7395695239138,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20147117943043,\"lon\":116.7395823299481,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20163699848565,\"lon\":116.73959633422596,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20178484338371,\"lon\":116.7396085776486,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201962185646316,\"lon\":116.73962351991214,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2021018923927,\"lon\":116.7396354059821,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2022137620686,\"lon\":116.73964348380458,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20232600820075,\"lon\":116.73961190446633,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20241090270993,\"lon\":116.73951649703137,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20245777783807,\"lon\":116.73937664238166,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246906634823,\"lon\":116.73920146119093,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202470916682884,\"lon\":116.73898763065634,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247034830421,\"lon\":116.73878158418357,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246978204673,\"lon\":116.73857680142473,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247082638905,\"lon\":116.73834517890637,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202471943178196,\"lon\":116.7381047689514,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247131648035,\"lon\":116.73787761484981,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202470799473765,\"lon\":116.73766230702478,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247013054322,\"lon\":116.73743619407796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246999515433,\"lon\":116.73724916823292,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247199652478,\"lon\":116.73704888970806,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202473960263525,\"lon\":116.73684083235807,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202474504753205,\"lon\":116.73665462440796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20247501354581,\"lon\":116.73650710371837,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20246541231906,\"lon\":116.73635807696789,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.202426768984274,\"lon\":116.73622283382787,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20236638788854,\"lon\":116.73610589402243,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20227106919894,\"lon\":116.73600895001849,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2021428343084,\"lon\":116.73596816020945,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20197815580698,\"lon\":116.73594623645097,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20181789535303,\"lon\":116.73593148707488,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201667906886954,\"lon\":116.73591743008926,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.201505897730755,\"lon\":116.7359002912543,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20135083580946,\"lon\":116.73588579696379,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20118617904595,\"lon\":116.73586970398149,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20102374028594,\"lon\":116.73585314703226,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20085554043743,\"lon\":116.73583763953049,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20069451888229,\"lon\":116.73582073901778,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.200530837344964,\"lon\":116.73580314359012,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.2003608457064,\"lon\":116.73578183888779,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20021770046798,\"lon\":116.73575292592922,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.20003454701824,\"lon\":116.7357174959358,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19986125116602,\"lon\":116.73569499961796,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19969408518737,\"lon\":116.73567725223492,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19955533048882,\"lon\":116.73566375985422,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19943174810538,\"lon\":116.73564927714162,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19933167546824,\"lon\":116.735595995086,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.199280357603875,\"lon\":116.73546293260645,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19927848361656,\"lon\":116.73531579486274,\"speed\":0.0},{\"altitude\":0.0,\"angle\":0.0,\"duration\":0,\"lat\":40.19928127892504,\"lon\":116.73505848474375,\"speed\": 0.0\n" + + "\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87506159122434,\"longitude_\":100.13463113454593,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874963432017065,\"longitude_\":100.13431083742782,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87481475105022,\"longitude_\":100.13402921175965,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874646001578594,\"longitude_\":100.13381071517328,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874280379177108,\"longitude_\":100.13344505101841,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87422474353087,\"longitude_\":100.13336522063217,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.8741846037573,\"longitude_\":100.13326081770579,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874169301193604,\"longitude_\":100.133157732712,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87417865388365,\"longitude_\":100.13305383003687,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87424355168725,\"longitude_\":100.13288988207758,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87441186213399,\"longitude_\":100.1326293335985,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874490698935094,\"longitude_\":100.13247594955229,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874551609777672,\"longitude_\":100.13227787460397,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874574232444672,\"longitude_\":100.1320943662068,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874574936235152,\"longitude_\":100.13109176087639,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874553271326842,\"longitude_\":100.13095333429315,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874468877309848,\"longitude_\":100.1307193884582,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874449652750723,\"longitude_\":100.1306199898516,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874449487671647,\"longitude_\":100.13046154976821,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87448439242463,\"longitude_\":100.13030173580755,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874554236422213,\"longitude_\":100.13013644761386,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874657614202334,\"longitude_\":100.1299792051648,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.874777620037,\"longitude_\":100.12985830283493,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.8749211786138,\"longitude_\":100.12975642056448,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.875123187810807,\"longitude_\":100.12965486650492,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.875282658783302,\"longitude_\":100.12960819854966,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87555277290776,\"longitude_\":100.12954493830546,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.875686392944456,\"longitude_\":100.12948797177033,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87609150201856,\"longitude_\":100.12914349760804,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87645852877848,\"longitude_\":100.1289124421148,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87667085149294,\"longitude_\":100.1288070141346,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.877063427631544,\"longitude_\":100.12866094818,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87751767381502,\"longitude_\":100.1286538378911,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87776644058061,\"longitude_\":100.12861180318971,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.87866240134362,\"longitude_\":100.12843614360035,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.879103098247672,\"longitude_\":100.12837521690956,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.879326467139197,\"longitude_\":100.12832846342278,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.8800083487784,\"longitude_\":100.12811951944514,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88019070137511,\"longitude_\":100.12802255167708,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.880357426115513,\"longitude_\":100.12787083439976,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.880481954487596,\"longitude_\":100.1276940858994,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.880653097994426,\"longitude_\":100.12740127585158,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.880758517533007,\"longitude_\":100.12730743064938,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.880799507331627,\"longitude_\":100.12724835914499,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88098572681533,\"longitude_\":100.12658255210448,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.881039332211476,\"longitude_\":100.1263847771375,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.881100185621683,\"longitude_\":100.12625820340021,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.881198711287677,\"longitude_\":100.12611952057267,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88133930457031,\"longitude_\":100.12599337741426,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.881467122690022,\"longitude_\":100.12592180492642,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88159423650277,\"longitude_\":100.12588048516646,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.882012210316635,\"longitude_\":100.12584119198453,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88240347787595,\"longitude_\":100.12581569076075,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.882530989675523,\"longitude_\":100.1258417579907,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88266718412272,\"longitude_\":100.1258996456634,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.882846062879587,\"longitude_\":100.12604302069693,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.883143169798704,\"longitude_\":100.12643363872347,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.883316147374213,\"longitude_\":100.12660436351877,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.883516631635977,\"longitude_\":100.12670006660859,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.884412161186358,\"longitude_\":100.12681096840119,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88456077756699,\"longitude_\":100.12680626559008,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88490956874977,\"longitude_\":100.12672087342608,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.885302490381278,\"longitude_\":100.12667304829165,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.885521440240353,\"longitude_\":100.1266801970379,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.885748782438256,\"longitude_\":100.12673442989593,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.886184311775366,\"longitude_\":100.12689928223388,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.886371044711435,\"longitude_\":100.12693222015717,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.886556923046193,\"longitude_\":100.12691593845197,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.887058969863556,\"longitude_\":100.1267783886852,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.887547354704896,\"longitude_\":100.12664214250168,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.887745630547965,\"longitude_\":100.12661296296805,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.887952855908765,\"longitude_\":100.12663469253742,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88838254724211,\"longitude_\":100.1267432660041,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88867177268486,\"longitude_\":100.12674878070436,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.888948154040733,\"longitude_\":100.12668867979535,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.889119678251383,\"longitude_\":100.12661519197152,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.88965548111457,\"longitude_\":100.12632103004057,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.890440398289833,\"longitude_\":100.12572932612804,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.890595726487316,\"longitude_\":100.12569393173928,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.89083685708941,\"longitude_\":100.12572825271758,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.89092017694698,\"longitude_\":100.12571880871474,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.891037856897587,\"longitude_\":100.12567497177714,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.891761687561317,\"longitude_\":100.12513259535619,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.891885118463794,\"longitude_\":100.1250643533811,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.89201181287785,\"longitude_\":100.1250211908644,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.892633993404484,\"longitude_\":100.12487357365991,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.892723272763575,\"longitude_\":100.12483263537747,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.892820100842155,\"longitude_\":100.12471361851891,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.89291347694438,\"longitude_\":100.12434808103623,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.892985029043015,\"longitude_\":100.12422953782732,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.89308490178189,\"longitude_\":100.12416612695728,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.893360731467585,\"longitude_\":100.12410368114618,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.894308353220502,\"longitude_\":100.12396602611501,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.895020251951685,\"longitude_\":100.12387330229565,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0},{\"altitude_\":0.0,\"heading_\":0.0,\"latitude_\":25.895317877980734,\"longitude_\":100.12387135197324,\"memoizedIsInitialized\":-1,\"unknownFields\":{\"fields\":{},\"fieldsDescending\":{}},\"memoizedSize\":-1,\"memoizedHashCode\":0" + + " }\n" + " ]\n" + "}"; @@ -34,13 +44,12 @@ public class BPRouteDataTestUtils { for (int i = 0; i < jsonElements.length(); i++) { JSONObject s = jsonElements.getJSONObject(i); MessagePad.Location.Builder builder = MessagePad.Location.newBuilder(); - builder.setLatitude(s.getDouble("lat")); - builder.setLongitude(s.getDouble("lon")); + builder.setLatitude(s.getDouble("latitude_")); + builder.setLongitude(s.getDouble("longitude_")); list.add(builder.build()); } BusPassengerModel.getInstance().updateRoutePoints(list); BusPassengerModel.getInstance().startRemainRouteInfo(); - BusPassengerModel.getInstance().setRouteLineMarker(); BusPassengerModel.getInstance().startToRouteAndWipe(); } catch (JSONException e) { e.printStackTrace(); 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 f034d76c6b..148aa350ca 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 @@ -162,11 +162,11 @@ public class BusOrderModel { OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener); OCHSocketMessageManager.INSTANCE.registerSocketMessageListener(//监听运营消息 - OCHSocketMessageManager.INSTANCE.getMsgMonitorType(), + OCHSocketMessageManager.msgMonitorType, mMogoOnMessageListener); OCHSocketMessageManager.INSTANCE.registerSocketMessageListener(//监听核销乘客 - OCHSocketMessageManager.INSTANCE.getMsgWriteOffPassengerType(), + OCHSocketMessageManager.msgWriteOffPassengerType, mWriteOffPassengeOnMessageListener); AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext); @@ -345,9 +345,9 @@ public class BusOrderModel { OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(null); OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener( - OCHSocketMessageManager.INSTANCE.getMsgMonitorType()); + OCHSocketMessageManager.msgMonitorType); OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener( - OCHSocketMessageManager.INSTANCE.getMsgWriteOffPassengerType()); + OCHSocketMessageManager.msgWriteOffPassengerType); AbnormalFactorsLoopManager.INSTANCE.stopLoopAbnormalFactors(); } diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IBusApiService.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IBusApiService.java index 7eced02c3a..32e8e7d1d0 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IBusApiService.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/net/IBusApiService.java @@ -151,7 +151,7 @@ public interface IBusApiService { Observable endTask(@Header ("appId") String appId, @Header("ticket") String ticket, @Body BusCloseTaskRequest data); /** - * 任务正常跑完结束 + * 查询核销乘客,目前不再使用,改为后台下发核销的乘客 * @param appId * @param ticket * @param data diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java index b46124078c..3f09f3ab14 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/presenter/BusPresenter.java @@ -2,7 +2,6 @@ package com.mogo.och.bus.presenter; import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_BUS; -import android.location.Location; import android.os.Looper; import androidx.annotation.NonNull; @@ -19,7 +18,6 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; -import com.mogo.och.bus.R; import com.mogo.och.bus.bean.BusStationBean; import com.mogo.och.bus.bean.WriteOffPassenger; import com.mogo.och.bus.callback.IBusADASStatusCallback; @@ -32,10 +30,9 @@ import com.mogo.och.bus.model.BusOrderModel; import com.mogo.och.bus.util.BusTrajectoryManager; import com.mogo.och.common.module.biz.bean.DriverStatusQueryRespBean; import com.mogo.och.common.module.biz.callback.ILoginCallback; +import com.mogo.och.common.module.biz.constant.LoginStatusManager; import com.mogo.och.common.module.manager.OCHAdasAbilityManager; -import com.mogo.och.common.module.utils.SoundPoolHelper; import com.mogo.och.common.module.voice.VoiceNotice; -import com.zhidao.socket.utils.LoginStatusUtil; import org.jetbrains.annotations.NotNull; @@ -72,7 +69,6 @@ public class BusPresenter extends Presenter @Override public void onCreate(@NonNull LifecycleOwner owner) { super.onCreate(owner); - BusOrderModel.getInstance().queryBusRoutes(); initModelListener(); } @@ -286,8 +282,10 @@ public class BusPresenter extends Presenter } @Override public void loginSuccess(DriverStatusQueryRespBean data) { - if(LoginStatusUtil.isLogin()){ + CallerLogger.INSTANCE.d(M_BUS + TAG, " loginStatus =" + LoginStatusManager.isLogin()); + if(LoginStatusManager.isLogin()){ BusOrderModel.getInstance().startOrStopOrderLoop(true); + BusOrderModel.getInstance().queryBusRoutes(); }else { BusTrajectoryManager.getInstance().stopTrajReqLoop(); BusOrderModel.getInstance().startOrStopOrderLoop(false); @@ -296,8 +294,6 @@ public class BusPresenter extends Presenter mView.hideSlidePanel(); BusOrderModel.getInstance().closeBeautificationMode(); } - BusOrderModel.getInstance().queryBusRoutes(); - } @Override diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/common/socketmessage/OCHSocketMessageManager.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/common/socketmessage/OCHSocketMessageManager.kt index dbeb35054e..0439ca7842 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/common/socketmessage/OCHSocketMessageManager.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/biz/common/socketmessage/OCHSocketMessageManager.kt @@ -12,8 +12,8 @@ import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager * 统一管理业务长链消息推送 */ object OCHSocketMessageManager { - public val msgMonitorType:Int = 6295553 - public val msgWriteOffPassengerType:Int = 6295554 + const val msgMonitorType:Int = 6295553 + const val msgWriteOffPassengerType:Int = 6295554 fun registerSocketMessageListener(msgType:Int, mogoOnMessageListener :IMogoOnMessageListener){ diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/AbnormalFactorsLoopManager.kt b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/AbnormalFactorsLoopManager.kt index f0db37ca5c..3f00c53bc4 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/AbnormalFactorsLoopManager.kt +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/manager/AbnormalFactorsLoopManager.kt @@ -6,6 +6,7 @@ import com.mogo.commons.debug.DebugConfig import com.mogo.commons.module.status.IMogoStatusChangedListener import com.mogo.commons.module.status.MogoStatusManager import com.mogo.commons.module.status.StatusDescriptor +import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger.i import com.mogo.eagle.core.utilcode.util.NetworkUtils import com.mogo.eagle.core.utilcode.util.ToastUtils @@ -72,7 +73,7 @@ object AbnormalFactorsLoopManager : IMogoStatusChangedListener { i(TAG, "abnormal_factors_Str = $toastStr") - if (toastStr !== ""){ + if (!FunctionBuildConfig.isDemoMode && toastStr !== ""){ ToastUtils.showLong(toastStr + "请开启相应权限或者查看网络") } } diff --git a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CoordinateCalculateRouteUtil.java b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CoordinateCalculateRouteUtil.java index abd7c4b8b1..8b6fec020a 100644 --- a/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CoordinateCalculateRouteUtil.java +++ b/OCH/mogo-och-common-module/src/main/java/com/mogo/och/common/module/utils/CoordinateCalculateRouteUtil.java @@ -126,7 +126,7 @@ public class CoordinateCalculateRouteUtil { if (currentIndex == mRoutePoints.size()-1){ latePoints.add(mRoutePoints.get(currentIndex)); }else if(currentIndex < mRoutePoints.size()-1){ - latePoints.addAll(mRoutePoints.subList(currentIndex,mRoutePoints.size()-1)); + latePoints.addAll(mRoutePoints.subList(currentIndex,mRoutePoints.size())); } return latePoints; } @@ -263,7 +263,7 @@ public class CoordinateCalculateRouteUtil { // LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude()); latePoints.add(location); }else { - List locations = mRoutePoints.subList(currentIndex,mRoutePoints.size()-1); + List locations = mRoutePoints.subList(currentIndex,mRoutePoints.size()); for (MogoLocation location: locations) { // LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude()); latePoints.add(location); diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java index 1fc6e04113..32bdacd61d 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java +++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/model/TaxiPassengerModel.java @@ -412,6 +412,7 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback //清除订单信息 public void clearCurrentOCHOrder() { mCurrentOCHOrder = null; + clearAutopilotControlParameters(); SharedPrefsMgr.getInstance(mContext).remove(TaxiPassengerConst.SP_KEY_OCH_TAXI_ORDER); } @@ -930,12 +931,36 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback return; } + AutopilotControlParameters parameters = initAutopilotControlParameters(); + if (parameters == null){ + CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "AutopilotControlParameters is empty."); + return; + } + + CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters); + CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "start autopilot with parameter: %s" + , GsonUtil.jsonFromObject(parameters) + + " ,startSiteName=" + mCurrentOCHOrder.startSiteAddr + + " ,endSiteName=" + mCurrentOCHOrder.endSiteAddr); + + + TaxiPassengerAnalyticsManager.getInstance().triggerStartAutopilotEvent(false, false, + mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo); + } + + private AutopilotControlParameters initAutopilotControlParameters() { + if (!checkCurrentOCHOrder()) { + CallerLogger.INSTANCE.e(M_TAXI_P + TAG, "no order or order is empty."); + ToastUtils.showShort("当前订单不存在或异常!"); + return null; + } + + AutopilotControlParameters parameters = new AutopilotControlParameters(); double startWgsLon = mCurrentOCHOrder.startSitePoint.get(0); double startWgsLat = mCurrentOCHOrder.startSitePoint.get(1); double endWgsLon = mCurrentOCHOrder.endSitePoint.get(0); double endWgsLat = mCurrentOCHOrder.endSitePoint.get(1); - AutopilotControlParameters parameters = new AutopilotControlParameters(); parameters.vehicleType = mCurrentOCHOrder.businessType; parameters.startName = PinYinUtil.getPinYinHeadChar(mCurrentOCHOrder.startSiteAddr); // 起点名称拼音首字母大写:科学城B区2号门(KXCBQ2HM) parameters.endName = PinYinUtil.getPinYinHeadChar(mCurrentOCHOrder.endSiteAddr); // 终点名称拼音首字母大写:科学城C区三号门(KXCCQSHM) @@ -953,15 +978,26 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback mCurrentOCHOrder.contrailSaveTimeDPQP); } - CallerAutoPilotManager.INSTANCE.startAutoPilot(parameters); - CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "start autopilot with parameter: %s" - , GsonUtil.jsonFromObject(parameters) - + " ,startSiteName=" + mCurrentOCHOrder.startSiteAddr - + " ,endSiteName=" + mCurrentOCHOrder.endSiteAddr); + return parameters; + } + /** + * 将业务订单信息保存,鹰眼可取用 + */ + public void updateAutopilotControlParameters() { - TaxiPassengerAnalyticsManager.getInstance().triggerStartAutopilotEvent(false, false, - mCurrentOCHOrder.startSiteAddr, mCurrentOCHOrder.endSiteAddr, mCurrentOCHOrder.orderNo); + AutopilotControlParameters parameters = initAutopilotControlParameters(); + if (null == parameters){ + CallerLogger.INSTANCE.e(M_TAXI_P + TAG, "AutopilotControlParameters is empty."); + return; + } + CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "AutopilotControlParameters is update."); + CallerAutoPilotStatusListenerManager.INSTANCE.updateAutopilotControlParameters(parameters); + } + + public void clearAutopilotControlParameters(){ + CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "AutopilotControlParameters is clear."); + CallerAutoPilotStatusListenerManager.INSTANCE.updateAutopilotControlParameters(null); } diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/presenter/TaxiPassengerServingOrderPresenter.java b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/presenter/TaxiPassengerServingOrderPresenter.java index b508715fd3..11ae9bf1c7 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/presenter/TaxiPassengerServingOrderPresenter.java +++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/presenter/TaxiPassengerServingOrderPresenter.java @@ -92,27 +92,26 @@ public class TaxiPassengerServingOrderPresenter extends PresentermView.updateOrderStatusView(order)); - }else if (mCurrentPassengerOrder.orderStatus != order.orderStatus) { - runOnUIThread(() ->mView.updateOrderStatusView(order)); - - if (TaxiPassengerOrderStatusEnum.OnTheWayToEnd.getCode() == order.orderStatus){ - CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "-----OnTheWayToEndStation----"); - TaxiPassengerModel.getInstance().startOrStopQueryOrderRemaining(true); - } - - if (TaxiPassengerOrderStatusEnum.Cancel.getCode() == mCurrentPassengerOrder.orderStatus - || TaxiPassengerOrderStatusEnum.ArriveAtEnd.getCode() == mCurrentPassengerOrder.orderStatus){ + if (TaxiPassengerOrderStatusEnum.Cancel.getCode() == order.orderStatus + || TaxiPassengerOrderStatusEnum.ArriveAtEnd.getCode() == order.orderStatus + || TaxiPassengerOrderStatusEnum.JourneyCompleted.getCode() == order.orderStatus){ TaxiPassengerModel.getInstance().startOrStopQueryOrderRemaining(false); + TaxiPassengerModel.getInstance().clearAutopilotControlParameters(); + CallerLogger.INSTANCE.d(M_TAXI_P + TAG, "Cancel or ArriveAtEnd or JourneyCompleted"); } - mCurrentPassengerOrder = order; + + mCurrentPassengerOrder = order; //当前无订单 + runOnUIThread(() ->mView.updateOrderStatusView(order)); } } diff --git a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/leftmenu/ItemViewTouchListener.kt b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/leftmenu/ItemViewTouchListener.kt index 1aa1e9afa3..f9cd1a55b8 100644 --- a/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/leftmenu/ItemViewTouchListener.kt +++ b/OCH/mogo-och-taxi-passenger/src/main/java/com/mogo/och/taxi/passenger/ui/leftmenu/ItemViewTouchListener.kt @@ -3,6 +3,8 @@ package com.mogo.och.taxi.passenger.ui.leftmenu import android.annotation.SuppressLint import android.view.MotionEvent import android.view.View +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant class ItemViewTouchListener : View.OnTouchListener { @@ -10,25 +12,34 @@ class ItemViewTouchListener : private var dragTime = 0L @SuppressLint("ClickableViewAccessibility") override fun onTouch(view: View, motionEvent: MotionEvent): Boolean { - when (motionEvent.action) { - MotionEvent.ACTION_DOWN -> { - LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action) - dragTime = System.currentTimeMillis() - } - MotionEvent.ACTION_MOVE -> { - if (LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action)) { - return false + try { + when (motionEvent.action) { + MotionEvent.ACTION_DOWN -> { + LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action) + dragTime = System.currentTimeMillis() } - } - MotionEvent.ACTION_UP -> { - LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action) - if (System.currentTimeMillis() - dragTime > 500) { - dragTime = 0 - return true + MotionEvent.ACTION_MOVE -> { + if (LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action)) { + return false + } } + MotionEvent.ACTION_UP -> { + LeftMenuOpen.dragAndOpen(motionEvent.rawX.toInt(),motionEvent.action) + if (System.currentTimeMillis() - dragTime > 500) { + dragTime = 0 + return true + } + } + else -> {} } - else -> {} + } catch (e: Exception) { + CallerLogger.e(SceneConstant.M_TAXI_P + TAG, e.message) + e.printStackTrace() } return false } + + companion object { + const val TAG = "ItemViewTouchListener" + } } \ No newline at end of file diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java index 384020964e..6b2e56777e 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/model/TaxiModel.java @@ -232,7 +232,7 @@ public class TaxiModel { OCHAdasAbilityManager.getInstance().setAdasStartFailureCallback(mAdasStartFailureListener); OCHSocketMessageManager.INSTANCE.registerSocketMessageListener( - OCHSocketMessageManager.INSTANCE.getMsgMonitorType(), + OCHSocketMessageManager.msgMonitorType, mMogoOnMessageListener); AbnormalFactorsLoopManager.INSTANCE.startLoopAbnormalFactors(mContext); @@ -264,7 +264,7 @@ public class TaxiModel { // 注销地图监听 CallerMapLocationListenerManager.INSTANCE.removeListener(TAG,false); - OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.INSTANCE.getMsgMonitorType()); + OCHSocketMessageManager.INSTANCE.releaseSocketMessageListener(OCHSocketMessageManager.msgMonitorType); CallerAutoPilotStatusListenerManager.INSTANCE.removeListener(mGoAutopilotStatusListener); CallerAutopilotPlanningListenerManager.INSTANCE.removeListener(moGoAutopilotPlanningListener); diff --git a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiOrderCancelDialog.java b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiOrderCancelDialog.java index 6ce0c58654..95aef7ecdb 100644 --- a/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiOrderCancelDialog.java +++ b/OCH/mogo-och-taxi/src/main/java/com/mogo/och/taxi/ui/TaxiOrderCancelDialog.java @@ -9,10 +9,13 @@ import android.graphics.drawable.ColorDrawable; import android.os.Build; import android.os.Bundle; import android.text.TextUtils; +import android.view.Display; +import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; +import android.view.WindowManager; import android.widget.AdapterView; import android.widget.BaseAdapter; import android.widget.GridView; @@ -109,11 +112,22 @@ public class TaxiOrderCancelDialog extends AlertDialog implements View.OnClickLi setCancelable(false); setCanceledOnTouchOutside(false); + initWindowView(); + } + + private void initWindowView() { Window window = getWindow(); //dialog padding 去掉 window.getDecorView().setPadding(0,0,0,0); window.setDimAmount(0.5f); window.getDecorView().setBackgroundColor(Color.parseColor("#00FFFFFF"));//设置背景, 不然显示不全 + + WindowManager.LayoutParams params = window.getAttributes(); + window.setGravity(Gravity.CENTER); + WindowManager m = window.getWindowManager(); + Display d = m.getDefaultDisplay(); + params.height = d.getHeight() - 500; + window.setAttributes(params); } @RequiresApi(api = Build.VERSION_CODES.M) diff --git a/OCH/mogo-och-taxi/src/main/res/layout/taxi_being_order.xml b/OCH/mogo-och-taxi/src/main/res/layout/taxi_being_order.xml index 1eff5f1dc8..0001414e85 100644 --- a/OCH/mogo-och-taxi/src/main/res/layout/taxi_being_order.xml +++ b/OCH/mogo-och-taxi/src/main/res/layout/taxi_being_order.xml @@ -74,6 +74,7 @@ android:lineSpacingExtra="10dp" android:textColor="#FFFFFF" android:textSize="@dimen/dp_46" + android:layout_marginRight="@dimen/dp_60" app:layout_constraintRight_toLeftOf="@+id/module_och_taxi_navi_end_iv" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toBottomOf="@+id/module_och_taxi_order_station_title_2" diff --git a/app/build.gradle b/app/build.gradle index 1548f70962..726a2d8cef 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -55,6 +55,10 @@ if (!isAndroidTestBuild()) { leak_canary_crash_fix { enable !isReleaseBuild } + + anr_fix { + enable true + } } } } @@ -255,8 +259,8 @@ dependencies { implementation rootProject.ext.dependencies.arouter implementation rootProject.ext.dependencies.boostmultidex - debugImplementation rootProject.ext.dependencies.debugleakcanary - releaseImplementation rootProject.ext.dependencies.releaseleakcanary +// debugImplementation rootProject.ext.dependencies.debugleakcanary +// releaseImplementation rootProject.ext.dependencies.releaseleakcanary implementation rootProject.ext.dependencies.android_start_up implementation rootProject.ext.dependencies.lancetx_runtime diff --git a/app/src/main/java/com/mogo/launcher/lancet/ANRFix.kt b/app/src/main/java/com/mogo/launcher/lancet/ANRFix.kt new file mode 100644 index 0000000000..878eafd753 --- /dev/null +++ b/app/src/main/java/com/mogo/launcher/lancet/ANRFix.kt @@ -0,0 +1,71 @@ +package com.mogo.launcher.lancet + +import androidx.annotation.* +import com.knightboost.lancet.api.* +import com.knightboost.lancet.api.annotations.* +import com.knightboost.lancet.api.annotations.Weaver +import com.mogo.eagle.core.utilcode.util.* +import kotlinx.coroutines.Runnable + +@Keep +@Weaver +@Group("anr_fix") +class ANRFix { + + @Insert + @TargetClass("com.zhidao.cosupload.service.UploadService") + @TargetMethod(methodName = "addUploadPaths") + private fun fixAddUploadPathsANR() { + ThreadUtils.getIoPool().execute(ANRFixTask(This.get(), "addUploadPaths")) + } + + @Insert + @TargetClass("com.zhidao.cosupload.service.UploadService") + @TargetMethod(methodName = "upload") + private fun fixUploadANR(@ClassOf("com.zhidao.cosupload.model.CacheUploadIdData") data: Any?) { + ThreadUtils.getIoPool().execute(ANRFixTask2(This.get(), "upload", data)) + } + + @Insert + @TargetClass("com.zhidao.cosupload.manager.CosUploadManagerImpl") + @TargetMethod(methodName = "upload") + private fun fixCosUploadManagerImplANR(productLine: String?, paths: List?, eventId: String?, @ClassOf("com.zhidao.cosupload.DbPriorityConfig") config: Any?) { + ThreadUtils.getIoPool().execute(ANRFixTask3(This.get(), "upload", productLine, paths, eventId, config)) + } +} + +class ANRFixTask(private val delegate: Any, private val methodName: String): Runnable { + + override fun run() { + delegate.javaClass.declaredMethods.find { + it.name != methodName && it.name.contains(methodName) + }?.also { + it.isAccessible = true + it.invoke(delegate) + } + } +} + +class ANRFixTask2(private val delegate: Any, private val methodName: String, private val p: Any?): Runnable { + + override fun run() { + delegate.javaClass.declaredMethods.find { + it.name != methodName && it.name.contains(methodName) + }?.also { + it.isAccessible = true + it.invoke(delegate, p) + } + } +} + +class ANRFixTask3(private val delegate: Any, private val methodName: String,private val productLine: String?, private val paths: List?, private val eventId: String?, private val config: Any?): Runnable { + + override fun run() { + delegate.javaClass.declaredMethods.find { + it.name != methodName && it.name.contains(methodName) + }?.also { + it.isAccessible = true + it.invoke(delegate, productLine, paths, eventId, config) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/mogo/launcher/stageone/ConfigStartUp.kt b/app/src/main/java/com/mogo/launcher/stageone/ConfigStartUp.kt index dbdbc21a98..71babd15d0 100644 --- a/app/src/main/java/com/mogo/launcher/stageone/ConfigStartUp.kt +++ b/app/src/main/java/com/mogo/launcher/stageone/ConfigStartUp.kt @@ -82,8 +82,8 @@ class ConfigStartUp : AndroidStartup() { } else if (DebugConfig.getProductFlavor() == "fPadLenovoOchBus" || DebugConfig.getProductFlavor() == "fPadLenovoOchBusPassenger" || DebugConfig.getProductFlavor() == "fPadLenovoOchSweeper") { HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache - HmiBuildConfig.isShowBrakeLightView = false - HmiBuildConfig.isShowTurnLightView = false +// HmiBuildConfig.isShowBrakeLightView = false +// HmiBuildConfig.isShowTurnLightView = false } if (DebugConfig.getProductFlavor() == "fPadLenovoOchTaxiPassenger") { diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java index 32530d996d..aa40c4e56c 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/adapter/MoGoHandAdasMsgManager.java @@ -1,5 +1,7 @@ package com.mogo.eagle.core.function.autopilot.adapter; +import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_DEVA; + import android.content.Context; import android.text.TextUtils; import android.util.Log; @@ -20,6 +22,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateLi import com.mogo.eagle.core.function.call.bindingcar.CallerBindingcarManager; import com.mogo.eagle.core.function.call.hmi.CallerHmiManager; import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr; import org.jetbrains.annotations.NotNull; @@ -96,9 +99,10 @@ public class MoGoHandAdasMsgManager implements @Override public void onAutopilotLightSwitchData(Chassis.LightSwitch lightSwitch) { //can数据转发 转向灯状态 0是正常 1是左转 2是右转 - if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示 +// if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示 if (lightSwitch != null) { int state = setTurnLightState(lightSwitch.getNumber()); + CallerLogger.INSTANCE.d(M_DEVA + "TurnLight", "---onAutopilotLightSwitchData ---state = " + state + "---lightSwitch.getNumber() = " + lightSwitch.getNumber()); if (state == 1 || state == 2) { isShowTurnLight = true; CallerHmiManager.INSTANCE.showBrakeLight(0); @@ -107,7 +111,7 @@ public class MoGoHandAdasMsgManager implements } CallerHmiManager.INSTANCE.showTurnLight(state); } - } +// } } @@ -126,7 +130,7 @@ public class MoGoHandAdasMsgManager implements @Override public void onAutopilotCarStateData(@Nullable MessagePad.GnssInfo gnssInfo) { //根据加速度判断 是否刹车 - if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示 +// if (!AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) { //小巴不展示 if (gnssInfo != null) { //设置刹车信息 if (gnssInfo.getAcceleration() < SharedPrefsMgr.getInstance(mContext).getFloat(MoGoConfig.BRAKE_ACCELERATION_THRESHOLD, -2.5F)) { @@ -134,10 +138,11 @@ public class MoGoHandAdasMsgManager implements } else { brakeLight = 0; } + CallerLogger.INSTANCE.d(M_DEVA + "BrakeLight", "---onAutopilotLightSwitchData ---Acceleration = " + gnssInfo.getAcceleration() + "-- brakeLight = " + brakeLight); if (!isShowTurnLight) { CallerHmiManager.INSTANCE.showBrakeLight(brakeLight); } - } +// } } } diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt index 499e30d784..47411823d8 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/AIDataCollectWindow.kt @@ -323,7 +323,7 @@ class AIDataCollectWindow constructor(activity: Activity) : View.OnTouchListener // 默认固定位置,靠屏幕右边缘的中间 mWindowManager!!.defaultDisplay.getMetrics(metrics) mWindowParams!!.x = metrics.widthPixels - mWindowParams!!.y = metrics.heightPixels / 2 - BarUtils.getStatusBarHeight()-350 + mWindowParams!!.y = metrics.heightPixels - BarUtils.getStatusBarHeight()-950 mWindowManager!!.addView(mFloatLayout, mWindowParams) } } diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseConfigView.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseConfigView.kt index cbdaa3df24..9a81e1d609 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseConfigView.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseConfigView.kt @@ -174,26 +174,28 @@ internal class BadCaseConfigView @JvmOverloads constructor( override fun onAutopilotRecordConfig(config: MessagePad.RecordDataConfig) { super.onAutopilotRecordConfig(config) ThreadUtils.runOnUiThread { - if(BadCaseConfig.dockerVersion!!.contains("2.3.0") - || BadCaseConfig.dockerVersion!!.contains("2.4.0") - || BadCaseConfig.dockerVersion!!.contains("2.5.0") - || BadCaseConfig.dockerVersion!!.contains("2.6.0") - || BadCaseConfig.dockerVersion!!.contains("2.8.0")){ - rvTemplate.visibility = View.GONE - }else{ - config.recordTypesList.iterator().forEach { - if (it.id != 99){ - val topicList = ArrayList() - it.topicsList.iterator().forEach { - topicList.add(TopicEntity(it,true,false)) + if(BadCaseConfig.dockerVersion!=null){ + if(BadCaseConfig.dockerVersion!!.contains("2.3.0") + || BadCaseConfig.dockerVersion!!.contains("2.4.0") + || BadCaseConfig.dockerVersion!!.contains("2.5.0") + || BadCaseConfig.dockerVersion!!.contains("2.6.0") + || BadCaseConfig.dockerVersion!!.contains("2.8.0")){ + rvTemplate.visibility = View.GONE + }else{ + config.recordTypesList.iterator().forEach { + if (it.id != 99){ + val topicList = ArrayList() + it.topicsList.iterator().forEach { + topicList.add(TopicEntity(it,true,false)) + } + recordTypesList.add(RecordTypeEntity(it.id,it.desc,topicList)) } - recordTypesList.add(RecordTypeEntity(it.id,it.desc,topicList)) } - } - if(recordTypesList.size>1){ - rvTemplate.visibility = View.VISIBLE - recordTemplateAdapter?.setData(recordTypesList) - recordTemplateAdapter?.notifyDataSetChanged() + if(recordTypesList.size>1){ + rvTemplate.visibility = View.VISIBLE + recordTemplateAdapter?.setData(recordTypesList) + recordTemplateAdapter?.notifyDataSetChanged() + } } } } diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/CaseTopicListDialog.java b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/CaseTopicListDialog.java index c9f0686c77..08ad929554 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/CaseTopicListDialog.java +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/CaseTopicListDialog.java @@ -5,9 +5,7 @@ import android.content.Context; import android.os.Bundle; import android.text.Editable; import android.text.TextWatcher; -import android.util.Log; -import android.view.KeyEvent; -import android.view.View; +import android.view.WindowManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.TextView; @@ -62,6 +60,10 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.dialog_case_topic_list); + WindowManager.LayoutParams params = getWindow().getAttributes(); + params.height = 959; + params.width = 1270; + getWindow().setAttributes(params);//向WindowManager设置属性 setCanceledOnTouchOutside(false); CallerAutopilotRecordListenerManager.INSTANCE.addListener(TAG, this); init(); @@ -185,13 +187,11 @@ public class CaseTopicListDialog extends Dialog implements IMoGoAutopilotRecordL @Override public void onAutopilotRecordConfig(MessagePad.RecordDataConfig config) { ThreadUtils.runOnUiThread(() -> { - Log.i("houyanli","AllTopicsCount="+config.getAllTopicsCount()); if(config.getAllTopicsCount()>0){ for(int index=0;index @@ -62,18 +62,18 @@ app:layout_constraintRight_toRightOf="parent" android:text="取消" android:textColor="#FFFFFFFF" - android:textSize="52dp" + android:textSize="52px" android:gravity="center" /> @@ -116,7 +116,7 @@ app:layout_constraintRight_toRightOf="@id/clSearchLayout" app:layout_constraintTop_toBottomOf="@id/clSearchLayout" app:layout_constraintBottom_toTopOf="@id/viewHorizontalLine" - android:layout_marginTop="50dp" + android:layout_marginTop="50px" android:layout_marginBottom="20dp" android:scrollbars="vertical" android:fadeScrollbars="false" diff --git a/core/function-impl/mogo-core-function-hmi/build.gradle b/core/function-impl/mogo-core-function-hmi/build.gradle index 6aedc92099..49f06ebcfa 100644 --- a/core/function-impl/mogo-core-function-hmi/build.gradle +++ b/core/function-impl/mogo-core-function-hmi/build.gradle @@ -65,8 +65,8 @@ dependencies { // implementation rootProject.ext.dependencies.crashSdk implementation rootProject.ext.dependencies.boostmultidex - debugImplementation rootProject.ext.dependencies.debugleakcanary - releaseImplementation rootProject.ext.dependencies.releaseleakcanary +// debugImplementation rootProject.ext.dependencies.debugleakcanary +// releaseImplementation rootProject.ext.dependencies.releaseleakcanary implementation rootProject.ext.dependencies.arouter kapt rootProject.ext.dependencies.aroutercompiler diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt index 1313c9a343..ccf6614c2a 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiFragment.kt @@ -65,7 +65,6 @@ import com.mogo.eagle.core.function.call.map.* import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Turning import com.mogo.eagle.core.function.call.monitor.CallerMonitorManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager -import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.notification.WarningFloat import com.mogo.eagle.core.function.hmi.notification.anim.DefaultAnimator @@ -74,7 +73,6 @@ import com.mogo.eagle.core.function.hmi.ui.bindingcar.ToBindingCarDialog import com.mogo.eagle.core.function.hmi.ui.bindingcar.UpgradeAppDialog import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog -import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog import com.mogo.eagle.core.function.hmi.ui.notice.NoticeTrafficDialog import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView @@ -91,6 +89,7 @@ import com.mogo.eagle.core.function.main.utils.DisplayEffectsHelper import com.mogo.eagle.core.utilcode.kotlin.* import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.* +import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr import com.mogo.eagle.core.utilcode.mogo.toast.TipToast @@ -101,7 +100,6 @@ import com.mogo.eagle.core.utilcode.reminder.api.impl.* import com.mogo.eagle.core.utilcode.util.* import com.mogo.eagle.core.utilcode.util.TimeUtils import com.mogo.eagle.core.utilcode.util.TimeUtils.millis2String -import com.mogo.map.MogoMap import com.zhidao.support.adas.high.common.MogoReport.Code.Error.EMAP.* import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig import com.zhjt.service_biz.BizConfig @@ -1381,6 +1379,7 @@ class MoGoHmiFragment : MvpFragment(), * 显示转向灯效果 if (HmiBuildConfig.isShowBadCaseView) { */ override fun showTurnLight(light: Int) { + CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight = $light ---isLeftLight = $isLeftLight ---isRightLight = $isRightLight") if (HmiBuildConfig.isShowTurnLightView) { ThreadUtils.runOnUiThread { if (light == 1 || light == 2) { @@ -1394,26 +1393,28 @@ class MoGoHmiFragment : MvpFragment(), CallerVisualAngleManager.changeVisualAngle(Turning(false)) } } - if (light == 1) { + if (light == 1) { //左转灯 if (!isLeftLight) { isLeftLight = true isRightLight = false isDisappare = false - //TODO + CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light = 1") CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(4, 500) } - } else if (light == 2) { + } else if (light == 2) { //右转灯 if (!isRightLight) { isRightLight = true isLeftLight = false isDisappare = false + CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light = 2") CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(2, 500) } } else { - if (!isDisappare) { + if (!isDisappare) { //默认 不亮灯 isDisappare = true isLeftLight = false isRightLight = false + CallerLogger.d("${SceneConstant.M_DEVA}${"TurnLight"}", "---showTurnLight ---light other") CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500) } } @@ -1436,11 +1437,13 @@ class MoGoHmiFragment : MvpFragment(), if (light == 1) { //刹车灯亮 if (!isBrake) { isBrake = true + CallerLogger.d("${SceneConstant.M_DEVA}${"BrakeLight"}", " showBrakeLight light = 1 ") CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(0, 500) } } else { - if (isBrake) { + if (isBrake) {//默认 不亮灯 isBrake = false + CallerLogger.d("${SceneConstant.M_DEVA}${"BrakeLight"}", " showBrakeLight light != 1 ") CallerMapUIServiceManager.getMapUIController()?.setCarLightsType(3, 500) } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt index 175799523d..2dbaf16312 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt @@ -177,6 +177,7 @@ class DriverMsgBoxListView @JvmOverloads constructor( } MsgCategory.RECORD_BAG -> { badCaseList?.add(0,msgBoxList) + badCaseList?.let { driverMsgBoxListAdapter?.setData(it) } } } } @@ -201,8 +202,8 @@ class DriverMsgBoxListView @JvmOverloads constructor( @Subscribe(threadMode = ThreadMode.MAIN) fun notifyList(msgBoxList: MsgBoxBean){ badCaseList?.let { - it.remove(msgBoxList) driverMsgBoxListAdapter?.notifyItemRemoved(it.indexOf(msgBoxList)) + it.remove(msgBoxList) } } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 6641f6f935..a61e243f31 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -83,7 +83,6 @@ import com.zhidao.support.adas.high.other.permission.BackgrounderPermission import com.zhjt.mogo_core_function_devatools.env.* import kotlinx.android.synthetic.main.view_debug_setting.view.* import kotlinx.android.synthetic.main.view_debug_setting.view.tbRouteDynamicEffect -import kotlinx.android.synthetic.main.view_sop_setting.view.* import mogo.telematics.pad.MessagePad import mogo_msg.MogoReportMsg import java.text.SimpleDateFormat @@ -583,15 +582,15 @@ class DebugSettingView @JvmOverloads constructor( tbIsDemoMode.isChecked = FunctionBuildConfig.isDemoMode // 演示模式 - tbIsDemoMode.setOnCheckedChangeListener { _, isChecked -> - CallerHmiManager.updateStatusBarLeftView(isChecked, "demoMode", DemoModeView(context)) - CallerAutoPilotManager.setDemoMode(isChecked) - if (!isChecked) { + tbIsDemoMode.setOnCheckedChangeListener { _, _ -> + FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode + CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context)) + CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) + if (!FunctionBuildConfig.isDemoMode) { //关闭美化模式时,通知工控机 - CallerAutoPilotManager.setIPCDemoMode(isChecked) + CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode) } - FunctionBuildConfig.isDemoMode = isChecked - tbIsDrawAutopilotTrajectoryData.isEnabled = !isChecked + tbIsDrawAutopilotTrajectoryData.isEnabled = !FunctionBuildConfig.isDemoMode if (!FunctionBuildConfig.isDemoMode) { tbIsDrawAutopilotTrajectoryData.isChecked = false } @@ -1842,6 +1841,13 @@ class DebugSettingView @JvmOverloads constructor( mUnknownIdentifyDataSize = 0 mTrajectoryInfoSize = 0 mRouteInfoSize = 0 + + if(FunctionBuildConfig.isDemoMode){ + tbIsDemoMode.text = "关闭美化模式" + }else{ + tbIsDemoMode.text = "开启美化模式" + } + } /** diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt index 3038b11206..ca74993d5a 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt @@ -20,9 +20,11 @@ import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView +import com.mogo.eagle.core.utilcode.util.UiThreadHandler import kotlinx.android.synthetic.main.view_debug_setting.view.* import kotlinx.android.synthetic.main.view_sop_setting.view.* import kotlinx.android.synthetic.main.view_sop_setting.view.tbRouteDynamicEffect +import java.util.* /** * SOP设置窗口 @@ -153,14 +155,14 @@ class SOPSettingView @JvmOverloads constructor( // 演示模式,上一次勾选的数据 tbDemoMode.isChecked = FunctionBuildConfig.isDemoMode // 演示模式 - tbDemoMode.setOnCheckedChangeListener { _, isChecked -> - CallerHmiManager.updateStatusBarLeftView(isChecked, "demoMode", DemoModeView(context)) - CallerAutoPilotManager.setDemoMode(isChecked) - if (!isChecked) { + tbDemoMode.setOnCheckedChangeListener { _, _ -> + FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode + CallerHmiManager.updateStatusBarLeftView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(context)) + CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode) + if (!FunctionBuildConfig.isDemoMode) { //关闭美化模式时,通知工控机 - CallerAutoPilotManager.setIPCDemoMode(isChecked) + CallerAutoPilotManager.setIPCDemoMode(FunctionBuildConfig.isDemoMode) } - FunctionBuildConfig.isDemoMode = isChecked } //只在司机端设置美化模式开关功能 if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) { @@ -246,12 +248,32 @@ class SOPSettingView @JvmOverloads constructor( CallerDevaToolsFuncConfigListenerManager.registerDevaToolsFuncConfigListener( FuncBizConfig.FOUNDATION, TAG, true, this ) + // 开启定时查询速度 + Timer().schedule(timerTaskRefresh, Date(), 500) } override fun onDetachedFromWindow() { super.onDetachedFromWindow() // 移除 业务配置监听 CallerDevaToolsFuncConfigListenerManager.unRegisterDevaToolsFuncConfigListener(FuncBizConfig.FOUNDATION, TAG) + try { + timerTaskRefresh.cancel() + } catch (e: Exception) { + e.printStackTrace() + } + } + + private val timerTaskRefresh = object : TimerTask(){ + override fun run() { + UiThreadHandler.post{ + if(FunctionBuildConfig.isDemoMode){ + tbDemoMode.text = "关闭美化模式" + }else{ + tbDemoMode.text = "开启美化模式" + } + } + } + } override fun updateBizView(type: String, lock: Boolean) { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java index 6db07edddb..cc8c25f21e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java @@ -204,22 +204,22 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis */ @Override public boolean dispatchKeyEvent(KeyEvent event) { -// CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event); + CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent code = " + event.getKeyCode() + "--action = " + event.getAction() + "----" + event); String bluetoothName = SharedPrefsMgr.getInstance(getContext()).getString(MfConstants.BLUETOOTH_NAME); if (!isPressEnd) { - CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent bluetoothName = " + bluetoothName); + CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---1--- bluetoothName = " + bluetoothName); } if (bluetoothName.equals("MINI_KEYBOARD")) { if (!isPressEnd) { isPressEnd = true; startPressTime = System.currentTimeMillis(); } - + CallerLogger.INSTANCE.d(M_F + "MoFangManager","dispatchKeyEvent ---2--- bluetoothName = " + bluetoothName + "--- code = " + event.getKeyCode() + "--action = " + event.getAction()); if (event.getKeyCode() == KeyEvent.KEYCODE_A) { //单击 -1,长按无操作,AB组合-2 if (event.getAction() == KeyEvent.ACTION_DOWN) { pressADownTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A down pressADownTime = " + pressADownTime + "---" + (pressADownTime - startPressTime) + "----isCombinationKey = " + isCombinationKey + "--pressBDownTime = " + pressBDownTime); - if ((pressADownTime - startPressTime) > 320 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) { + if ((pressADownTime - startPressTime) > 360 && (pressADownTime - startPressTime) < 1300 && pressBDownTime > 0) { if (isShowToast) { ToastUtils.showShort("方块 A 按AB组合 -2 "); } @@ -238,7 +238,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getAction() == KeyEvent.ACTION_UP) { pressAUpTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent A up pressAUpTime = " + pressAUpTime + "---" + (pressAUpTime - startPressTime) + "--pressBDownTime = " + pressBDownTime); - if ((pressAUpTime - startPressTime) < 300 && isCombinationKey != 3) { + if ((pressAUpTime - startPressTime) < 350 && isCombinationKey != 3) { isCombinationKey = 1; if (isShowToast) { ToastUtils.showShort("方块 单击A -1 "); @@ -259,7 +259,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis if (event.getAction() == KeyEvent.ACTION_DOWN) { pressBDownTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B down pressBDownTime = " + pressBDownTime + "--差-" + (pressBDownTime - startPressTime) + "---isCombinationKey = " + isCombinationKey + "--pressADownTime = " + pressADownTime); - if ((pressBDownTime - startPressTime) > 320 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) { + if ((pressBDownTime - startPressTime) > 360 && (pressBDownTime - startPressTime) < 1300 && pressADownTime > 0) { if (isShowToast) { ToastUtils.showShort("方块 B 按AB组合 "); } @@ -278,7 +278,7 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getAction() == KeyEvent.ACTION_UP) { pressBUpTime = System.currentTimeMillis(); CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent B up pressBUpTime = " + pressBUpTime + "--差-" + (pressBUpTime - startPressTime) + "--pressADownTime = " + pressADownTime); - if ((pressBUpTime - startPressTime) < 300 && isCombinationKey != 3) { + if ((pressBUpTime - startPressTime) < 350 && isCombinationKey != 3) { if (isShowToast) { ToastUtils.showShort("方块 单击B 0 "); } @@ -299,8 +299,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getKeyCode() == KeyEvent.KEYCODE_C) { //单击左变道,长按无操作 if (event.getAction() == KeyEvent.ACTION_DOWN) { pressCDownTime = System.currentTimeMillis(); + CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 time dif = " + (pressCDownTime - startPressTime)); if ((pressCDownTime - startPressTime) > 1320) { - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按C 无操作 "); if (isShowToast) { ToastUtils.showShort("方块 长按C 无操作 "); } @@ -308,8 +308,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getAction() == KeyEvent.ACTION_UP) { pressCUpTime = System.currentTimeMillis(); isPressEnd = false; - if ((pressCUpTime - startPressTime) < 300) { - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 "); + CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击C ← 向左变道 time dif = " + (pressCUpTime - startPressTime)); + if ((pressCUpTime - startPressTime) < 350) { if (isShowToast) { ToastUtils.showShort("方块 单击C ← 向左变道 "); } @@ -320,8 +320,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getKeyCode() == KeyEvent.KEYCODE_D) { //单击向右变道,双击无操作 if (event.getAction() == KeyEvent.ACTION_DOWN) { pressDDownTime = System.currentTimeMillis(); + CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 time dif = " + (pressDDownTime - startPressTime)); if ((pressDDownTime - startPressTime) > 1320) { - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按D 无操作 "); if (isShowToast) { ToastUtils.showShort("方块 长按D 无操作 "); } @@ -329,11 +329,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getAction() == KeyEvent.ACTION_UP) { pressDUpTime = System.currentTimeMillis(); isPressEnd = false; - if ((pressDUpTime - startPressTime) < 300) { + CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 time dif = " + (pressDUpTime - startPressTime)); + if ((pressDUpTime - startPressTime) < 350) { if (isShowToast) { ToastUtils.showShort("方块 单击D → 向右变道 "); } - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击D → 向右变道 "); CallerAutoPilotManager.INSTANCE.sendOperatorChangeLaneRight(); } } @@ -341,11 +341,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getKeyCode() == KeyEvent.KEYCODE_E) { //单击启动自驾,长按鸣笛 if (event.getAction() == KeyEvent.ACTION_DOWN) { pressEDownTime = System.currentTimeMillis(); + CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 time dif = " + (pressEDownTime - startPressTime)); if ((pressEDownTime - startPressTime) > 1320) { if (isShowToast) { ToastUtils.showShort("方块 长按E 鸣笛 "); } - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 长按E 鸣笛 "); CallerAutoPilotManager.INSTANCE.sendOperatorSetHorn(1); if (timerHorn == null) { timerHorn = new Timer(); @@ -361,11 +361,11 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } else if (event.getAction() == KeyEvent.ACTION_UP) { pressEUpTime = System.currentTimeMillis(); isPressEnd = false; - if ((pressEUpTime - startPressTime) < 300) { + CallerLogger.INSTANCE.d(M_F + "MoFangManager", "方块 单击E 开启自动驾驶 time dif = " + (pressEUpTime - startPressTime)); + if ((pressEUpTime - startPressTime) < 350) { if (isShowToast) { ToastUtils.showShort("方块 单击E 开启自动驾驶 "); } - CallerLogger.INSTANCE.d(M_F + "MoFangManager", "dispatchKeyEvent 方块 单击E 开启自动驾驶 "); CallerAutoPilotManager.INSTANCE.startAutoPilot(CallerAutoPilotStatusListenerManager.INSTANCE.getAutoPilotStatusInfo().getAutopilotControlParameters()); } } diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/overview/vm/OverViewModel.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/overview/vm/OverViewModel.kt index 8de6cf1fcc..eb67733969 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/overview/vm/OverViewModel.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/overview/vm/OverViewModel.kt @@ -3,6 +3,7 @@ package com.mogo.eagle.core.function.overview.vm import androidx.lifecycle.* import com.mogo.commons.constants.HostConst import com.mogo.eagle.core.data.map.Infrastructure +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo import com.mogo.eagle.core.function.overview.OverviewDao import com.mogo.eagle.core.function.overview.remote.OverViewServiceApi import com.mogo.eagle.core.function.overview.remote.V2XEvent @@ -74,23 +75,29 @@ class OverViewModel( } } - fun getAllV2XEventsByLineId(lineId: String, sn: String) { + fun getAllV2XEventsByLineId(sn: String) { if (disposable != null && !disposable!!.isDisposed) { disposable!!.dispose() } + // 1分钟查询一次 - disposable = Observable.interval(0, 60000, TimeUnit.MILLISECONDS) + disposable = Observable.interval(2000, 60000, TimeUnit.MILLISECONDS) .flatMap { - MoGoRetrofitFactory.getInstance(HostConst.getHost()) - .create(OverViewServiceApi::class.java) - .queryAllV2XEventsByLineId(lineId, sn) - .map { - if (it.code == 200 || it.code == 0) { - return@map it.result?.v2XEventList - } else { - return@map null + val lineId = getLineId() + if (lineId > 0) { + MoGoRetrofitFactory.getInstance(HostConst.getHost()) + .create(OverViewServiceApi::class.java) + .queryAllV2XEventsByLineId(lineId.toString(), sn) + .map { + if (it.code == 200 || it.code == 0) { + return@map it.result?.v2XEventList + } else { + return@map ArrayList() + } } - } + } else { + Observable.just(ArrayList()) + } } .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) @@ -106,4 +113,16 @@ class OverViewModel( fun stopQueryV2XEvents() { disposable?.dispose() } + + private fun getLineId(): Long { + var lineId: Long = -1 + val parameter = getAutoPilotStatusInfo() + .autopilotControlParameters + if (parameter != null) { + if (parameter.autoPilotLine != null) { + lineId = parameter.autoPilotLine!!.lineId + } + } + return lineId + } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java index a6c8f73d09..e6d7bb9401 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/AMapCustomView.java @@ -268,9 +268,9 @@ public class AMapCustomView if (center != null) { center.getLon(); MarkerOptions markerOption = new MarkerOptions(); - LatLng latLng = new LatLng(center.getLat(), - center.getLon()); + LatLng latLng = MarkerDrawerManager.INSTANCE.coordinateConverterWgsToGcj(mContext, center.getLat(), center.getLon()); markerOption.position(latLng); + markerOption.anchor(0.13f, 1f); markerOption.icon(BitmapDescriptorFactory.fromBitmap(getV2XBitmap())); markerOptionsList.add(markerOption); } @@ -282,15 +282,6 @@ public class AMapCustomView public void drawV2XMarkers(ArrayList markerOptionsList) { currMarkerList = mAMap.addMarkers(markerOptionsList, false); - mAMap.setOnMarkerClickListener(marker -> { - List infList = posInfMap.get(marker.getPosition()); - // 如果是摄像头 - if (infList != null) { - CallerHmiManager.INSTANCE.showVideoDialog(infList); - return true; - } - return false; - }); } private Bitmap getV2XBitmap() { diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/MarkerDrawerManager.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/MarkerDrawerManager.kt index 0ab43a4063..9ce14cf8ba 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/MarkerDrawerManager.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/MarkerDrawerManager.kt @@ -161,4 +161,19 @@ object MarkerDrawerManager { mCoordinateConverter.coord(LatLng(mogoLatLng.latitude, mogoLatLng.longitude)) return mCoordinateConverter.convert() } + + /** + * wgs84转高德坐标系 + */ + fun coordinateConverterWgsToGcj( + mContext: Context, + lat: Double, + lon: Double + ): LatLng { + val mCoordinateConverter = + CoordinateConverter(mContext) + mCoordinateConverter.from(CoordinateConverter.CoordType.GPS) + mCoordinateConverter.coord(LatLng(lat, lon)) + return mCoordinateConverter.convert() + } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/OverviewMapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/OverviewMapFragment.java index 12b07a5c10..37ab1567d9 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/OverviewMapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/OverviewMapFragment.java @@ -2,7 +2,6 @@ package com.mogo.eagle.core.function.smp; import android.content.Context; import android.os.Bundle; -import android.os.Looper; import android.view.View; import androidx.annotation.Nullable; @@ -21,7 +20,6 @@ import com.mogo.eagle.core.function.map.R; import com.mogo.eagle.core.function.overview.InfStructureManager; import com.mogo.eagle.core.function.overview.ViewModelExtKt; import com.mogo.eagle.core.function.overview.vm.OverViewModel; -import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import java.util.List; @@ -81,9 +79,8 @@ public class OverviewMapFragment extends BaseFragment @Override public void startQueryV2XEvents() { if (isAdded()) { - long lineId = getLineId(); - if (lineId > 0 && mViewModel != null) { - mViewModel.getAllV2XEventsByLineId("" + lineId, MoGoAiCloudClientConfig.getInstance().getSn()); + if (mViewModel != null) { + mViewModel.getAllV2XEventsByLineId(MoGoAiCloudClientConfig.getInstance().getSn()); } } } @@ -130,11 +127,7 @@ public class OverviewMapFragment extends BaseFragment mViewModel.getV2XEventLiveData().observe(this.getViewLifecycleOwner(), v2XEvents -> { mAMapCustomView.showV2XEventMarkers(v2XEvents); }); - - long lineId = getLineId(); - if (lineId > 0) { - mViewModel.getAllV2XEventsByLineId("" + lineId, MoGoAiCloudClientConfig.getInstance().getSn()); - } + mViewModel.getAllV2XEventsByLineId(MoGoAiCloudClientConfig.getInstance().getSn()); } /** diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java index 2e8740625b..129bf728c3 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/smp/SmallMapFragment.java @@ -1,5 +1,7 @@ package com.mogo.eagle.core.function.smp; +import static com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.M_MAP; + import android.content.Context; import android.os.Bundle; import android.view.View; @@ -16,8 +18,10 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningListener import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener; import com.mogo.eagle.core.function.api.map.smp.IMogoSmallMapProvider; import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager; +import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager; import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPlanningListenerManager; import com.mogo.eagle.core.function.map.R; +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.eagle.core.utilcode.util.UiThreadHandler; import org.jetbrains.annotations.NotNull; @@ -66,6 +70,7 @@ public class SmallMapFragment extends BaseFragment mSmallMapDirectionView = mRootView.findViewById(R.id.smallMapDirectionView); mSmallMapDirectionView.onCreateView(savedInstanceState); CallerAutopilotPlanningListenerManager.INSTANCE.addListener(TAG, this); + CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG,this); } @Override @@ -85,8 +90,13 @@ public class SmallMapFragment extends BaseFragment @Override public void drawablePolyline(List coordinates) { if (mSmallMapDirectionView != null) { - mSmallMapDirectionView.convert(coordinates); - UiThreadHandler.post(() -> mSmallMapDirectionView.drawablePolyline()); + UiThreadHandler.post(new Runnable() { + @Override + public void run() { + mSmallMapDirectionView.convert(coordinates); + mSmallMapDirectionView.drawablePolyline(); + } + }); } } @@ -131,9 +141,12 @@ public class SmallMapFragment extends BaseFragment @Override public void onAutopilotStatusResponse(@NotNull AutopilotStatusInfo autoPilotStatusInfo) { int tempStatus = autoPilotStatusInfo.getPilotmode(); + CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:"+tempStatus+" autoPilotStatus:"+autoPilotStatus); if (tempStatus != 1) { + CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:"+tempStatus+" clearPolyline"); clearPolyline(); }else if (tempStatus == 1 && autoPilotStatus == 0){ + CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotStatusResponse:getGlobalPath"); CallerAutoPilotManager.INSTANCE.getGlobalPath(); } autoPilotStatus = tempStatus; @@ -160,16 +173,21 @@ public class SmallMapFragment extends BaseFragment @Override public void onAutopilotRotting(MessagePad.GlobalPathResp globalPathResp) { + CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotRotting"); if (globalPathResp == null || globalPathResp.getWayPointsList().size() == 0) { return; } + CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotRotting:"+globalPathResp.getWayPointsList().size()); + List latLngList = new ArrayList<>(); for (MessagePad.Location routeModel : globalPathResp.getWayPointsList()) { latLngList.add(new MogoLatLng(routeModel.getLatitude(), routeModel.getLongitude())); } if (latLngList.size() > 0) { + CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotRotting:"+"drawablePolyline"); drawablePolyline(latLngList); } else { + CallerLogger.INSTANCE.i(M_MAP + TAG, "onAutopilotRotting:"+"clearPolyline"); clearPolyline(); } } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt index 8f2350f31b..e291c91433 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/enums/EventTypeEnum.kt @@ -654,39 +654,59 @@ enum class EventTypeEnum( return when (poiType) { //交通检查 TRAFFIC_CHECK.poiType -> { - R.drawable.v_to_x_marker_2 + R.drawable.v2x_icon_jiaotongjiancha_vr } //封路 ROAD_CLOSED.poiType -> { - R.drawable.v_to_x_marker_16 + R.drawable.v2x_icon_fenglu_vr } //施工 FOURS_ROAD_WORK.poiType -> { - R.drawable.v_to_x_marker_11 + R.drawable.icon_warning_v2x_road_construction } //AI施工 AI_ROAD_WORK.poiType -> { - R.drawable.v_to_x_marker_11 + R.drawable.icon_warning_v2x_road_construction } //拥堵 FOURS_BLOCK_UP.poiType -> { - R.drawable.v_to_x_marker_5 + R.drawable.icon_warning_v2x_congestion } //积水 FOURS_PONDING.poiType -> { - R.drawable.v_to_x_marker_6 + R.drawable.v2x_icon_jishui_vr } //浓雾 FOURS_FOG.poiType -> { - R.drawable.v_to_x_marker_9 + R.drawable.v2x_icon_nongwu_vr } //结冰 FOURS_ICE.poiType -> { - R.drawable.v_to_x_marker_8 + R.drawable.v2x_icon_jiebing_vr } //事故 FOURS_ACCIDENT.poiType -> { - R.drawable.v_to_x_marker_7 + R.drawable.v2x_icon_jiaotongshigu_vr + } + //重大事故 + FOURS_ACCIDENT_01.poiType -> { + R.drawable.v2x_icon_jiaotongshigu_vr + } + //特大事故 + FOURS_ACCIDENT_02.poiType -> { + R.drawable.v2x_icon_jiaotongshigu_vr + } + //较大事故 + FOURS_ACCIDENT_03.poiType -> { + R.drawable.v2x_icon_jiaotongshigu_vr + } + //一般事故 + FOURS_ACCIDENT_04.poiType -> { + R.drawable.v2x_icon_jiaotongshigu_vr + } + //轻微事故 + FOURS_ACCIDENT_05.poiType -> { + R.drawable.v2x_icon_jiaotongshigu_vr } //事故 FOURS_LIVING.poiType -> { @@ -708,6 +728,30 @@ enum class EventTypeEnum( ALERT_CAR_TROUBLE_WARNING.poiType -> { R.drawable.icon_car_red } + //VIP车辆优先通行,已为您变为绿灯 + TYPE_VIP_IDENTIFICATION_PASS.poiType -> { + R.drawable.icon_warning_v2x_vip_turn_light + } + //VIP车辆优先通行,已为您延长绿灯 + TYPE_VIP_IDENTIFICATION_EXTEND.poiType -> { + R.drawable.icon_warning_v2x_vip_turn_light + } + //VIP变灯请求失败 + TYPE_VIP_ERROR_IDENTIFICATION.poiType -> { + R.drawable.icon_warning_v2x_vip_turn_light + } + //最优路线 + TYPE_OPTIMAL_ROUTE_RECOMMEND.poiType -> { + R.drawable.icon_warning_v2x_optimal_route + } + //鬼探头类型 + GHOST_PROBE.poiType -> { + R.drawable.icon_warning_v2x_pedestrian_crossing + } + //接管 + TAKE_OVER_EVENT.poiType -> { + R.drawable.icon_warning_take_over + } else -> { R.drawable.icon_default } diff --git a/core/mogo-core-function-call/build.gradle b/core/mogo-core-function-call/build.gradle index 184ae88924..621360e062 100644 --- a/core/mogo-core-function-call/build.gradle +++ b/core/mogo-core-function-call/build.gradle @@ -50,6 +50,8 @@ dependencies { // MoGo 数据埋点工具 implementation rootProject.ext.dependencies.analytics + compileOnly rootProject.ext.dependencies.mogocustommap + if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { implementation rootProject.ext.dependencies.mogo_core_data implementation rootProject.ext.dependencies.mogo_core_utils diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt index 4e2a302dad..c01e0b89d7 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/map/CallerVisualAngleManager.kt @@ -9,7 +9,6 @@ import androidx.lifecycle.Lifecycle.Event import androidx.lifecycle.Lifecycle.Event.ON_DESTROY import androidx.lifecycle.LifecycleEventObserver import androidx.lifecycle.LifecycleOwner -import com.mogo.cloud.commons.utils.CoordinateUtils import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.map.* import com.mogo.eagle.core.data.map.MapRoadInfo.StopLine @@ -20,6 +19,7 @@ import com.mogo.eagle.core.utilcode.kotlin.safeCancel import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA import com.mogo.map.uicontroller.VisualAngleMode +import com.zhidaoauto.map.sdk.open.tools.MapTools import kotlinx.coroutines.* import kotlinx.coroutines.android.asCoroutineDispatcher import kotlinx.coroutines.internal.synchronized @@ -63,42 +63,43 @@ object CallerVisualAngleManager { val displayThreshold: Long //最大展示时长 > 0; 表示最长展示多长时间, -1 表示,一直展示,直到触发默认视角, 0: 默认视角专用值, } - private val beginLocation = AtomicReference() + private val triggerLocation = AtomicReference() - private val distanceOfCarToStopLine = AtomicReference() + private val distanceOfCarToStopLine = AtomicReference(0.0) + + private val travelled by lazy { AtomicReference(0.0) } private val listener = object : OnRoadListener { - private var roadId = "" + private val roadId = AtomicReference() + private val triggerRoadId = AtomicReference() override fun onRoadIdInfo(roadId: String) { - val oldRoadId = this.roadId - Log.d(TAG, "-- onRoadIdInfo --: prev: ${this.roadId} -> curr: $roadId") - val startLoc = beginLocation.get() - val currLoc = CallerMapLocationListenerManager.getCurrentLocation() + this.roadId.set(roadId) + Log.d(TAG, "-- onRoadIdInfo --: prev: ${this.triggerRoadId.get()} -> curr: $roadId") + val loc = CallerMapLocationListenerManager.getCurrentLocation() var triggerClose = false - val distance = distanceOfCarToStopLine.get() - if (hasCrossRoad && distance > 0 && oldRoadId != roadId && startLoc != null && currLoc != null && CoordinateUtils.calculateLineDistance(startLoc.longitude, startLoc.latitude, currLoc.longitude, currLoc.latitude).also { - Log.d(TAG, "d1: $it, d2: $distance") - } >= distance) { - distanceOfCarToStopLine.set(0.0) - hasCrossRoad = false - Log.d(TAG, "-- onRoadIdInfo --: trigger close --") - triggerClose = true - } - if (!triggerClose && hasCrossRoad && oldRoadId == roadId) { - val beginLoc = beginLocation.get() - val endLoc = CallerMapLocationListenerManager.getCurrentLocation() - if (beginLoc != null && endLoc != null && abs(beginLoc.bearing - endLoc.bearing) >= 170) { - Log.d(TAG, "-- onRoadIdInfo --: trigger close 2 --") - triggerClose = true + val distance = distanceOfCarToStopLine.get() + 5 + if (hasCrossRoad && distance > 0) { + val prev = triggerLocation.get() + if (prev != null && loc != null) { + travelled.set(MapTools.distance(loc.longitude, loc.latitude, prev.longitude, prev.latitude) + travelled.get()) + triggerLocation.set(loc) + } + val oldRoadId = triggerRoadId.get() + Log.d(TAG, "-- onRoadIdInfo --: travelled --: ${travelled.get()}") + if ((travelled.get() > distance) && oldRoadId != null && oldRoadId != roadId) { + distanceOfCarToStopLine.set(0.0) hasCrossRoad = false - beginLocation.set(null) + triggerRoadId.set(null) + travelled.set(0.0) + triggerLocation.set(null) + Log.d(TAG, "-- onRoadIdInfo --: trigger close --") + triggerClose = true } } if (triggerClose) { changeVisualAngle(CrossRoad(false)) } - this.roadId = roadId } @@ -106,8 +107,9 @@ object CallerVisualAngleManager { Log.d(TAG, "-- onStopLineInfo --: ${info.distanceOfCarToStopLine}") if (!hasCrossRoad && info.distanceOfCarToStopLine <= 30.0) { hasCrossRoad = true + triggerRoadId.set(this.roadId.get()) distanceOfCarToStopLine.set(info.distanceOfCarToStopLine) - beginLocation.set(CallerMapLocationListenerManager.getCurrentLocation()) + triggerLocation.set(CallerMapLocationListenerManager.getCurrentLocation()) changeVisualAngle(CrossRoad(true)) } } @@ -236,12 +238,11 @@ object CallerVisualAngleManager { } } - private val heap by lazy { + private val queue by lazy { PriorityQueue() } - @OptIn(InternalCoroutinesApi::class) - fun changeVisualAngle(scene: Scene) { + fun changeVisualAngle(current: Scene) { val appIdentityMode = FunctionBuildConfig.appIdentityMode if (AppIdentityModeUtils.isBus(appIdentityMode) && AppIdentityModeUtils.isPassenger(appIdentityMode)) { return @@ -252,87 +253,109 @@ object CallerVisualAngleManager { val displayed = getDisplayed() if (displayed == null) { Log.d("${M_DEVA}${TAG}", "--- 2 ---") - val top = getTop() //堆顶 - if (top != null) { - if (top.target.priority >= scene.priority) { - Log.d("${M_DEVA}${TAG}", "--- 3 ---") - top.triggerTime = triggerTime - doChangeAngle(top) - synchronized(heap){ - heap += Record(scene, triggerTime = -1) - } - } else { - Log.d("${M_DEVA}${TAG}", "--- 4 ---") - doChangeAngle(Record(scene, triggerTime = triggerTime)) + if (current is Turning) { + if (!current.open) { + changeVisualAngle(Default()) + return@launch } - } else { - Log.d("${M_DEVA}${TAG}", "--- 5 ---") - doChangeAngle(Record(scene, triggerTime = triggerTime)) } + if (current is CrossRoad) { + if (!current.open) { + changeVisualAngle(Default()) + return@launch + } + } + doRealVisualAngleChange(triggerTime, current, null) } else { val prev = displayed.target - Log.d("${M_DEVA}${TAG}", "--- 6 --- old: $prev -> cur: $scene") + Log.d("${M_DEVA}${TAG}", "--- 3 --- old: $prev -> cur: $current") val prevTriggerTime = displayed.triggerTime - if (scene !is Default && prev.priority >= scene.priority && (prev is RoadEvent || prev is TooClose)) { - + if (current !is Default && prev.priority > current.priority && (prev is RoadEvent || prev is TooClose)) { val displayDuration = triggerTime - prevTriggerTime - Log.d("${M_DEVA}${TAG}", "--- 7 ---:duration: $displayDuration") + Log.d("${M_DEVA}${TAG}", "--- 4 ---:场景[$prev], 已展示时长: duration: $displayDuration") if (displayDuration < prev.displayThreshold) { - Log.d("${M_DEVA}${TAG}", "--- 8 --- old: $prev -> cur: $scene") + Log.d("${M_DEVA}${TAG}", "--- 5 --- 场景[$prev]:仍在保护展示时长内,直接return") return@launch - } - } - if (prev.priority > scene.priority) { - Log.d("${M_DEVA}${TAG}", "--- 9 --- old: $prev -> cur: $scene") - if (prev.displayThreshold < 0) { - return@launch - } - } - if (scene is Turning) { - val isOpen = scene.open - if (!isOpen) { - Log.d("${M_DEVA}${TAG}", "--- 10 --- old: $prev -> cur: $scene") + } else { + Log.d("${M_DEVA}${TAG}", "--- 6 --- 场景[$prev]:已过保护展示时长,从展示的队列中移除,显示默认视角") + queue -= displayed changeVisualAngle(Default()) - heap -= displayed return@launch } } - if (scene is CrossRoad) { - val isOpen = scene.open + if (prev is Turning && current is Turning) { + val isOpen = current.open if (!isOpen) { - Log.d("${M_DEVA}${TAG}", "--- 11 --- old: $prev -> cur: $scene") + Log.d("${M_DEVA}${TAG}", "--- 7 --- 场景[$current], 收到关闭通知") + queue -= displayed + changeVisualAngle(Default()) + return@launch + } + } + if (prev is CrossRoad && current is CrossRoad) { + val isOpen = current.open + if (!isOpen) { + Log.d("${M_DEVA}${TAG}", "--- 8 --- old: $prev -> cur: $current") + queue -= displayed changeVisualAngle(Default()) - heap -= displayed return@launch } } - if (scene is Default) { - Log.d("${M_DEVA}${TAG}", "--- 12 ---") - defaultDelayJob?.safeCancel() - launch { - val delay = scene.unit.toMillis(scene.delay) - Log.d("${M_DEVA}${TAG}", "--- 13 ---") - delay(delay) - Log.d("${M_DEVA}${TAG}", "--- 14 ---") - doChangeAngle(Record(scene, triggerTime = triggerTime)) - heap -= displayed - }.also { itx -> - itx.invokeOnCompletion { - if (it is CancellationException) { - Log.d("${M_DEVA}${TAG}", "--- 15 ---") - } - } - defaultDelayJob = itx - } - } else { - Log.d("${M_DEVA}${TAG}", "--- 16 ---") - defaultDelayJob?.safeCancel() - if (displayed.target.priority < scene.priority) { - Log.d("${M_DEVA}${TAG}", "--- 17 ---") - doChangeAngle(Record(scene, triggerTime = triggerTime)) + if (prev.priority > current.priority && prev.displayThreshold < 0) { + Log.d("${M_DEVA}${TAG}", "--- 6 --- 场景[$prev]正在展示,尚未收到关闭,场景,依然展示当前场景,直接return") + return@launch + } + doRealVisualAngleChange(triggerTime, current, displayed) + } + } + } + + private fun CoroutineScope.doRealVisualAngleChange(triggerTime: Long, target: Scene, displayed: Record? = null) { + if (target is Default) { + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 1 ---") + displayed?.also { + queue -= it + } + defaultDelayJob?.safeCancel() + launch { + val delay = target.unit.toMillis(target.delay) + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 2 ---") + delay(delay) + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 3 ---") + doChangeAngle(Record(target, triggerTime = triggerTime)) + }.also { itx -> + itx.invokeOnCompletion { + if (it is CancellationException) { + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 4 ---") } } + defaultDelayJob = itx + } + } else { + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 5 ---") + defaultDelayJob?.safeCancel() + if (displayed == null || displayed.target.priority <= target.priority) { + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 6 ---") + displayed?.also { + queue -= it + } + if (target is Turning) { + if (!target.open) { + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 7 ---") + changeVisualAngle(Default()) + return + } + } + if (target is CrossRoad) { + if (!target.open) { + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 8 ---") + changeVisualAngle(Default()) + return + } + } + Log.d("${M_DEVA}${TAG}", "--- doRealVisualAngleChange --- 10 ---") + doChangeAngle(Record(target, triggerTime = triggerTime)) } } } @@ -344,8 +367,8 @@ object CallerVisualAngleManager { Log.d("${M_DEVA}${TAG}", "--- doChangeAngle ---: ${record.target}") if (record.target !is Default) { record.isDisplay = true - synchronized(heap) { - heap += record + synchronized(queue) { + queue += record } } it.changeMapVisualAngle(angle, null) @@ -356,8 +379,6 @@ object CallerVisualAngleManager { * 是否有正在展示的 */ @Synchronized - private fun getDisplayed() = heap.find { it.isDisplay } + private fun getDisplayed() = queue.firstOrNull() - @Synchronized - private fun getTop() = heap.firstOrNull() } \ No newline at end of file diff --git a/core/mogo-core-res/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up2_white.png b/core/mogo-core-res/src/main/res/drawable-xhdpi/icon_map_marker_road_block_up2_white.png old mode 100755 new mode 100644 diff --git a/core/mogo-core-res/src/main/res/drawable-xhdpi/icon_map_marker_road_check2_white.png b/core/mogo-core-res/src/main/res/drawable-xhdpi/icon_map_marker_road_check2_white.png old mode 100755 new mode 100644 diff --git a/core/mogo-core-res/src/main/res/drawable-xhdpi/module_common_icon_map_marker_road_block_up2_white.png b/core/mogo-core-res/src/main/res/drawable-xhdpi/module_common_icon_map_marker_road_block_up2_white.png old mode 100644 new mode 100755 diff --git a/core/mogo-core-res/src/main/res/drawable-xhdpi/module_common_icon_map_marker_road_check2_white.png b/core/mogo-core-res/src/main/res/drawable-xhdpi/module_common_icon_map_marker_road_check2_white.png old mode 100644 new mode 100755 diff --git a/core/mogo-core-res/src/main/res/raw/xiaobache.nt3d b/core/mogo-core-res/src/main/res/raw/xiaobache.nt3d index baec2168db..909f474514 100644 Binary files a/core/mogo-core-res/src/main/res/raw/xiaobache.nt3d and b/core/mogo-core-res/src/main/res/raw/xiaobache.nt3d differ diff --git a/gradle.properties b/gradle.properties index c988265d02..e36cf509ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.3.27 MOGO_TELEMATIC_VERSION=1.4.3.27 ######## MogoAiCloudSDK Version ######## # 自研地图 -MAP_SDK_VERSION=2.8.0.9 +MAP_SDK_VERSION=2.8.0.11 MAP_SDK_OPERATION_VERSION=1.1.4.1 # websocket WEBSOCKET_VERSION=1.1.7 diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java index a9866d4f6e..b063d1edee 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/AMapViewWrapper.java @@ -649,8 +649,8 @@ public class AMapViewWrapper implements IMogoMapView, /** * 设置转向灯和刹车灯 * - * @param type :车尾灯类型 time: 闪烁时间 最小500ms 小于500ms 默认为500ms - * @param time + * @param type :车尾灯类型 + * @param time 闪烁时间 最小500ms 小于500ms 默认为500ms */ @Override public void setCarLightsType(int type, int time) { diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/CustomMapApiBuilder.java b/libraries/mogo-map/src/main/java/com/mogo/map/CustomMapApiBuilder.java index b7f5d84f1e..16cea92e99 100644 --- a/libraries/mogo-map/src/main/java/com/mogo/map/CustomMapApiBuilder.java +++ b/libraries/mogo-map/src/main/java/com/mogo/map/CustomMapApiBuilder.java @@ -5,6 +5,7 @@ import android.util.Log; import com.alibaba.android.arouter.facade.annotation.Route; import com.mogo.eagle.core.data.config.FunctionBuildConfig; +import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; import com.mogo.map.location.ALocationClient; import com.mogo.map.location.IMogoLocationClient; @@ -81,6 +82,10 @@ public class CustomMapApiBuilder implements IMogoMapApiBuilder { //.setPointToCenter(0.5f, 0.5f) // 根据 FunctionBuildConfig 配置的皮肤样式设置题图的样式 .setStyleMode(FunctionBuildConfig.skinMode == 0 ? MapParams.MAP_STYLE_NIGHT_VR : MapParams.MAP_STYLE_DAY_VR); + //todo 临时放在这 + if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){ + mapParams.setShadowEnable(false); + } MapAutoApi.INSTANCE.init(context, mapParams); MapAutoView mapAutoView = new MapAutoView(context);