[Sprint Galaxy S 5 Android Development] Dagmar d'Surreal:
Okay, that's about enough.

I'm just going to say it. This fix appears to be the cumulative product of lots and lots of cargo cult nonsense. It's unlikely to ever help anything, no matter how many people have been posting that it "works great". To someone who is familiar with these technologies, upon close examination this "fix" really sounds a lot like a bunch of people on the internet got together and came up with a cure for the common cold which involves filling a Neti pot with Oscillococcinum, and then gently inserting it into one's rectum. This "fix" is wrong for a positively breathtaking number of reasons. Making matters worse is that it's gone on for so long that a whole bunch of well-meaning (okay well, "desperate for clicks" is probably more honest) blogs and news sites are repeating it, also without examining it carefully. Can we please stop spreading this misinformation around?

First off, those NTP_SERVER lines are unlikely to be doing what is apparently hoped for (I can't be the only one thinking it)... they're setting a variable--not populating an array. It's just replacing the previous value seven times. This means the last value "wins". Secondly, to do NTP properly there should only ever be an odd number of NTP servers involved. Eight is not an odd number... unless you're using Imperial eights or some eights you got off some sketchy Chinese website or something and then god help you. In the event that there's a disagreement among the servers polled, the time reported by a majority of them is what is used (because it's NTP which is a protocol that has been argued to death since before many of you were born, so that's is a fight you would do well to not jump into the middle of). You can't have a majority if four are saying one thing and the other four are saying another thing--you're just dead in the water and have to start over. We don't average the responses from all of them because that would definitely be wrong, despite being "close". It's also appropriate to wait for them all to respond before making this determination. If you try to poll eight and one doesn't respond... there's going to be considerable time lost while deciding it's not going to respond. Using lots of servers just adds complexity and the chance of failure without substantially increasing precision! Compounding this madness is that the pool server names are all querying from the same pool of NTP servers, despite one set saying "north-america" and the other saying "us". The best part is that it's primarily being used to ensure that the time your phone already has (and probably got from the cellular towers) isn't wildly inaccurate. What matters to GPS receivers is the time the satellites think it is (which is generally even more accurate than what you're going to get over the internet!)

Now, we do need to know the present time to get a result more quickly, but we don't need femtosecond accuracy for this, nor would specifying a whole bunch of NTP servers make that possible. We just need a ballpark figure that's accurate to within a few hours. We need to know the time so that we can use ephemeris tables (that's the weird file your phone occasionally downloads from the internet and is good for a few days--don't waste time re-downloading it multiple times a day!) to figure out where the satellites are in their travels, and we're just (pretty reasonably) assuming that no one crossed half a hemisphere since the last time GPS was queried, so... knowing (within a few hundred miles) where we are and where the satellites are, we can work out in advance which servers are most likely to be overhead and visible/audible. This allows us to skip listening for a bunch of satellites we can't hear, (and most importantly) exclude the borderline useful ones near the horizon that we probably won't be able to listen to for long enough to be useful. because of interference, and go straight to listening for the ones we can be pretty sure are overhead in relatively ideal positions.

Now as to "pure" GPS mechanics, let me explain... You need a minimum of three satellites in "view" in order to get a solid fix on your location.... because triangulation isn't something that happens when one tries to swallow a Dorito without chewing. There's be a whole slew of the satellites flying around overhead and things can get very complex very fast, but you still need three to triangulate your location. Additionally your device has to be able to "hear" them for about thirty seconds in order to get their broadcasted location information (which is almost ridiculously precise because getting it wrong can mean falling out of the sky LOL and satellites aren't cheap!). In that time we are also getting what time the satellites think it is with (no pun intended) stellar accuracy.

Your phone uses ephemeris tables and (hopefully) an almanac of satellites it's heard from recently to skip the step of finding three satellites to listen for, and it uses cached time information to skip ahead again instead of waiting for the part of the broadcast with time in it. This is why you get a coarse location within 100m or so really quickly, which is then refined as the satellites' time is heard and perhaps a few more satellites are listened to for good measure. Most of the poking and prodding people are doing (particularly those which flush the almanac or cached location information) tends to actually just slow things down, not speed them up.

TL;DR: Stick with one NTP server in your gps.conf. ...preferably north-america.pool.ntp.org (the numeric host part you see it prefixed with is also largely decorative) if you're in North America because it's better for determining accuracy and less wasteful of public resources. NTP servers that are overworked because people are querying them needlessly can't respond as quickly as ones that are almost bored to death.

To those people who seem to be convinced this "fix" works, please perform the following experiment. Back up all your data and wipe your entire phone (wipe caches, format /system, nuke user data), and then reflash the firmware. Boot it up, go into Maps, and time how long it takes to get a solid location fix. Now, reboot the phone and while it's rebooting, place it in the middle of a large plastic (not metal) bowl filled with Doritos. I personally prefer Cool Ranch flavor for this. Once it's rebooted, again go into Maps and time how long it takes to get a solid fix on your location. Congratulations, you've just proven that Doritos have an almost magical effect on the accuracy and speed of the GPS receiver in your phone by assisting with triangulation! Please remember to chew thoroughly when the experiment is complete.