This commit is contained in:
Dennis Guse
2020-01-05 18:52:15 +01:00
parent b5bf3aadc5
commit f16d59bff6
3 changed files with 31 additions and 22 deletions
@@ -21,6 +21,7 @@ import android.util.Log;
import androidx.annotation.VisibleForTesting;
import de.dennisguse.opentracks.content.provider.TrackPointIterator;
import de.dennisguse.opentracks.util.LocationUtils;
import static de.dennisguse.opentracks.services.TrackRecordingService.MAX_NO_MOVEMENT_SPEED;
@@ -178,6 +179,13 @@ public class TripStatisticsUpdater {
lastMovingLocation = location;
}
public void addLocation(TrackPointIterator iterator, int minRecordingDistance) {
while (iterator.hasNext()) {
Location location = iterator.next();
addLocation(location, minRecordingDistance);
}
}
/**
* Gets the smoothed elevation over several readings.
* The elevation readings is noisy so the smoothed elevation is better than the raw elevation for many tasks.