296 lines
6.5 KiB
Python
296 lines
6.5 KiB
Python
from utils import lbstoN
|
|
|
|
rowingmetrics = (
|
|
('time',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Time',
|
|
'ax_min': 0,
|
|
'ax_max': 1e5,
|
|
'mode':'both',
|
|
'type': 'basic'}),
|
|
|
|
('hr',{
|
|
'numtype':'integer',
|
|
'null':True,
|
|
'verbose_name': 'Heart Rate (bpm)',
|
|
'ax_min': 100,
|
|
'ax_max': 200,
|
|
'mode':'both',
|
|
'type': 'basic'}),
|
|
|
|
('pace',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Pace (/500m)',
|
|
'ax_min': 1.0e3*210,
|
|
'ax_max': 1.0e3*75,
|
|
'mode':'both',
|
|
'type': 'basic'}),
|
|
|
|
('spm',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Stroke Rate (spm)',
|
|
'ax_min': 15,
|
|
'ax_max': 45,
|
|
'mode':'both',
|
|
'type': 'basic'}),
|
|
|
|
('driveenergy',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Work Per Stroke (J)',
|
|
'ax_min': 0,
|
|
'ax_max': 1000,
|
|
'mode':'both',
|
|
'type': 'pro'}),
|
|
|
|
('power',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Power (W)',
|
|
'ax_min': 0,
|
|
'ax_max': 600,
|
|
'mode':'both',
|
|
'type': 'basic'}),
|
|
|
|
('averageforce',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Average Drive Force (N)',
|
|
'ax_min': 0,
|
|
'ax_max': 900,
|
|
'mode':'both',
|
|
'type': 'pro'}),
|
|
|
|
('peakforce',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Peak Drive Force (N)',
|
|
'ax_min': 0,
|
|
'ax_max': 900,
|
|
'mode':'both',
|
|
'type': 'pro'}),
|
|
|
|
('drivelength',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Drive Length (m)',
|
|
'ax_min': 0,
|
|
'ax_max': 2.5,
|
|
'mode':'both',
|
|
'type': 'pro'}),
|
|
|
|
('forceratio',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Average/Peak Force Ratio',
|
|
'ax_min': 0,
|
|
'ax_max': 1,
|
|
'mode':'both',
|
|
'type': 'pro'}),
|
|
|
|
('distance',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Distance (m)',
|
|
'ax_min': 0,
|
|
'ax_max': 1e5,
|
|
'mode':'both',
|
|
'type': 'basic'}),
|
|
|
|
('cumdist',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Cumulative Distance (m)',
|
|
'ax_min': 0,
|
|
'ax_max': 1e5,
|
|
'mode':'both',
|
|
'type': 'basic'}),
|
|
|
|
('drivespeed',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Drive Speed (m/s)',
|
|
'ax_min': 0,
|
|
'ax_max': 4,
|
|
'default': 0,
|
|
'mode':'both',
|
|
'type': 'pro'}),
|
|
|
|
('catch',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Catch Angle (degrees)',
|
|
'ax_min': -40,
|
|
'ax_max': -75,
|
|
'default': 0,
|
|
'mode':'water',
|
|
'type': 'pro'}),
|
|
|
|
('slip',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Slip (degrees)',
|
|
'ax_min': 0,
|
|
'ax_max': 20,
|
|
'default': 0,
|
|
'mode':'water',
|
|
'type': 'pro'}),
|
|
|
|
('finish',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Finish Angle (degrees)',
|
|
'ax_min': 20,
|
|
'ax_max': 55,
|
|
'default': 0,
|
|
'mode':'water',
|
|
'type': 'pro'}),
|
|
|
|
('wash',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Wash (degrees)',
|
|
'ax_min': 0,
|
|
'ax_max': 30,
|
|
'default': 0,
|
|
'mode':'water',
|
|
'type': 'pro'}),
|
|
|
|
('peakforceangle',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Peak Force Angle',
|
|
'ax_min': -20,
|
|
'ax_max': 20,
|
|
'default': 0,
|
|
'mode':'water',
|
|
'type': 'pro'}),
|
|
|
|
|
|
('totalangle',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Drive Length (deg)',
|
|
'ax_min': 40,
|
|
'ax_max': 140,
|
|
'default': 0,
|
|
'mode':'water',
|
|
'type': 'pro'}),
|
|
|
|
|
|
('effectiveangle',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Effective Drive Length (deg)',
|
|
'ax_min': 40,
|
|
'ax_max': 140,
|
|
'default': 0,
|
|
'mode':'water',
|
|
'type': 'pro'}),
|
|
|
|
('rhythm',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Stroke Rhythm',
|
|
'ax_min': 20,
|
|
'ax_max': 55,
|
|
'default': 1.0,
|
|
'mode':'erg',
|
|
'type': 'pro'}),
|
|
|
|
('efficiency',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'OTW Efficiency (%)',
|
|
'ax_min': 0,
|
|
'ax_max': 110,
|
|
'default': 0,
|
|
'mode':'water',
|
|
'type': 'pro'}),
|
|
|
|
('distanceperstroke',{
|
|
'numtype':'float',
|
|
'null':True,
|
|
'verbose_name': 'Distance per Stroke (m)',
|
|
'ax_min': 0,
|
|
'ax_max': 15,
|
|
'default': 0,
|
|
'mode':'both',
|
|
'type': 'basic'}),
|
|
|
|
)
|
|
|
|
|
|
|
|
axesnew = [
|
|
(name,d['verbose_name'],d['ax_min'],d['ax_max'],d['type']) for name,d in rowingmetrics
|
|
]
|
|
|
|
axes = tuple(axesnew+[('None','None',0,1,'basic')])
|
|
|
|
axlabels = {ax[0]:ax[1] for ax in axes}
|
|
|
|
yaxminima = {ax[0]:ax[2] for ax in axes}
|
|
|
|
yaxmaxima = {ax[0]:ax[3] for ax in axes}
|
|
|
|
defaultfavoritecharts = (
|
|
{
|
|
'yparam1':'pace',
|
|
'yparam2':'spm',
|
|
'xparam':'time',
|
|
'plottype':'line',
|
|
'workouttype':'both',
|
|
'reststrokes':True,
|
|
'notes':'Some Notes 1',
|
|
},
|
|
{
|
|
'yparam1':'pace',
|
|
'yparam2':'hr',
|
|
'xparam':'time',
|
|
'plottype':'line',
|
|
'workouttype':'both',
|
|
'reststrokes':True,
|
|
'notes':'Some Notes 2',
|
|
},
|
|
{
|
|
'yparam1':'distanceperstroke',
|
|
'yparam2':'hr',
|
|
'xparam':'time',
|
|
'plottype':'line',
|
|
'workouttype':'otw',
|
|
'reststrokes':True,
|
|
'notes':'Some Notes 3',
|
|
},
|
|
{
|
|
'yparam1':'strokeenergy',
|
|
'yparam2':'hr',
|
|
'xparam':'time',
|
|
'plottype':'line',
|
|
'workouttype':'ote',
|
|
'reststrokes':True,
|
|
'notes':'Some Notes 3',
|
|
},
|
|
{
|
|
'yparam1':'distanceperstroke',
|
|
'yparam2':'None',
|
|
'xparam':'spm',
|
|
'plottype':'line',
|
|
'workouttype':'otw',
|
|
'reststrokes':True,
|
|
'notes':'Some Notes 4',
|
|
},
|
|
{
|
|
'yparam1':'strokeenergy',
|
|
'yparam2':'None',
|
|
'xparam':'spm',
|
|
'plottype':'line',
|
|
'workouttype':'ote',
|
|
'reststrokes':True,
|
|
'notes':'Some Notes 4',
|
|
},
|
|
)
|