Fred Wunderlich <[EMAIL PROTECTED]> writes:
> A few undefined indexes in the language file:
>
> Undefined index: varying
> Undefined index: greater_than
> Undefined index: wind_calm
>
> No biggee.
>
> Also, some minor spacing needs adjusting to avoid crashing words
> like: "scatteredtowering cumulus"
>
> Again, no biggee.
Thanks for checking this anyway :-)
> A slightly bigger problem is dealing with a garbled or human induced
> messed up metar, like KTIX:
>
> KTIX 171350Z 34009KT 7SM OVC025 19/ A3008
>
> 1.9.1 breaks with:
>
> Warning: Undefined index: dew_c in
> /home/httpd/html/wx/phpwx2_beta/metar_parser.php on line 494
> Warning: Undefined index: dew_c in
> /home/httpd/html/wx/phpwx2_beta/metar_parser.php on line 495
> Warning: Undefined index: dew_c in
> /home/httpd/html/wx/phpwx2_beta/metar_parser.php on line 496
> Warning: Undefined index: dew_c in
> /home/httpd/html/wx/phpwx2_beta/metar_parser.php on line 497
> Warning: Undefined index: dew_c in
> /home/httpd/html/wx/phpwx2_beta/metar_parser.php on line 498
>
> I think we need to try and ignore that which phpweather doesn't understand
> or doesn't make sense?
This is already done - everything that isn't catched by the regular
expresions are considered a remark. In this case, the problem is, that
I just tried to calculate the relative humidity, without checking that
botht the temperature and dew-point is present.
I've made a beta-1.9.2 for you to play with :-)
> I found an easy way to test 1.9.1 was to build a simple array of a
> bunch of station ids and let 'er rip.
>
> BTW, Martin...great job! Very fast ripping through a dozen or so ids
> and spitting 'em back! :)
Great! I've also found that it's pretty quick at decoding the METARs.
On my P200 MMX it takes about 7-12 miliseconds to decode a METAR. It
takes about the same to do a pretty-print.
When I use a local MySQL database, it takes about 5-8 miliseconds to
retrieve the METAR.
It's actually the initial inclusion and parsing of the files that
takes longest - 120 miliseconds on my machine.
> Also, I did find a proposed XML spec at:
>
> http://zowie.metnet.navy.mil/~spawar/JMV-TNG/XML/OMF.html
>
> I think, though, I might build a custom one (XML export) that makes
> a bit more sense to me. :)
That would be cool - good luck. :-)
> -fred
>
>
>
>
>
--
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.