Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…of the trip distance)"

This reverts commit 7dd9fdc.
  • Loading branch information...
commit 6ea626a451389244e8bf6da262bc0d2cbdd30efb 1 parent 7dd9fdc
@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 / totalDistance points
+meanJourneySpeed points = journeyDistance points / fromIntegral (length points)
-- | Calculates the maximum speed
maxSpeed :: [WptType] -> Speed
Please sign in to comment.
Something went wrong with that request. Please try again.