Private
Public Access
1
0

bike erg import from C2 log

This commit is contained in:
Sander Roosendaal
2018-08-29 09:46:46 +02:00
parent 10e989d32d
commit cadc5d5e0d
4 changed files with 19 additions and 7 deletions

View File

@@ -205,7 +205,7 @@ def create_c2_stroke_data_db(
# Saves C2 stroke data to CSV and database
def add_c2_stroke_data_db(strokedata,workoutid,starttimeunix,csvfilename,
debug=False):
debug=False,workouttype='rower'):
res = make_cumvalues(0.1*strokedata['t'])
cum_time = res[0]
@@ -246,7 +246,10 @@ def add_c2_stroke_data_db(strokedata,workoutid,starttimeunix,csvfilename,
pace = pace.replace(0,300)
velo = 500./pace
if workouttype == 'bike':
velo = 1000./pace
# This may be wrong for the bike erg
power = 2.8*velo**3
# save csv