Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7f63cf1464
1 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
|
||||
package net.osmand.plus;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
|
@ -305,9 +306,9 @@ public class GPXUtilities {
|
|||
// 5. Max speed and Average speed, if any. Average speed is NOT overall (effective) speed, but only calculated for "moving" periods.
|
||||
if(speedCount > 0) {
|
||||
if(timeMoving > 0){
|
||||
avgSpeed = (float) (totalDistanceMoving / timeMoving * 1000);
|
||||
avgSpeed = (float)totalDistanceMoving / (float)timeMoving * 1000;
|
||||
} else {
|
||||
avgSpeed = (float) (totalSpeedSum / speedCount);
|
||||
avgSpeed = (float)totalSpeedSum / (float)speedCount;
|
||||
}
|
||||
} else {
|
||||
avgSpeed = -1;
|
||||
|
|
Loading…
Reference in a new issue