Don't calculate velocity for tracks <= 1 second.
This commit is contained in:
parent
3b36cc6c85
commit
d555590d1f
1 changed files with 4 additions and 1 deletions
|
@ -182,7 +182,10 @@ data class TrackStatistics(
|
|||
if (first != null && last != null)
|
||||
{
|
||||
duration = last.time - first.time
|
||||
velocity = distance / (duration / 1000)
|
||||
if (duration > 1000)
|
||||
{
|
||||
velocity = distance / (duration / 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue