Free42 - LOCAT won't work on iPhone
|
05-06-2017, 01:35 AM
Post: #5
|
|||
|
|||
RE: Free42 - LOCAT won't work on iPhone
(05-06-2017 01:02 AM)Paul Dale Wrote: It is working fine here on my iPod. LOCAT starts the Location service, if it isn't running already, and then returns whatever is the latest set of coordinates provided by that service. The location service provides coordinates through a callback, whenever it has any new ones, and Free42 stores the coordinates provided by that callback in a few global variables; LOCAT simply returns whatever happens to be in those globals. So, it's normal for LOCAT to return 0ºN 0ºE when first called, and for the first few seconds after that first call. Once the GPS gets a reasonable fix, LOCAT will start returning reasonable numbers. You can tell whether there is a reasonable fix by looking at the accuracy returned by LOCAT -- see http://thomasokken.com/free42/extensions.html -- if it is -1, ignore the result. N.B. I considered making LOCAT wait for a real fix before returning a result, but depending on the device and satellite visibility, that can take a long time, so I made it work in this asynchronous manner instead. (LOCAT behavior in the Android version is exactly the same.) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)