Skip to content
Browse files

Fix meanJourneySpeed (was using the number of points instead of the t…

…rip distance)
  • Loading branch information...
1 parent 4d1a9b9 commit 7dd9fdcb4ad7f3b16b7e45fb6ff8d5789082a2c6 @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 / fromIntegral (length points)
+meanJourneySpeed points = journeyDistance points / totalDistance points
-- | Calculates the maximum speed
maxSpeed :: [WptType] -> Speed

0 comments on commit 7dd9fdc

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