Location timestamp always the same
Tuxinet last edited by
I'm just wondering about something. I am trying to use the location module, but something I found out very early on is that it appears the timestamp that location.get_location() gets, always is the same, unless I restart the script. Am I doing something wrong, or does this have something to do with the way IOS works?
btw, I'm doing it like this.
import location while True: location.start_updates() sleep(3) #Or some other number loc = location.get_location() location.stop_updates() print loc.get('timestamp')
Douglas last edited by
I am having the same problem, unable to update location within a loop. Did you figure out how to fix this?The following code shows the same location and time stamp for each iteration of the loop.
import location, time
location.start_updates() time.sleep(5) # give GPS hardware 5 seconds to wake up currLoc = location.get_location() return currLoc
lenoirmind last edited by
Hello both. I found the same issue as well.
Both in a Scene based script and a script in the interpreter, I can't get the location module to update within a loop.
I am not sure if this could be an iOS "feature" that limits Pythonista's continuous sensing possibilities in a way. Would be great through if it would be possible to sense the location within a loop.
macrumpel last edited by
same here, please anybody, a solution would be highly appreciated, this is quite an annoying problem for me.
THank you so much,