添加经纬度纠偏逻辑,但是仅简单甄别问题点,无法纠正
This commit is contained in:
@@ -3,6 +3,8 @@ package com.mogo.module.common.entity;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 云端定位信息和自车定位信息
|
||||
*
|
||||
@@ -17,7 +19,17 @@ public class CloudLocationInfo implements Parcelable {
|
||||
private double alt;
|
||||
private double speed;
|
||||
|
||||
public CloudLocationInfo(){
|
||||
public CloudLocationInfo() {
|
||||
}
|
||||
|
||||
public CloudLocationInfo(CloudLocationInfo info) {
|
||||
this.lat = info.getLat();
|
||||
this.lon = info.getLon();
|
||||
this.heading = info.getHeading();
|
||||
this.systemTime = System.currentTimeMillis();
|
||||
this.satelliteTime = System.currentTimeMillis();
|
||||
this.alt = info.alt;
|
||||
this.speed = info.speed;
|
||||
}
|
||||
|
||||
protected CloudLocationInfo(Parcel in) {
|
||||
@@ -126,4 +138,27 @@ public class CloudLocationInfo implements Parcelable {
|
||||
", speed=" + speed +
|
||||
'}';
|
||||
}
|
||||
|
||||
public String print() {
|
||||
return "CloudLocation{ lon: " + lon + " lat: " + lat + " heading: " + heading + " speed: "
|
||||
+ speed+"}";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
CloudLocationInfo that = (CloudLocationInfo) o;
|
||||
return Double.compare(that.lat, lat) == 0 &&
|
||||
Double.compare(that.lon, lon) == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(lat, lon);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user