Thursday, March 06, 2008

Iditarod GPS in Google Earth

First, let me describe myself as a "rookie" fan. My wife got interested in the last great race last year (2007) [edit(3/6 9:33AM) my wife has been interested for several years, but only recently has technology allowed us to keep up-to-date on the race from afar, instead of waiting for coverage months later], but for me, it all started this year. My wife and I have gotten to know a family in Alaska this year, the Holt's, through my wife's blogs and overlapping interests. Well, it turns out that Rick Holt is a rookie in the 2008 Iditarod.

That piqued my tepid interest in the Iditarod to what I'd conservatively call a fury. Double that when my wife informed me that, for the first time, the Iditarod would provide GPS tracking of some of the mushers (a trial). Oh, and Rick would have one of the GPS devices. SWEET.

So, my interest is piqued and I'm excited about tracking Rick's progress against the other GPS-enabled mushers, as well as his overall standings (currently 44th after an overnight push through McGrath into Takotna, COOL!). But, I'm underwhelmed with the Microsoft Virtual Earth mapping of the mushers and the course. My first thought is to see if I can re-use the data being fed to Microsoft Virtual Earth, to feed into Google Maps, but as I'm working on that, my wife finds EarthSlot, which brings together the Arctic Regions Supercomputing Center and the Geographical Information Network of Alaska to provide a KML feed of the musher's current standings using the GIS data format used by Google Earth.

Well, that's cool - the KML feed has tons of information, but I thought I could do better. I figured that with the information from IonEarth, I should be able to map the GPS near-realtime location of the GPS-enabled mushers into Google Earth, with all the stats available in the Microsoft Virtual Earth mapping.

And I did. Click here to download the KML with a self-refreshing link to the latest near-realtime data provided by IonEarth, translated by a script to KML. I've also enhanced the original EarthSlot KML with a network link to National Weather Service / NOAA weather radar aggregation for Alaska.

Pulling this data into Google Earth provides a few interesting benefits.
  1. Google Earth provides better aerial / terrain data for the course than Microsoft Virtual Earth (this is subjective, I suppose)
  2. The data feed I provide gives Google Earth information so when you double-click on a musher's sled icon, Google Earth will rotate your map view to correspond with the musher's current heading. [this was useful when Rick was heading into Nikolai, from the course / GPS, it looked like he was off course, but rotating the map view to his current heading showed he was heading straight into the checkpoint!]

    Map is aligned with Ken Anderson's current heading

  3. Google Earth has a Ruler. Open the Ruler tool and click on your favorite GPS-enabled musher and anywhere else on the map (next musher, next checkpoint, whatever) and get a very accurate estimate of the distance (in feet, miles, etc.)

  4. Google Earth imports information from Panoramio which includes pictures folks have taken at the various checkpoints (may be from this year or previous years). Information from wikipedia on certain locations (e.g. Takotna, Nikolai, Mcgrath) is also available right in Google Earth.

  5. The weather radar overlay from the National Weather Service is just SO FREAKIN' COOL!

    Weather around current position of mushers seems clear, but there's a big storm rolling through ahead.

The added indirection between the Google Earth feed and the IonEarth data that my feed script provides, also allows some throttling of the upstream requests. That isn't possible when just using Ajax in a browser to the primary data source. My script refreshes the data from IonEarth once every 10 minutes, max. Within that timeframe, it serves up the KML to Google Earth with cached GPS data from IonEarth. [Edit 3/6/08]: I've been asked (politely) to reduce the refresh rate to once an hour]

I'll publish a post soon on the details of the script that takes the IonEarth data and transforms it into KML.