Wednesday, 11 May 2011

Indoor WiFi Mapping

Location determined by WiFi-only iOS devices.

With the advent of the iPhoneTracker, mobile device location has been brought back to the forefront of our minds. A Skidmore Faculty member compiled several versions of iPhoneTracker from GitHub, and one of these pulled the locations determined from WiFi positioning from the consolidated.db database. This meant that locations determined from WiFi proximity/triangulation were displayed along with the data from the A-GPS chip on his iPhone. When studying the new results, there were a large number of points in Japan and the south of France, both places that he had not been (at least in the last 10 months). In the GIS Center, we were reminded that we discovered the Japan location-fix when beginning to work with mobile device locations while on the Skidmore College network. The iPhone and iPad 3G do not have any issue since the location from their A-GPS chip trumps that from WiFi positioning, but the iPod Touch and iPad get bad locations on the Skidmore College networks.

To the above-right is the location returned by iOS devices, no matter where they are across campus. For comparison, the actual location is below. Both of these locations were taken from the Dana Atrium. How do we address the issue of location when WiFi is the only source for location information?
Indoor WiFi Mapping—iPhone 3GS—Skidmore

Location determined by A-GPS assisted iOS devices.

To answer this, we must first explore how mobile devices determine their location.

With the current version of iOS (all 4.X releases) Apple has switched to using their own location database. This stores location information from iOS devices with their position, as well as nearby cell towers and WiFi hotspots. MacRumors writes:

[T]he iOS location database does not record exact GPS data, instead seeking to pinpoint the locations of Wi-Fi access points and cell towers that the device comes within range of, although the database does offer a clear general track of a user’s movements.

The goal of maintaining such a database is to speed determining a users location by having a database with WiFi hotspots mapped to a rough physical location.

For iOS versions before 4.0, Apple used Skyhook’s WiFi location database. Skyhook worked to collect location information for WiFi hotspots, making it available for determining location. The iPod Touch used for testing is running iOS 3.1.3, so it is pulling its location from the Skyhook database. Skyhook has a handy feature which lets users add their WiFi hotspot to Skyhook’s database of WiFi hotspots. Could we add all the hotspots to Skyhook’s database, and then have a reliable solution for determining position indoors on campus using accurately mapped hotspots and WiFi triangulation?

We were able to get blueprints of the Harder and Dana academic buildings with all of the WiFi hotspots marked from IT. We then took each floor of the blueprints, georeferenced them in ArcMap, and got lat/lon coordinates for each of the hotspots. From IT we were also able to get a table with the MAC address information for each hotspot. This is a unique identifier, which allows the device to know which physical hotspot it is connected to. When this information is entered in Skyhook’s database, a mobile device will send the MAC address of the hotspots it is connected to and/or near. Skyhook should then return a triangulated position based on the locations that we submitted to the database. We also created the following model, allowing you see all of the hotspots over the floor plans in 3 dimensions.

Harder & Dana WiFi Hotspots from Skidmore College GIS Center on Vimeo.

Now that the hotspots have been mapped, we need to add them to Skyhook’s database and see if that improves the quality of the location information for pre-iOS 4 devices.

We tweeted @SkyhookWireless and they were kind enough to set us up with a bulk submit form. This let us compile a file to easily submit many WiFi access points with the precise locations of our access points. Skyhook offers a web form that allows you to enter a single AP on a Google Map. This is great for a single point in a residential setting, but for mapping 20+ APs in a tight area the form is not accurate enough to yield highly accurate results when mapping indoors. Using the locations we got from georeferencing the hot spots we created a tab-delimited file with latitude/longitude, MAC address, date, and text representing the location. We submitted this file to Skyhook, and I. The coming weeks they will add the APs to their database.

The end result of this work is that once these points have been added we should be able to determine position with a reasonable accuracy indoors. Once Skyhook has added the APs to their location databases we will compare the accuracy of the iPod Touch to that of the iPhone.

No comments:

Post a Comment