forked from upstream-mirrors/OpenTracks
TrackRecordingService: compute temporary TrackStatistics for UI.
Fixes #810.
This commit is contained in:
@@ -48,7 +48,9 @@ public class TrackPoint {
|
||||
|
||||
private TrackPoint.Id id;
|
||||
|
||||
@NonNull
|
||||
private Instant time;
|
||||
|
||||
private Double latitude;
|
||||
private Double longitude;
|
||||
private Float accuracy;
|
||||
@@ -96,10 +98,16 @@ public class TrackPoint {
|
||||
|
||||
public TrackPoint(@NonNull Type type) {
|
||||
this.type = type;
|
||||
this.time = Instant.now(); //TODO This may result in #800
|
||||
}
|
||||
|
||||
public TrackPoint(@NonNull Type type, Instant time) {
|
||||
this(type);
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public TrackPoint(@NonNull Location location) {
|
||||
this(Type.TRACKPOINT, location, Instant.now());
|
||||
this(Type.TRACKPOINT, location, Instant.now()); //TODO This may result in #800
|
||||
}
|
||||
|
||||
public TrackPoint(@NonNull Type type, @NonNull Location location, @NonNull Instant time) {
|
||||
@@ -116,11 +124,6 @@ public class TrackPoint {
|
||||
setTime(time);
|
||||
}
|
||||
|
||||
public TrackPoint(@NonNull Type type, Instant time) {
|
||||
this(type);
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public TrackPoint(double latitude, double longitude, Altitude altitude, Instant time) {
|
||||
this(Type.TRACKPOINT);
|
||||
this.latitude = latitude;
|
||||
|
||||
Reference in New Issue
Block a user