From 836ac16f1634354fac3e2227d6061f3db8f68660 Mon Sep 17 00:00:00 2001 From: Manos Katsomallos Date: Mon, 26 Jul 2021 18:20:17 +0300 Subject: [PATCH] lmdk_bgt.discount: Fixed sampling rate calculation --- code/lib/lmdk_bgt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/lib/lmdk_bgt.py b/code/lib/lmdk_bgt.py index 9aa5dff..8f372db 100644 --- a/code/lib/lmdk_bgt.py +++ b/code/lib/lmdk_bgt.py @@ -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