UK Military airfiled states - info
Brought to you by:
iridium
From: <nic...@ya...> - 2002-09-10 11:06:52
|
Hi phpweather devs. I am working on a similar prog in Perl (whilst trying to learn PERL at the same time!) then I discovered yours... :-) I dont have much php knowledge but I am familiar with the UK METAR and TAF format (part of my day job!) I'd like to borrow some bits from your code for the metar parsing, to try and fix mine, and at the same time give something back in return. In the UK Military airfield METARS you will see a colour state reported, one of: BLACK BLU WHT GRN YLO YLO1 YLO2 AMB RED. which indicates the visibility and cloud base. A sample METAR: EGXW 100950Z 22008KT 9999 FEW016 16/11 Q1018 BLU NOSIG the UK mil airfields are in the ICAO series EGX? EGY? EGQ? (maybe others, dont have ICAO ref in front of me!) One odd one is EGYP which is actually Mount Pleasant,South Georgia - in the south atlantic! Heres a snip from my perl prog which explains them: if ($colour) { $colour =~ s/BLU/blue/g; # 8Km viz 2500ft cloud base $colour =~ s/WHT/white/g; # 5Km 1500ft $colour =~ s/GRN/green/g; # 3.7Km 700ft $colour =~ s/YLO/yellow/g; # 1.6Km 300ft $colour =~ s/YLO1/yellow 1/g; # 2.5km 500ft $colour =~ s/YLO2/yellow 1/g; # 1.6km 300ft $colour =~ s/AMB/amber/g; # 0.8Km 200ft $colour =~ s/RED/red/g; #<0.8km <200ft or sky obscured. $colour =~ s/BLACK/black/g; # airfield unuseable - precedes colour code print "Colour: $colour\n" } Maybe someone would like to include this in the METAR parsing routine? Regards, NickBeee. __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com |