use-livecode Digest, Vol 200, Issue 5

Alan Stenhouse alanstenhouse at
Mon May 4 19:18:06 EDT 2020

Hi Graham

Have you tried it walking around outside in varying locations? Have you tried different devices and/or OS versions? You could try sharing it with a friend using Diawi or similar and see what they get.

Also try restarting your phone to see if that helps.

As you move around the countryside, you'll occasionally get some inaccurate reading (depending on surroundings) so you may decide it's best to store, but ignore, occasional inaccuracies and just use some form of interpolation.

Looking forward to even better location data in the future - it's constantly improving and most new phones will give you 3-5m accuracy in the right conditions. Perhaps the newest phones are already even better?

Here are a few links with more info:

"assessment of the gps accuracy of mobile devices":

"Smartphone GPS accuracy study in an urban environment":

"Why GPS makes distances bigger than they are":

though those may not be immediately helpful to you. :-)

Will look forward to hearing what you come up with!

Good luck!



> On May 4, 2020, at 5:07 AM, Graham Samuel via use-livecode <use-livecode at> wrote:
> ?I?m using GPS on iPhone using the various commands and functions available in LC. Most of this works, but I am having difficulty with the quantity ?horizontal accuracy?. This can be queried via an array which is returned when mobileCurrentLocation() is executed. 
> Looking at other iOS apps that use GPS and allow one to examine their data, I find that in my part of the world, accuracy for them is of the order of 5 metres: but when I query it using LC I get much higher numbers, indeed some of them look like nonsense, being hundreds of metres!
> I am aware that it takes time for a GPS signal to settle down after mobileStartTrackingSensor ?location? has been called, but even if I script the examination of accuracy to wait for it to settle down (I look for a run of similar or identical readings against a ?reasonable? criterion, such as 5 metres), it still sometimes settles on very large numbers comparatively speaking, for example it might stabilise at 65 metres. With that level of inaccuracy any cumulative use, as in working out the number of kilometres in a trip, would not be reliable.
> I wonder if my expectation is wrong, or if there is something different about LC?s encapsulation of these iOS outputs, or if there is some other explanation.
> In the short term, I?m simply going to have to relax my search for a reasonable accuracy of the order of 5 metres, and just go for the first run of stable readings. But I would love to hear any further insight from anyone who?s already tried it.
> Graham

More information about the use-livecode mailing list