This started with me trying to figure out why GPS didn't work for my Nexus 5.
It turns out it doesn't work for a lot of people, on a lot of different devices. Many people say it works fine.
The short of it: Each device is supposed to have its GPS settings tweaked to get the specific device & cell provider configuration just right. This doesn't happen. Instead, a generic configuration is applied, which doesn't work for some people.
Google's Stock Nexus 5 image and builds of CyanogenMod 12.0 and 13.0 both set this for my Nexus 5 (using Sprint):
And what is it supposed to be set to?
With the default settings, GPS doesn't work. It sometimes works, but the GPS radio seems to just freeze up or die. Like it was switched off.
With the changed settings, GPS works just fine.
Android's source suggest that GPS configuration is supposed to be changed based on carrier.
But it doesn't work like that. When did GPS work as expected? Back with Android 4.4 / CyanogenMod 11.0.
This code suggests that GPS settings were applied differently:
Here are the /etc/gps.conf changes that are supposed to be made for each carrier:
I made an install script that I use on my Nexus 5 running CyanogenMod 13.0.
It corrects the gps.conf file for Sprint, then adds an addon.d script allow the fix to persist through updates. Just boot to Recovery / TWRP and flash it.
It's on my Nexus 5 GPS page: http://xenomorph.net/google/android/nexus5/gps/