sanitiy check: do not add 0.0 altitudes - from locations, that do no have an altitude value - to the elevation calculation
This commit is contained in:
parent
7b1b518892
commit
3c680042de
1 changed files with 2 additions and 1 deletions
|
@ -531,7 +531,8 @@ class TrackerService: Service(), CoroutineScope, SensorEventListener {
|
||||||
// store previous smoothed altitude
|
// store previous smoothed altitude
|
||||||
val previousAltitude: Double = altitudeValues.getAverage()
|
val previousAltitude: Double = altitudeValues.getAverage()
|
||||||
// put current altitude into queue
|
// put current altitude into queue
|
||||||
altitudeValues.add(currentBestLocation.altitude)
|
val currentBestLocationAltitude: Double = currentBestLocation.altitude
|
||||||
|
if (currentBestLocationAltitude != Keys.DEFAULT_ALTITUDE) altitudeValues.add(currentBestLocationAltitude)
|
||||||
|
|
||||||
// TODO remove
|
// TODO remove
|
||||||
// uncomment to use test altitude values - useful if testing wirth an emulator
|
// uncomment to use test altitude values - useful if testing wirth an emulator
|
||||||
|
|
Loading…
Reference in a new issue