Sunday, 3 May 2009

A Day Out with Wireless Access Point Geolocation

Last time, I blogged about what I was up to with wireless access geolocation. Now it's in a state where it's fit for consumption by the brave, so I've put it in the playground.

So why the blog title? Well, today I'm visiting some friends in Edinburgh, so I thought I'd test it out. When I got here, I updated the list of access points to include those visible from their house, fired up the LCD Weather Station plasma applet, and sure enough...:

Now, my location is tracked whether I'm at home, in the office, or visiting here - great! Anyone interested in this, I'd encourage you give the download a try. The README file that comes with it explains what to do - add your access point data to the CSV file it uses, and away you go.

Next step: a GUI to edit the list of known access points, and improving the location estimate using signal strength data.

Friday, 1 May 2009

Where am I?

One of the up-and-coming features in Plasma, thanks particularly to Petri Damstén, is the geolocation DataEngine - a backend for determining where in the world the user is. Right now, there are two mechanisms used: GPS (great if you have it, and are outdoors) and IP.

IP geolocation is neat, as anyone online has an IP which we can hope might tell us something about where they are. The hard bit is getting a good database with accurate location fixes, as the data is continually changing. One of the best services going for this is They provide an XML API for giving location data for IPs, so as my first foray into Plasma development, I set about hooking this up into the IP geolocation backend.

The result? IP geolocation for this computer, right now, gives:

Try it for yourself - grab the geolocation dataengine from kdereview, run plasmaengineviewer, and select geolocation.

Now, the weak link in the first implementation was that the API took an IP and returned location data - whereas what we really want is just data for the user's world-visible IP. A stop-gap measure was to use, which was sadly not too reliable. As of today, though, after chatting to the guys (thanks!), calling the API without an IP, returns the location of the visiting IP. Perfect!

So that's IP geolocation, next step is to work on geolocation based on wireless access points. Two neat advantages of this:

i) Better coarse-level geolocation - record APs visible at home/in the office/parents'/etc., and be able to geolocate at least down to a few km from that.

ii) In a building with a whole bunch of visible APs, geolocation down to a few metres. And, unlike GPS, works indoors.

What to do with this data is left as exercise for the reader's imagination. For me, I intend to have my power management settings changed to 'Presentation' and my Kopete message notifications turned off when I go to give a talk, without having to remember to do it myself. Knowing where I am in the building should be clue enough, right?