Private
Public Access
1
0

Merge branch 'release/v22.1.35'

This commit is contained in:
2024-09-30 09:01:16 +02:00
5 changed files with 20 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ class InvalidTrajectoryError(Exception):
def time_in_path(df, p, maxmin='max', getall=False, name='unknown', logfile=None):
if df.empty: # pragma: no cover
return 0
return 0, 0
def f(x):
return coordinate_in_path(x['latitude'], x['longitude'], p)
@@ -55,7 +55,7 @@ def time_in_path(df, p, maxmin='max', getall=False, name='unknown', logfile=None
raise InvalidTrajectoryError(
"Trajectory doesn't go through path") # pragma: no cover
return 0 # pragma: no cover
return 0, 0 # pragma: no cover
def coursetime_first(data, paths, polygons=[], logfile=None):

View File

@@ -1214,6 +1214,11 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
x = x * - 1
neg_peaks, _ = find_peaks(x, height=0) # hieght is the threshold value
row.df[' Power (watts)'][neg_peaks] = row.df[' Power (watts)'][neg_peaks-1]
x = row.df[' Power (watts)'].values
x = x * - 1
neg_peaks, _ = find_peaks(x, height=0) # hieght is the threshold value
row.df[' Power (watts)'][neg_peaks] = row.df[' Power (watts)'][neg_peaks-1]
#row.df[' Power (watts)'].replace(to_replace=0,method='ffill', inplace=True)

View File

@@ -1107,6 +1107,7 @@ def handle_check_race_course(self,
row.calc_dist_from_gps()
rowdata = row.df
rowdata['cum_dist'] = rowdata['gps_dist_calculated']
row.df.to_csv("~/Downloads/lagoon.csv")
try:
_ = rowdata[' latitude']
@@ -1174,6 +1175,7 @@ def handle_check_race_course(self,
startseconds = []
endseconds = []
for startt in entrytimes:
logmessage = 'Path starting at {t}'.format(t=startt)
dologging(logfile, logmessage)
@@ -1210,6 +1212,7 @@ def handle_check_race_course(self,
'endsecond': endseconds,
})
records = records.loc[records['coursecompleted'], : ]
if len(records):

Binary file not shown.

View File

@@ -827,7 +827,16 @@ def course_upload_view(request):
for course in cs:
cname = name+' - '+course['name']
cnotes = notes+'\n\n'+course['description']
try:
cnotes = notes+'\n\n'+course['description']
except TypeError:
try:
cnotes = notes
except TypeError:
try:
cnotes = course['description']
except TypeError:
cnotes = ''
polygons = course['polygons']
course = courses.createcourse(