Skip to content

Commit

Permalink
Update tomtom_tracks.py
Browse files Browse the repository at this point in the history
Fix negative longitude or latitude
  • Loading branch information
bkerler authored Jun 1, 2020
1 parent ece069f commit 5ba553f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MobileRevelator/python/tomtom_tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def converttrackchunks(db,fsname):
points=ctx.sqlite_get_data(conn,i,2).data()
#print(id)
for i in range(0,len(points),0x28):
lat, lon, unknown, year, month, day, hour, min, sec, msec = struct.unpack("<IIIIIIIIII",points[i:i+0x28])
lat, lon, unknown, year, month, day, hour, min, sec, msec = struct.unpack("<iiiiiiiiii",points[i:i+0x28])
from_latitude=int(lat)/100000
from_longitude=int(lon)/100000
fromloc=ctx.getlocation(from_latitude,from_longitude)
Expand Down Expand Up @@ -141,4 +141,4 @@ def main():
ctx.gui_setMainLabel("Status: Idle.")
ctx.gui_setMainProgressBar(0)
ctx.sqlite_close(db)
return "Finished running plugin."
return "Finished running plugin."

0 comments on commit 5ba553f

Please sign in to comment.