forked from upstream-mirrors/OpenTracks
Bugfix: TrackStatisticsUpdater was computing distance incorrectly.
While using a cycling speed and distance sensor, the updater was not using the distance from the most recent trackpoint but rather the one considered last moving. Fixes #762.
This commit is contained in:
@@ -159,7 +159,7 @@ public class TrackStatisticsUpdater {
|
||||
|
||||
if (!trackPoint.hasSensorDistance()) {
|
||||
// GPS-based distance/speed
|
||||
Distance movingDistance = lastMovingTrackPoint.distanceToPrevious(trackPoint);
|
||||
Distance movingDistance = trackPoint.distanceToPrevious(lastMovingTrackPoint);
|
||||
if (movingDistance.lessThan(minGPSDistance) && !trackPoint.isMoving()) {
|
||||
speedBuffer_mps.reset();
|
||||
lastTrackPoint = trackPoint;
|
||||
|
||||
Reference in New Issue
Block a user