# GPS Accuracy

Discussion in 'iPhone' started by jj5406, Oct 13, 2014.

1. ### jj5406 macrumors newbie

Joined:
Sep 5, 2012
#1
iOS location services gives you latitude and longitude as well as an accuracy measurement (and other values too, like latitude, heading, etc., but never mind those for now). You can see the accuracy measurement visually in the size of the circle drawn around your location dot in Apple Maps. Also, there are plenty of free apps which will allow you to capture this info as numbers, save it, and map it. Generally, the accuracy is really bad to start off with until the phone acquires enough satellites, and then it improves. I've seen the accuracy start out at 3000m (or worse), then jump to maybe 65 or 30m, then to 10m, and sometimes to 5m.

I live in some sparse woods and I've been trying to take some measurements of fixed locations. Over the past few days, I've taken multiple measurements at fixed locations, with reported accuracy of either 10m or 5m. Therefore, when I plotted the locations on a map, I expected to see a cluster of overlapping circles. Well, ha! Forget that. In one location where I have a bench, I've taken 7 measurements - all with reported accuracy of 10m or better. If I plot them on a map and draw a circle big enough to surround around all the points, it has diameter of over 50 meters (radius = 25m). In other words, I can pick two of the measurements I've taken with reported accuracy of 10m or better, and they are 50m apart.

So, what's up with these reported accuracy measurements? Ether location services is lying to me about the accuracy of the measurement, or the reported accuracy clearly doesn't mean what I think it means. I would assume that the accuracy would refer to either a 2 or 3 sigma error radius - meaning basically that there is a ~95% or ~99% probability that the actual lat/lon is somewhere within a circle centered at the reported lat/lon, with radius equal to reported accuracy. That's clearly not the case with the reported numbers - or I am supremely unlucky ;-)

Can someone enlighten me as to what is actually going on with the reported accuracy?

Thanks.

-J

2. ### samiznaetekto macrumors 65816

Joined:
Dec 26, 2009
#2
With GPS in iOS the developer programmatically sets the desired level of accuracy. Depending on this level, iOS will use either WiFi, cell towers, or true GPS. The goal here is to minimize battery usage. If the developer sets it to maximum accuracy, the battery will drain very fast. Maps app, I guess, uses dynamic accuracy - first, it'll use WiFi, if not available (and after throwing that annoying "you can improve accuracy if you turn on WiFi" alert), use cellular, if not, then fall back to GPS. So, the dispersion you see in your experiments probably reflects this.

To observe the accuracy of true GPS, you need an app that tells iOS to use maximum accuracy mode. Try Harry's GPS Buddy?

But since (I think) iOS 6 or so, Apple introduced some extremely laggy smoothing to GPS data, so what you see now is where you were some XX seconds ago. It doesn't give you raw data, but "we know better, eat what we feed you" data. This makes GPS on iPhones not a true sensor, but some toyish POS. You can see it by yourself by moving and stopping suddenly, or accelerating fast.

So, unfortunately, you can't consider iPhone GPS as a true sensor that would land its measurements within sigma circles - the data is so heavily F'ed up by that you never really know what you're looking at.

Joined:
Dec 26, 2009
#3

Joined:
Oct 13, 2014
#4
5. ### jj5406 thread starter macrumors newbie

Joined:
Sep 5, 2012
#5
Is this the case even when stationary?

Thanks for the explanation.

It seems clear from your description that when moving, the location will be problematic, but I'm still unclear as to why would this would be the case even when I'm standing stock still. I'm really only interested in position - not speed or heading or timing or anything else. I can understand smoothing and lag affecting a moving iPhone that is continuously updating its location - but when I stop and stay in the same place for 30 seconds, I would expect the reported accuracy to reflect the actual measurement. Clearly, my expectation is not being met.

In the apps I'm using, I can set them to get me the best available accuracy - which is reported, as well as turn off the "only update when I've moved a significant distance" feature that is meant to save battery. Thus, staying in one place, the reported accuracy should really be reasonable. Is your understating of how the system is working compatible with getting such inaccurate readings, even when the phone is not moving? In fact, I'm not bothered that the measurements are not very accurate, as much as I am bothered by the fact that the reported accuracy is a lie.

It makes sense to me that the lat/lon values can change when the phone is stationary. After all, the satellites are moving, and the measurements and errors will be slightly different every second. And, I can observe this in some apps. Harry's GPS didn't seem to report the lat/lon with enough decimal places to see this, but other apps do - and while reporting more digits than are significant is not usually helpful, it does in this case at least allow me to see that lat/lon info is being updated. Accuracy could change if the phone gains/loses lock on satellites, or simply if the calculated distances to the satellites it does have lock on don't converge in a nice tight circle.

