Private
Public Access
1
0

sort of works

This commit is contained in:
Sander Roosendaal
2018-06-25 18:59:47 +02:00
parent 90dcb2f4f9
commit b313726478
3 changed files with 5 additions and 11 deletions

View File

@@ -1030,8 +1030,6 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
p2 = p.fillna(method='ffill').apply(lambda x: timedeltaconv(x))
print p
try:
drivespeed = drivelength/rowdatadf[' DriveTime (ms)']*1.0e3
except KeyError:

View File

@@ -148,10 +148,6 @@ def get_strava_workout_list(user):
def add_stroke_data(user,stravaid,workoutid,startdatetime,csvfilename):
r = Rower.objects.get(user=user)
print 'Queueing job for workout {workoutid} (strava {stravaid})'.format(
workoutid=workoutid,
stravaid=stravaid)
starttimeunix = arrow.get(startdatetime).timestamp
job = myqueue(queue,
@@ -184,7 +180,7 @@ def get_strava_workouts(rower):
])
newids = [stravaid for stravaid in stravaids if not stravaid in knownstravaids]
for stravaid in newids[:1]:
for stravaid in newids:
workoutid = create_async_workout(alldata,rower.user,stravaid)
return 1

View File

@@ -167,15 +167,15 @@ def handle_strava_import_stroke_data(stravatoken,
nr_strokes = len(t)
df = pd.DataFrame({'TimeStamp (sec)':unixtime,
' ElapsedTime (sec)':10*t,
' Horizontal (meters)':10*d,
' Stroke500mPace (sec/500m)':10*pace,
' ElapsedTime (sec)':t,
' Horizontal (meters)':d,
' Stroke500mPace (sec/500m)':pace,
' Cadence (stokes/min)':spm,
' HRCur (bpm)':hr,
' latitude':lat,
' longitude':lon,
' StrokeDistance (meters)':strokelength,
'cum_dist':10*d,
'cum_dist':d,
' DragFactor':np.zeros(nr_strokes),
' DriveLength (meters)':np.zeros(nr_strokes),
' StrokeDistance (meters)':np.zeros(nr_strokes),