Can I just say…

Musings on technology

Zooming along at 80mph on the Lake Shore Ltd and I decide to write a twitter app

I’ve been toying with geo data for years now but nothing has ever quite clicked. Some years ago I bought a bluetooth GPS receiver for use with a Nokia phone which allegedly supported it, however none of the extant software I could find actually seemed to do anything useful with the data, keeping it locked up behind their online service.

What I wanted all along was a simple, easy to use tool to track my where abouts. I figure if the government and corporate America can track me, why not myself?

Google Latitude seemed to be a good start for this, but because of Google’s well–understood paranoia about tracking people the Latitude service is very stripped down, keeping only your current location and providing no history. The s60 app for Google Maps will update your location in the background using both GPS as well as triangulation (wifi? cell tower?). It “just works” — one of my major criteria.

So some months ago I started polling my own Latitude feed and stashing it in a directory on my server. I’ve been able to use that to craft some cheesy breadcrumb maps of where I’ve traveled since July, but otherwise haven’t done anything with the data.

I’d been meaning to set up something to update my twitter location field based on one of these feeds but have been preoccupied with other things.

Finally in a fit of pique tonight I cobbled something together on my Mac, it seems to work (within the limitations of Google’s Latitude data, which seems less precise than what you find in Google Maps, and twitter’s location field which is limited to 30 characters).

One minor thing I ran into involved my latitude id, which is a large, 19 digit number.

On my Mac, running Snow Leopard, I assigned it as a number and didn’t really think about it. Everything worked fine.

I uploaded the script to my hosting provider and consistently got bad data out of Google and couldn’t figure out why.

Well, my hosting provider runs a 32 bit system. The numeric id was overflowing and creating a negative number for the userid, so Latitude returned a location of 0.000,0.000.

Changing it to a string fixed the problem.

So as I train westward for Defrag 2009 I’m going to let this script run a bit and see what else I can do with the data.

Advertisement

Written by epc

09/11/2009 at 00:45

Posted in Uncategorized

Follow

Get every new post delivered to your Inbox.