What doesn't make sense to me is reporting an accuracy that is incorrect. Maybe Apple wants to make its location services appear better than they actually are - but it seems that regardless of the massaging of raw data that is going on, the software should be still be able provide a meaningful accuracy.

-J

6. ### samiznaetekto macrumors 65816

Joined:
Dec 26, 2009
#6
You nailed it. Apple doesn't care about the correctness of the data, it only cares about their location service look good and smooth. So the blue animated circle may not reflect accuracy accurately - it's just a pretty gimmick. (If you zoom out the map, the circle would appear having a radius of hundreds of miles which has nothing to do with accuracy.)

If you are, however, serious about GPS data, you need a good external GPS.

----------

It's been already reported that values from Health app are far from accurate. The hyped new barometer, for example, gives some ridiculous results. Apple doesn't care about accuracy of data. It assumes dumb users. It loves dumb users. Users who see some breathing blue dot on maps or colorful health graphs and scream "Yay! I love Apple! I love my shiny iPhone!" That's all there's there. Don't consider any iPhone sensor as a scientific instrument, it's just a gimmick. Exception: accelerometer and gyro seem to be outputting raw data.

7. ### cdaq macrumors member

Joined:
Oct 13, 2014
#7
Well that's disappointing. I'm in the market for a new phone and the health apps were a serious plus for the iphone 6.

8. ### Night Spring macrumors G5

Joined:
Jul 17, 2008
#8
I use a pedometer app to keep track of my daily walking distance, and it doesn't bother me if the distance count is not that accurate -- all I want is a general idea of how I'm doing in terms of daily movent. So say the app tells me I walked 4000 steps today and 5000 steps yesterday, that's good enough, I don't care if it was actually 3944 steps rather than 4000. I can see that I walked more yesterday than I walk today. That's the level of accuracy I expect from iPhone health apps, and I think that's plenty useful for me, and probably for a lot of people.

Joined:
Aug 17, 2007
Location:
#9
Agreed. It is best used as a guide or approximation.

10. ### cdaq macrumors member

Joined:
Oct 13, 2014
#10
Well ok. But what is the error? Maybe 3944 vs 400 is not a big deal but if I run 2 miles and it reports that I ran 2.25 that would be a deal breaker. For me.

11. ### Night Spring macrumors G5

Joined:
Jul 17, 2008
#11
I think you'd have to try various apps to find one that is accurate enough for your purposes. But I think the ones that combine step count with gps to get the distance would likely give you a good enough estimate for training purposes. The OP is reporting variance of 50 meters, which is nowhere near a quarter of a mile.

12. ### jj5406 thread starter macrumors newbie

Joined:
Sep 5, 2012
#12
The Apple way

Ah. So sad. Although I think you are being a little too harsh on Apple. In their defense, their location services are probably giving 98% of users everything they need. If the hardware is not capable of reaching a certain accuracy that's one thing, but the software should not defeat the possibility of getting the most out of that hardware. Software that uses predictive methods to attempt to give the desired answer in most cases is a good thing - but it should not make it impossible to get the raw data and do something else with it. One should really be able to access that raw data and do what one wants with it. But I guess that's not the Apple way.

And if you are going to present an number that is supposed to represent the accuracy, it should be valid number that really represents the accuracy. As a scientist, that's my biggest gripe with Apple (assuming they really are cooking the numbers to make themselves look good - which I think counts as fraud). Drawing a blue dot with a lighter shaded circle around it in a map is one thing - obviously if kept strictly proportional and you zoom way out, you wouldn't see the dot at all, which wouldn't be very helpful. So it's understandable that the dot would not represent the raw number in such cases. But if the raw number itself (the presumed accuracy) is bogus, that is inexcusable.

