Wednesday, October 27, 2010

Javascript Airport weather decoder

While weatherpixie remains on extended hiatus, I have finally put together a simple in-browser replacement. It uses James Padolsey's cross-domain Ajax plug-in for jQuery (indirecting via YQL), a simple parsing script from Manuel Heras, here separated into a stand-alone script, and an iframe-based page to do the work.

The final piece of heavy lifting is to get the appropriate METAR report for the local airfield, and that's just a few lines of javascript --

Here, EGSC is the ICAO code for Cambridge Airport. And that's a lot closer to home than the Met. Office who give out current conditions at Bedford on the Cambridge forecast!

No comments :