From 7a90ae8a528074dcc92e1d4f404dcc23fb1a35c0 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Tue, 14 Mar 2023 18:19:56 +0800 Subject: [PATCH] =?UTF-8?q?[sweeper]=20[=E8=BD=A8=E8=BF=B9=E7=82=B9?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E6=94=B9=E4=B8=BA=E5=88=A4=E6=96=ADpoints?= =?UTF-8?q?=E6=9C=80=E5=90=8E=E4=B8=80=E4=B8=AA=E7=82=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/och/sweeper/model/SweeperTaskModel.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperTaskModel.java b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperTaskModel.java index 830675e8b4..0fdd1e9515 100644 --- a/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperTaskModel.java +++ b/OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/model/SweeperTaskModel.java @@ -104,10 +104,6 @@ public class SweeperTaskModel { //自动驾驶状态 private int mAutopilotState = IMoGoAutopilotStatusListener.STATUS_AUTOPILOT_DISABLE; - private String longitude;//经度 - - private String latitude;//纬度 - public static SweeperTaskModel getInstance() { if (sInstance == null) { synchronized (SweeperTaskModel.class) { @@ -337,10 +333,12 @@ public class SweeperTaskModel { private void addCoordinates(MogoLocation mogoLatLng) { String tempLongitude = NumberFormatUtil.cutOutNumber(mogoLatLng.getLongitude(), 5); String tempLatitude = NumberFormatUtil.cutOutNumber(mogoLatLng.getLatitude(), 5); + + String latitude = NumberFormatUtil.cutOutNumber(points.get(points.size()-1).latitude, 5); + String longitude = NumberFormatUtil.cutOutNumber(points.get(points.size()-1).longitude, 5); + //用于过滤车是否停在原地,经纬度相同的情况 if (!tempLongitude.equals(longitude) && !tempLatitude.equals(latitude)) { - latitude = NumberFormatUtil.cutOutNumber(mogoLatLng.getLatitude(), 5); - longitude = NumberFormatUtil.cutOutNumber(mogoLatLng.getLongitude(), 5); SweeperRoutePlanningUpdateReqBean.Result result = new SweeperRoutePlanningUpdateReqBean.Result(); result.latitude = mogoLatLng.getLatitude(); result.longitude = mogoLatLng.getLongitude();