The iPhone is a sophisticated piece of hardware, and it's collecting all the pertinent data. It would be really nice to have access to that data. Unfortunately, as I said, that's not the Apple way. :-(

I will try a few other experiments. I guess it's possible that there is a bug in the primary app I have been using to record lat/lon/accuracy - but it was the most convenient one I found. As a good scientist, I will try a few other apps and check the results.

Since you mentioned Harry's GPS buddy, I looked into that - as well as the external GPS unit by Emprum (\$99), and it's associated app. But I couldn't see a convenient way to actually record a series of lat/lon/accuracy measurements with such a setup.

-J

13. ### Night Spring macrumors G5

Joined:
Jul 17, 2008
#13
I'm not a scientist, so I may be missing some fine points, but is there such a thing as a raw number for accuracy? Wouldn't it be a derived value based on other variables, including things like whether there are things blocking satellite signals? Would an iPhone really have access to all the raw data needed to come up with a correct accuracy value?

Joined:
Jun 26, 2010
15. ### jj5406 thread starter macrumors newbie

Joined:
Sep 5, 2012
#15
When I say the "raw number" there, I am referring to the number that Apple maps gets from location services - it is a number. I'm not faulting Apple Maps for not converting that number proportionally in the map because that may not be feasible based on chosen map scale. But I do say that that raw number (provided by location services) represents a "presumed accuracy".

Yes, that number is derived from other values, but the iPhone should be able to come up with a close approximation to the actual accuracy of the location - which should be some kind of error ellipse with a 2 or 3 sigma confidence level. The accuracy of a particular distance to a given satellite and the may not be well known (especially because of weather), and the accuracy of the location of a given satellite may not be well known, but those will not be as important as the information taken in aggregate. The determined location will be the point that that minimizes the rms error of the distance differentials to the satellites. If the location of/distance to a given satellite has a large error, that will likely be reflected in the distance differential - so while knowing those errors will help give a more accurate error estimate, it will most likely just be slightly more than the calculated error without needing to take those actually errors into account. And you can have a-priori estimates of those errors anyway.

-J

16. ### Erasmus macrumors 68030

Joined:
Jun 22, 2006
Location:
Hiding from Omnius in Australia
#16
Accuracy is another word for uncertainty. Every measurement has an uncertainty associated with it, for example measuring something with a millimeter scale rule usually has an uncertainty of half to a quarter of a mm.

If you have multiple measurements of a particular variable (in this case position) the uncertainties can be combined into a result that is smaller than any of them. The individual uncertainties just need to be quantified (via maths, or via experimental data), and then can be combined easily.

OP: Are you taking your position measurements as soon as the GPS gives you a lock, or are you waiting a period of time before recording position? Have you tried sitting on the bench for a while, to see how much variation there is over time?

17. ### jj5406 thread starter macrumors newbie

Joined:
Sep 5, 2012
#17
I was just thinking that "uncertainty" was a better term to use. But in this case, it is more difficult than what I think you are referring to - that is if you have a bunch of measurements of the same thing, each with an uncertainty, you can combine them in a very straightforward manner to get a measurement with a smaller uncertainty (basically increasing the signal-to-noise ratio by using multiple measurements). In this case, we have measurements of different things, each with its own uncertainty that must be combined (solved for) to find the thing we are interested in (like for example finding the intersection multiple rays each with its own uncertainty). And that is not quite as straightforward, and does not necessarily lead to a smaller uncertainty in the answer - or the uncertainty may be of a different type. Each ray may have an uncertainty in both position and direction, but we are solving for a fixed position.

I am waiting at the location for a "significant" amount of time. Generally 30 seconds or more from when I get there to be sure the location has settled down - generally many minutes since the app was started and presumably found satellites to track. With the app I'm using, it is not clear how much the location is bouncing around, since it is not logging it - but it seems to be within the noise relative to the accuracy number. However, leaving the location and coming back, even within 10 minutes, can get a result that differs by more than the accuracy number. It would be interesting to just leave the phone in one location for hours and log the position to see how it changes over time.

-J

18. ### Erasmus macrumors 68030

Joined:
Jun 22, 2006
Location:
Hiding from Omnius in Australia
#18
Well, if you have two rays, you can calculate their intersection point, and characterise the uncertainty of the intersection due to both ray origin and direction. If you have more than two rays, with noise, and you know that they all intersect, then you should be able to calculate an intersection point and uncertainty for each pair permutation. The set of points and uncertainties should then be able to be combined into a single best point and uncertainty using weighted least squares. And mathematically, that uncertainty is guaranteed to not be larger than the smallest individual uncertainty.

Basically, what I'm trying to say is it should be possible for the uncertainty of a GPS position lock to be accurately calculated, however Apple probably haven't bothered. And it's also possible they haven't implemented adequate signal fault detection and outlier rejection algorithms. Of course for the vast majority of users, uncertainty doesn't matter. Just as long as it gets them close enough to their destination.

Well, civilian GPS does have a random 'walk' in it, to stop it being used by 'the terrorists'. Something else that could affect accuracy is where you live. I believe GPS is set up to give best accuracy over the US, so if you're not, that could be part of the answer.

P.S. It's nice to find an intelligent person on the internet, someone who doesn't think 'a-priori' is the french word for dead flower petals in a bag.