Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…rip distance)
  • Loading branch information...
commit 7dd9fdcb4ad7f3b16b7e45fb6ff8d5789082a2c6 1 parent 4d1a9b9
@TomMD TomMD authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.