[sweeper]
[轨迹点过滤改为判断points最后一个点]
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user