Skip to content
Browse files

Revert "Fix meanJourneySpeed (was using the number of points instead …

…of the trip distance)"

This reverts commit 7dd9fdc.
  • Loading branch information...
1 parent 7dd9fdc commit 6ea626a451389244e8bf6da262bc0d2cbdd30efb @TomMD TomMD committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 Data/GPS/Gps2HtmlReport/JourneyStats.hs
View
2 Data/GPS/Gps2HtmlReport/JourneyStats.hs
@@ -58,7 +58,7 @@ journeyDistance (point:points) = distance point (head points) + journeyDistance
-- | Calculates the average speed of the journey
meanJourneySpeed :: (Lat a, Lon a) => [a] -> Distance
-meanJourneySpeed points = journeyDistance points / totalDistance points
+meanJourneySpeed points = journeyDistance points / fromIntegral (length points)
-- | Calculates the maximum speed
maxSpeed :: [WptType] -> Speed

0 comments on commit 6ea626a

Please sign in to comment.
Something went wrong with that request. Please try again.