Trying to increase precision of datematch.

This commit is contained in:
Marcus Scholz 2020-03-09 17:02:17 +01:00
parent f43116abec
commit 115d6a6ab4
1 changed files with 6 additions and 2 deletions

View File

@ -129,7 +129,11 @@ for srcphoto in args.photos:
for segment in track.segments:
for point in segment.points:
# datetimes match with 1 minute precision
delta = timedelta(minutes=1)
delta = timedelta(seconds=10)
if abs(point.time - pictime) < delta:
print(pictime, 'vs.', point.time, 'Delta:', pictime - point.time)
valuelist = []
row = [point.time, point.latitude, point.longitude]
valuelist.append(row)
print(valuelist)
#print(pictime, 'vs.', point.time, 'Delta:', pictime - point.time)
# print('Point at ({0},{1}) -> {2}'.format(point.latitude, point.longitude, point.time))