summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2016-01-26 21:30:15 +0100
committerChris Schlaeger <chris@linux.com>2016-01-26 21:30:15 +0100
commitad10d7bc12eb171ebbb4b8acb8f06288df6bd877 (patch)
tree061a791f46092f3c71ad3bacca4292732d9fd796 /lib
parentfcb1cdaeb1c08d0e531ed8763780276bd2700b92 (diff)
downloadpostrunner-ad10d7bc12eb171ebbb4b8acb8f06288df6bd877.zip
Showing METmax derived VO2max instead of the event log based VO2max value.
Diffstat (limited to 'lib')
-rw-r--r--lib/postrunner/ActivitySummary.rb3
-rw-r--r--lib/postrunner/UserProfileView.rb4
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/postrunner/ActivitySummary.rb b/lib/postrunner/ActivitySummary.rb
index 12802ed..89778ea 100644
--- a/lib/postrunner/ActivitySummary.rb
+++ b/lib/postrunner/ActivitySummary.rb
@@ -125,9 +125,6 @@ module PostRunner
t.row([ 'Suggested Recovery Time:',
rec_time ? secsToDHMS(rec_time * 60) : '-' ])
- vo2max = @fit_activity.vo2max
- t.row([ 'VO2max:', vo2max ? vo2max : '-' ])
-
hrv = HRV_Analyzer.new(@fit_activity)
if hrv.has_hrv_data?
t.row([ 'HRV Score:', "%.1f" % hrv.lnrmssdx20_1sigma ])
diff --git a/lib/postrunner/UserProfileView.rb b/lib/postrunner/UserProfileView.rb
index c89216b..6f009d0 100644
--- a/lib/postrunner/UserProfileView.rb
+++ b/lib/postrunner/UserProfileView.rb
@@ -57,6 +57,10 @@ module PostRunner
if profile.activity_class
t.row([ 'Activity Class:', profile.activity_class ])
end
+ if profile.metmax
+ t.row([ 'METmax:', "#{profile.metmax} MET" ])
+ t.row([ 'VO2max:', "#{'%.1f' % (profile.metmax * 3.5)} ml/kg/min" ])
+ end
t
end