small improvement coordinates
This commit is contained in:
@@ -53,7 +53,7 @@ class FlexibleDecimalField(forms.DecimalField):
|
||||
|
||||
# Video Analysis creation form
|
||||
class VideoAnalysisCreateForm(forms.Form):
|
||||
name = forms.CharField(max_length=255,label='')
|
||||
name = forms.CharField(max_length=255,label='Analysis Name')
|
||||
url = forms.CharField(max_length=255,required=True,label='YouTube Video URL')
|
||||
delay = forms.IntegerField(initial=0,label='Delay (seconds)')
|
||||
|
||||
|
||||
@@ -74,6 +74,11 @@
|
||||
<i class="fas fa-map-marked-alt fa-fw"></i> Map
|
||||
</a>
|
||||
</li>
|
||||
<li id="video-analysis">
|
||||
<a href="/rowers/workout/{{ workout.id|encode }}/video/">
|
||||
<i class="fas fa-video-plus fa-fw"></i> Video Analysis
|
||||
</a>
|
||||
</li>
|
||||
<li id="chart-empower">
|
||||
<a href="/rowers/workout/{{ workout.id|encode }}/forcecurve/">
|
||||
<i class="fas fa-dumbbell fa-fw"></i> Force Curve
|
||||
@@ -106,7 +111,7 @@
|
||||
<a href="/rowers/workout/{{ workout.id|encode }}/addstatic/13/">
|
||||
<i class="far fa-chart-pie fa-fw"></i> Power (Pie)
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
<li id="chart-hrpie">
|
||||
<a href="/rowers/workout/{{ workout.id|encode }}/addstatic/3/">
|
||||
<i class="fas fa-heartbeat fa-fw"></i> Heart Rate (Pie)
|
||||
@@ -266,7 +271,7 @@
|
||||
<input type="checkbox" name="group-advanced" id="group-advanced">
|
||||
<label for="group-advanced">Advanced</label>
|
||||
<ul>
|
||||
{% if workout|water %}
|
||||
{% if workout|water %}
|
||||
<li id="advanced-wind">
|
||||
<a href="/rowers/workout/{{ workout.id|encode }}/wind/">
|
||||
<i class="fas fa-pennant fa-fw"></i> Wind
|
||||
|
||||
@@ -88,11 +88,12 @@ def workout_video_view(request,id=0):
|
||||
spm = (10*df2['spm']).astype(int)/10.
|
||||
|
||||
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()
|
||||
mask = coordinates['time'] < delay
|
||||
coordinates = coordinates.mask(mask).dropna()
|
||||
coordinates['time'] = coordinates['time']-coordinates['time'].min()
|
||||
coordinates.set_index(pd.to_timedelta(coordinates['time'],unit='s'),inplace=True)
|
||||
coordinates = coordinates.resample('1s').mean().interpolate()
|
||||
latitude = coordinates['latitude']
|
||||
longitude = coordinates['longitude']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user