sort of works
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user