lib/hrmparser/workout.rb in teich-hrmparser-0.4.7 vs lib/hrmparser/workout.rb in teich-hrmparser-0.4.8
- old
+ new
@@ -29,10 +29,10 @@
gain = 0
smoothed_altitude = altitudes.compact.smoothed(10)
start = smoothed_altitude.first
smoothed_altitude.each do |alt|
diff = alt - start
- if (diff > 0)
+ if (diff > 0.5)
gain += diff
end
start = alt
end
@altitude_gain = gain == 0.0 ? nil : gain
\ No newline at end of file