I’ve done a little bit of research to see how an Apple iPhone tracks my location – at least when i’ll be running iOS 8 later this autumn. It looks like it picks clues up from lots of places as you go:
- The signal from your local cell tower. If you switch your iPhone on after a flight, that’s probably the first thing it sees. This is what the handset uses to set your timezone and adjust your clock immediately.
- WiFi signals. As with Google, there is a location database accessed that translates WiFi router Mac addresses into an approximate geographic location where they’ve been sensed before. At least for the static ones.
- The Global Positioning System sensors, that work with both the US and Russian GPS satellite networks. If you can stand in a field and see the horizon all around you, then your phone should have up to 14 satellites visible. Operationally, if it can see 2, you can get your x and y co-ordinates to within a meter or two. If it can see 3, then you get x, y and z co-ordinates – enough to give your elevation above sea level as well.
- Magnetometer and Gyroscope. The iPhone has an electronic compass and some form of gyroscope inside, so the system software can sense the direction, orientation (in 3D space) and movement. So, when you move from outdoors to an indoor location (like a shopping centre or building), the iPhone can remember the last known accurate GPS fix, and deduce (based on direction and speed as you move since that last sampling) your current position.
The system software on iOS 8 just returns your location and an indication of error scale based on all of the above. For some reason, the indoor positioning with the gyroscope is of high resolution for your x and y position, but returns the z position as a floor number only (0 being the ground floor, -1 one down from there, 1..top level above).
In doing all the above, if it senses you’ve moved indoors, then it shuts down the GPS sensor – as it is relatively power hungry and saves the battery at a time when the sensor would be unusable anyway.
Beacons
There are a number of applications where it would be nice to sense your proximity to a specific location indoors, and to do something clever in an application. For example, when you turn up in front of a Starbucks outlet, for Apple Passport to put your loyalty/payment card onto the lock screen for immediate access; same with a Virgin Atlantic check-in desk, where Passport could bring up your Boarding Pass in the same way.
One of the ways of doing this is to deploy low energy bluetooth beacons. These normally have two numbers associated with them; the first 64-bits is a licensee specific number (such as “Starbucks”), the second 64-bit number a specific identifier for that licensee only. This may be a specific outlet on their own applications database, or an indicator of a department location in a department store. It is up to the company deploying the Low Energy Bluetooth Beacons to encode this for their own iPhone applications (and to reflect the positions of the beacons in their app if they redesign their store or location layouts).
Your iPhone can sense beacons around it to four levels:
- I can’t hear a beacon
- I can sense one, but i’m not close to it yet
- I can sense one, and i’m within 3 meters (10 feet) of it right now
- I can sense one, and my iPhone is immediately adjacent to the beacon
Case (4) being for things like cash register applications. (2) and (3) are probably good enough for your store specific application to get fired up when you’re approaching.
There are some practical limitations, as low energy bluetooth uses the same 2.4Ghz spectrum that WiFi does, and hence suffers the same restrictions. That frequency agitates water (like a Microwave), hence the reason it was picked for inside applications; things like rain, moisture in walls and indeed human beings standing in the signal path tend to arrest the signal strength quite dramatically.
The iPhone 5S itself has an inbuilt Low Energy Bluetooth Beacon, but in line with the way Apple protect your privacy, it is not enabled by default. Until it is explicitly switched on by the user (who is always given an ability to decline the location sharing when any app requests this), hardware in store cannot track you personally.
Apple appear to have restricted licensees to using iBeacons for their own applications only, so only users of Apple iOS devices can benefit. There is an alternative “Open Beacon” effort in place, designed to enable applications that run across multiple vendor devices (see here for further details).
The Smart Watch Future
With the recent announcement and availability of various Android watches from Samsung, LG and Motorola, it’s notable that they all appear to have the compass, gyroscope but no current implementation of a GPS (i’ve got to guess for reasons of limited battery power and the sensors power appetite). Hence I expect that any direction sensing Smartwatch applications will need to talk to an application talking to the mobile phone handset in the users pocket – over low energy bluetooth. Once established, the app on the watch will know the devices orientation in 3D space and the direction it is headed; probably enough to keep pointing you towards a destination correctly as you walk along.
The only thing we don’t yet know is whether Apple’s own rumoured iWatch will break the mould, or like it’s Android equivalents, act as a peripheral to the network hub that is the users phone handset. We should know that later on this year.
In the meantime, it’s good to see that Apple’s model is to protect the users privacy unless they explicitly allow a vendor app to track their location, which they can agree to or decline at any time. I suspect a lot of vendors would like to track you, but Apple have picked a very “its up to the iPhone user and no-one else” approach – for each and every application, one by one.
Footnote: Having thought about it, I think I missed two things.
One is that I recall reading somewhere that if the handset battery is running low, the handset will bleat it’s current location to the cloud. Hence if you dropped your handset and it was lost in vegetation somewhere, it would at least log it’s last known geographic location for the “Find my iPhone” service to be able to pinpoint it as best it could.
Two is that there is a visit history stored in the phone, so your iPhones travels (locations, timestamps, length of time stationary) are logged as a series of move vectors between stops. These are GPS type locations, and not mapped to any physical location name or store identifier (or even position in stores!). The user has got to give specific permission for this data to be exposed to a requesting app. Besides use for remembering distances for expenses, I can think of few user-centric applications where you would want to know precisely where you’ve travelled in the last few days. Maybe a bit better as a version of the “secret” app available for MacBooks, where if you mark your device on a cloud service as having been stolen, you can get specific feedback on its movements since.
The one thing that often bugs me is people putting out calls on Facebook to help find their stolen or mislaid phones. Every iPhone should have “Find my iPhone” enabled (which is offered at iOS install customisation time) or the equivalent for Android (Android Device Manager) activated likewise. These devices should be difficult to steal.