I was surfing the web the other day looking for any useful PHP progs and I
stumbled upon phpweather!
Now being a UK Pilot, "thats useful" I thought, I downloaded it and tried it
A few tweaks here and there and the pretty_print function will decode Metars
exactly as we pilots would like to read them.
A day or so later I visited www.gimpster.com and shock horror beta version
1.9.3 was announced better have a look at that..
ARRGGGHHH it's gone all object orientated on me, but despite being a hole
bunch harder to read now, I am finally coming to grips with it again.

I have had a play with both the "local_common.php" and "local_en.php" files
to correct a couple of things and to add some things that we pilots would
like to see.
For example in "pretty_print" you don't display the wind speed in knots (we
pilots like that) so I have added it, also I have reformated the output so
the sentenced are broken up, it just makes it a bit more readable.

Now one thing that I would like to see done is for phpweather to also report
the temporarily expected changes instead of just dropping them. e.g.
TEMPO -SHRA SCT018 indicates temporarily rain showers with scattered clouds
at 1800 feet can be expected -
also decode:
 BECMG (becoming)
 NOSIG (no significant change)
 /////  (rain)

I believe thats nothing that the code can't decode already apart from the
prefix (TEMPO, BECMG, NOSIG, ///// etc) so why not decode and add it as a
comment at the end of the report.

Another possible bug is that if you incorrectly specify
$properties['station'], instead of reporting the old "no data" string you
get a hole host of syntax errors.
Also one things I found out under the old version was that if the code could
not get through to the METAR download site (i.e. it was down) it would
update the database with an empty metar entry, surely it would be better to
use the out of date information cached in the database (ok so it's old but
better displying that than nothing), and don't over write a good metar entry
with a blank metar.

If you would like to see the changes I have made to the two files mentioned
above I will send them on to you.

Congrats on a great piece of code - the documentation now looks twice the
size of the code!

Keith Tallent

Reply via email to