"Keith Tallent" <[EMAIL PROTECTED]> writes:

> 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
> out...superb!
> 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 hope you wasn't too scared by the new version :-) And beware: it's
not stable yet. I think there's still some things that need to be
changed. For example: locale_common.php shouldn't contain the code for
all the different output-functions. That code should be in seperate
files, and then locale_common.php could include the files. We could
place the output-functions in a directory called output/ or something
like that.
> 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.

That's great! Now that I think about it: should we extend pref_units()
so that one can choose between 'metric', 'imperial', and 'aviation'?
> 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.

That would be cool - I just put them into the remarks part, because I
didn't want to deal with them at that time.
> <BUGS!>
> 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.

Ups - that's not the intention. As you, we shouldn't overwrite a good
metar entyr 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.

Or even better yet: if you send me a sourceforge-login, you can update
the files yourself in CVS. If any of you have found some missing
strings in phpweather, then please either send me a sourceforge-login
so that I can give you write-access to CVS, or send me a patch.

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

Very funny ;-) I like these doc-comments, and it appears that they
will be the standard in PEAR (source-code repository in PHP4), so you
better get used to it :-)
> regards
> Keith Tallent

Best regards,
Martin Geisler

Checkout http://www.gimpster.com for:
PHP Weather => Shows the current weather on your webpages.
PHP Shell   => A telnet-connection (almost :-) in a PHP page.

PHPWeather-devel mailing list

Reply via email to