Private
Public Access
1
0

first test on breakthrough workouts (only on upload)

This commit is contained in:
Sander Roosendaal
2017-06-14 01:01:37 +02:00
parent e4d0e38b80
commit 4b0707b7f4
2 changed files with 48 additions and 0 deletions

View File

@@ -74,3 +74,12 @@ def geo_distance(lat1,lon1,lat2,lon2):
bearing = math.degrees(tc1)
return [distance,bearing]
def isbreakthrough(delta,cpvalues,p0,p1,p2,p3):
pwr = p0/(1+delta/p2)
pwr += p1/(1+delta/p3)
res = np.sum(cpvalues>pwr)
return res>1