Private
Public Access
1
0

added map with moving marker

This commit is contained in:
Sander Roosendaal
2019-11-05 10:37:14 +01:00
parent 2468fcb909
commit 7ef38de539
4 changed files with 189 additions and 5 deletions

View File

@@ -19,6 +19,20 @@ def workout_video_view(request,id=0):
df2 = df.resample('1s').mean().interpolate()
boatspeed = df2['velo']
coordinates = dataprep.get_latlon_time(w.id)
coordinates.set_index(pd.to_timedelta(coordinates['time'],unit='s'),inplace=True)
coordinates = coordinates.resample('1s').mean().interpolate()
latitude = coordinates['latitude']
longitude = coordinates['longitude']
# create map
mapscript, mapdiv = leaflet_chart_video(latitude,longitude,
w.name)
# bundle data
data = {'boatspeed':boatspeed.values,
'latitude':latitude.values,
'longitude':longitude.values}
return render(request,
'embedded_video.html',
@@ -26,6 +40,10 @@ def workout_video_view(request,id=0):
'workout':w,
'rower':request.user.rower,
'boatspeed': boatspeed.values,
'latitude': latitude.values,
'longitude': longitude.values,
'mapscript': mapscript,
'mapdiv': mapdiv,
})
# Show the EMpower Oarlock generated Stroke Profile