lmdk_bgt.discount: Fixed sampling rate calculation

This commit is contained in:
Manos Katsomallos 2021-07-26 18:20:17 +03:00
parent f44ec6d9cd
commit 836ac16f16

View File

@ -447,7 +447,7 @@ def discount(seq, lmdks, epsilon):
for i, p in enumerate(seq):
# Adjust the sampling rate
if len(lmdks) > 1:
samp_rt = datetime.fromtimestamp(int(lmdks[lmdk_cur][3]))/datetime.fromtimestamp(int(lmdks[len(lmdks) - 1][3]))
samp_rt = lmdks[lmdk_cur][3] / lmdks[len(lmdks) - 1][3]
# Check if current point is a landmark
if lmdk_lib.is_landmark(p, lmdks):
lmdk_cur += 1