iPhone Location: How apps access the iPhone location and what they can do with it.

  • Requesting an appropriate level of accuracy(the options are 3km, 1km, 100m, 10m, Best, or Best for navigation) is all about minimizing battery drain.
    • At a low of accuracy(e.g. 3km), the phone could determine its location solely from cellular or wifi signals, which would avoid powering up the GPS and conserve battery life.
    • At higher levels of accuracy(e.g. 10m), the phone listens to all available signals that it can use to determine its location — which includes GPS and iBeacons, in addition to wifi and cellular
    • Apple does not say specifically say which signals are used at which levels of accuracy.
  • An app can force the use of GPS by specifying “Best” — this will cause the phone to use GPS constantly to determine location as accurately as possible.
  • When the phone has a lock on 4 satellites, it can determine its elevation.
    • With 3 satellites, it can only determine location.
  • Significant Location Changes Only
    • As an alternative to receiving updates every time the phone moves, an app can request that it receive a location update only when the phone’s location has changed “significantly”.
    • This will avoid powering up the GPS and will rely on cell towers and wifi signals only — resulting in substantially reduced power consumption.
    • “Significant” is not defined.
  • Region Monitoring
    • where an app defines one or more regions by specifying their center and radius.
    • Then the phone notifies the app whenever it enters or exits a region.
    • This uses wifi and cell towers only, so accuracy is similar to “significant changes only” and regions will only work if they are fairly large.
  • iBeacons
    • iBeacons are small wireless sensors that can transmit data to an iPhone using Bluetooth Low Energy(BLE)
    • iBeacons allow apps to receive special promotions, coupons, recommendations, etc, from business in real time when users are nearby
    • An app can display the information received from the business, or it can make use of the knowledge that the iBeacon is nearby for navigational purposes as a form of region monitoring.
  • Inaccuracy Makes Distances Long
    • When tracking the user’s path with high level of accuracy, any inaccuracies in location measurement will almost always cause the path to be longer than it should.
  • “Snapping” to Roads
    • To counteract the extra distance problem and provide a smoother path, iPhone will “snap” location updates to a known road network when the user is traveling about 15mph(on the assumption that the user is driving or biking during that time).
    • Apps have no way of knowing when this is happening — all they see are location updates like normal, but when the locations are later projected on a map, it is clear when this was happening.
  • GPS Signal Quality
    • GPS requires line-of-sight communication, so anything that blocks a direct path from the phone to a satellite can interfere with the signal (this includes trees, mountains, buildings, car roofs, etc)
    • When a direct GPS signal is blocked and the user is near a large solid object like a building, the GPS signal can arrive at the phone indirectly after bouncing off the building.
    • Because GPS works by measuring very precisely how long the signal takes to get from the satellite to the phone, when the signal takes a longer path like this, the calculated location will be off.
  • Post-Processing
    • It is difficult to overcome these limitations on the phone while the app is running.
    • However, if the app is recording a user’s path and saving it to a server(e.g. the way a fitness tracking app would), the server can make some corrections after upload, such as
      • Snapping to roads or other known locations
      • Smoothing out jagged parts of the path
      • Replacing the inaccurate elevation reported by the phone with known elevation at that location
  • Map Displays
    • iPhone makes displaying maps in apps really easy
    • Many common functions are built-in and require very little from the app developer, including:
      • Displaying user location on the map
      • Displaying annotations and overlays on the map that zoom and scale with the map
      • Centering the map on the user’s location
    • Geocoding(getting latitude/longitude coordinates from an address) and reverse geocoding(getting an address from latitude/longitude coordinates) is also built-in and quite easy to use
  • How iPhone determines its location:
    • Four types of signals
      • iPhone can use 4 different types of signals to determine its location
        • Cellular
        • Wifi
        • GPS
        • Bluetooth (from iBeacons)
      • The phone’s location is determined by combining one or more of these signals(Which signals are used depends on availability and the requested accuracy)
      • All of this happens behind the scenes — any app can access the location of the phone, but the app does not know how it was calculated
    • Cellular
      • The location of cell towers is known to a high degree of accuracy. Based on the signal strength from various towers, the phone can estimate how far it is from each of them and calculate the phone’s location
      • This is always available when the phone has cell coverage, but is not very accurate since the towers can be far away and distance based on signal strength is not very accurate
    • Wifi
      • The phone uses the same process to determine location using wifi signals as it does for cellular signals, with distance estimated to the wifi hotspots based on signal strength
      • The locations of wifi hotspots have been crowdsourced for this purpose
      • Using wifi is more accurate than cell towers, but the user needs to have wifi turned on
    • iBeacons
      • When the phone detects a Bluetooth Low Energy signal from an iBeacon, in addition to knowing that an iBeacon is nearby, the phone can use the relative signal strength from multiple iBeacons to determine its location using the same technique that it uses for cellular and wifi signals
      • iBeacon signals only travel about 50 feet, so this location would be fairly accurate
      • This is particularly useful indoors, where GPS reception is poor
    • GPS
      • GPS is the most accurate of the 4 signals, but it is slow to get started
      • The phone needs to “lock on” 3-4 satellites within its line of sight before it can use GPS to determine location
        • This can take anywhere from 15 seconds to several minutes, depending on the phone’s view of the sky
        • 3 satellites can provide location; a fourth provides elevation
        • The phone uses its location calculated from other sources(e.g. cellular and wifi) to determine which satellites are within its line of sight at the current time, speeding up this process(this is called Assisted GPS, or A-GPS)
      • Before the phone has a GPS lock, location is less accurate

In iOS8 is there any way to turn off all radios EXCEPT GPS?

(Latest answer on Aug 13, 2016. https://discussions.apple.com/thread/6543352?start=15&tstart=0)
iOS 9 has enabled GPS in Airplane mode. Tried and tested, works as it should.
iOS 8 walk-around would be setting sim-card pin, restarting the phone, not entering pin#, sim would be deactivated, however the phone would still look for emergency bands.
iOS 7 had a bug that would activate GPS when compass app was launched while the phone was in Airplane mode.

Since iOS 8.2, you can still use the GPS even in flight mode.(http://apple.stackexchange.com/questions/98649/does-airplane-mode-disable-gps?rq=1)
GPS continues to work in airplane mode. Tested on iPhone 5s and SE with iOS 8, 9 and now 10. It may take longer (up to several minutes)to get the first fix but has full performance afterwards. It even works in an airplane when the iPhone is close to a window.


Ref: