Private
Public Access
1
0

Merge branch 'feature/addvelo' into develop

This commit is contained in:
Sander Roosendaal
2018-05-17 13:38:16 +02:00
3 changed files with 15 additions and 0 deletions

View File

@@ -94,6 +94,7 @@ if settings.DEBUG or user == '':
columndict = {
'time': 'TimeStamp (sec)',
'hr': ' HRCur (bpm)',
'velo': ' AverageBoatSpeed (m/s)',
'pace': ' Stroke500mPace (sec/500m)',
'spm': ' Cadence (stokes/min)',
'power': ' Power (watts)',
@@ -2039,6 +2040,7 @@ def dataprep(rowdatadf, id=0, bands=True, barchart=True, otwpower=True,
rowdatadf.loc[row_index, ' Stroke500mPace (sec/500m)'] = 3000.
p = rowdatadf.ix[:, ' Stroke500mPace (sec/500m)']
velo = rowdatadf.ix[:,' AverageBoatSpeed (m/s)']
hr = rowdatadf.ix[:, ' HRCur (bpm)']
spm = rowdatadf.ix[:, ' Cadence (stokes/min)']
cumdist = rowdatadf.ix[:, 'cum_dist']
@@ -2113,6 +2115,7 @@ def dataprep(rowdatadf, id=0, bands=True, barchart=True, otwpower=True,
hr=hr,
pace=p * 1e3,
spm=spm,
velo=velo,
cumdist=cumdist,
ftime=niceformat(t2),
fpace=nicepaceformat(p2),

View File

@@ -59,6 +59,7 @@ database_url_debug = 'sqlite:///'+database_name_dev
columndict = {
'time':'TimeStamp (sec)',
'hr':' HRCur (bpm)',
'velo': ' AverageBoatSpeed (m/s)',
'pace':' Stroke500mPace (sec/500m)',
'spm':' Cadence (stokes/min)',
'power':' Power (watts)',
@@ -977,6 +978,7 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
rowdatadf.loc[row_index,' Stroke500mPace (sec/500m)'] = 3000.
p = rowdatadf.ix[:,' Stroke500mPace (sec/500m)']
velo = rowdatadf.ix[:,' AverageBoatSpeed (m/s)']
hr = rowdatadf.ix[:,' HRCur (bpm)']
spm = rowdatadf.ix[:,' Cadence (stokes/min)']
cumdist = rowdatadf.ix[:,'cum_dist']
@@ -1060,6 +1062,7 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
cumdist = cumdist,
ftime = niceformat(t2),
fpace = nicepaceformat(p2),
velo=velo,
driveenergy=driveenergy,
distanceperstroke=distanceperstroke,
power=power,

View File

@@ -68,6 +68,15 @@ rowingmetrics = (
'mode':'both',
'type': 'basic'}),
('velo',{
'numtype':'float',
'null':True,
'verbose_name': 'Boat Speed (m/s)',
'ax_min': 0,
'ax_max': 8,
'mode':'both',
'type':'pro'}),
('spm',{
'numtype':'float',
'null':True,