phpweather-devel Mailing List for PHP Weather (Page 18)
Brought to you by:
iridium
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(2) |
Feb
(52) |
Mar
(79) |
Apr
(9) |
May
(28) |
Jun
(17) |
Jul
(25) |
Aug
(48) |
Sep
(18) |
Oct
(6) |
Nov
|
Dec
(8) |
2003 |
Jan
(26) |
Feb
(10) |
Mar
(2) |
Apr
(21) |
May
(23) |
Jun
(15) |
Jul
(15) |
Aug
(8) |
Sep
(16) |
Oct
(3) |
Nov
(4) |
Dec
|
2004 |
Jan
(35) |
Feb
(35) |
Mar
(9) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(4) |
Feb
(6) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
(5) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: David K. <da...@kj...> - 2002-04-06 16:05:16
|
Max et al; I have downloaded april 6 CVS snapshot to set up on my web page. I have setup the defaults and saved in defaults.php. When I run the index.php I am getting an on-screen warning telling me that header data (line 99) can not be added because ouput has already been started in defaults.php (line 52). I didn't this warning from previous snapshots? |
From: Martin G. <gim...@gi...> - 2002-03-29 16:39:22
|
"Max Hammond" <ma...@fl...> writes: > First, you need to see the structure that a metar is stored in - > just while you're working out what to do next. I've just updated the documentation with a description of the format. You can download the document directly from CVS here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpweather/phpweather/docs/ What do you think about LaTeX? I personally like it because I think the result is superior to what you can make using Docbook or something like that. The files could be converted into HTML using LaTeX2HTML - and with a little luck, then we'll be able to adjust the resulting files so that we can included them on our webpage. =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Max H. <ma...@fl...> - 2002-03-29 01:05:02
|
> $weather = new phpweather(array()); $weather->set_metar('KVCT'); First up, you need to call set_icao('KVCT'); rather than set_metar() [you can use set_metar() to feed it a metar directly for testing] > $text->print_pretty(); > $icons = new pw_images($weather, array()); you don't need to include pw_images or instantiate this class unless you want do display some pretty icons. Now, to get the values out of the metar. I've just comitted a function to CVS that will let you do this - update your code if you're using cvs, or wait for the next tarball if you're not. The easiest way to see how to use it is as follows: First, you need to see the structure that a metar is stored in - just while you're working out what to do next. so echo '<pre>'; print_r($weather->decode_metar()); echo '</pre>'; Next, you need to choose the information you want out. for temperature, you need $metar['temperature']['temp_f'] You can see this in the output from the first bit, where you have [temperature] => Array ( [temp_c] => 25 [temp_f] => 77 [dew_c] => 19 [dew_f] => 66 ) That's telling you that within the array which is storing the metar, there is an array storing the temp, which has an index temp_f with what you need in in. How to get at it: echo $text->get_metar_value('temperature','temp_f'); that function will take up to three arguments, which will drill into arrays stored within the metar. So to get the relative humidity, echo $text->get_metar_value('rel_humidity'); - only one argument because it's not an array of it's own, it's just a value. This is all a bit of a hack, there's something not terribly appealing about having to drill through arrays to find the value you need. I'll see if I have any cunning ideas about how to make it more accessible for extension. Max |
From: Donovan A. H. <do...@hu...> - 2002-03-29 00:02:59
|
I was using the current release version, but decided since the newer version is about to be out it would be best to just start off with the current cvs version. I had most of the it functional with the release version but it seems the syntax has changed, how do I have the current cvs version output the following: (mind giving me some examples) Temp: Wind: Dew Point: Humidity: Visibility: Precipitation: I've looked in the php files but I'm just missing something any assistance would be helpful. Right now I have the below, it is able to output the temp in F. <?php error_reporting(E_ALL); require('./weather/phpweather.php'); require('./weather/pw_utilities.php'); $weather = new phpweather(array()); $weather->set_metar('KVCT'); $language = "en"; include(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); include(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); $type = 'pw_text_' . $language; $text = new $type($weather, array()); $text->print_pretty(); $icons = new pw_images($weather, array()); $temp_f = number_format($temp * (9/5) + 32, 1); echo "$temp_f °F"; ?> Regards, Donovan A. Huff Huff Data Systems Owner/Operator (361) 501-2957 www.huffdatasystems.com |
From: Max H. <ma...@fl...> - 2002-03-28 17:56:33
|
> > Otherwise I will have to find another way to grab them, I'm not > > aware of a method to use cvs under a windows environment (if you > > know tell me and I'll do it that way). > > I know that it's possible to use CVS under Windows, and there are some > links to programs on this page: > > http://www.cvshome.org/cyclic/cvs/windows.html I use CVS under windows with no trouble at all. (I've used it under 98, NT and now 2K) Getting SSH to work with it was more interesting, but no problem now. If you need a hand, drop me a note. Max |
From: Martin G. <gim...@gi...> - 2002-03-28 13:57:29
|
"Donovan A. Huff" <do...@hu...> writes: > Hello, >=20 > I noticed the icon files are not included on the sourceforge package > list.. I'm having to develop from a Windows OS right now, would someone > please stick a icons-1.0.zip of > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpweather/phpweather-1.x > /icons/ etc under the packages section or somewhere??? You can download the latest CVS code here: http://phpweather.net/downloads/ > Otherwise I will have to find another way to grab them, I'm not > aware of a method to use cvs under a windows environment (if you > know tell me and I'll do it that way). I know that it's possible to use CVS under Windows, and there are some links to programs on this page: http://www.cvshome.org/cyclic/cvs/windows.html =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Donovan A. H. <do...@hu...> - 2002-03-28 12:56:23
|
Hello, I noticed the icon files are not included on the sourceforge package list.. I'm having to develop from a Windows OS right now, would someone please stick a icons-1.0.zip of http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpweather/phpweather-1.x /icons/ etc under the packages section or somewhere??? Otherwise I will have to find another way to grab them, I'm not aware of a method to use cvs under a windows environment (if you know tell me and I'll do it that way). Regards, Donovan A. Huff Huff Data Systems Owner/Operator (361) 501-2957 www.huffdatasystems.com |
From: Martin G. <gim...@gi...> - 2002-03-27 22:48:36
|
Hi, Those of you who follow the CVS checkins mailing-list will know, that I've been playing around with the encodings used for the translations. I've convinced Emacs to save the Hungarian translation using the UTF-8 (Unicode) character set. This seams to work well when we also send out a HTTP header that tells the browser about the encoding. But I would like to know if any of you know more about this? I'm so fortunate that all the special characters I normally need are covered by ISO-8859-1 (Latin-1), so I know that there's someone on the list who knows more about this jungle than me :-) We've tested the UTF-8 encoded Hungarian translation in Mozilla 0.9.9, IE 6, and Opera 6. If you want to have a look yourself, then point your favorite browser to this URL: http://phpweather.net/phpweather/index.php =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2002-03-27 17:13:00
|
"Max Hammond" <ma...@fl...> writes: >=20=20 > Hi all, >=20 > Is there anyone on this list with some good experience with > PostGres? I'm working on PHPWeather 2, and I've noticed that the db > abstraction for postgres is missing all the new stuff. Yes, it was just a quick conversion of the code from PHP Weather 1. I'm not even sure that it has been tested... =20 > http://sourceforge.net/tracker/?func=3Ddetail&atid=3D377952&aid=3D535797&= gro > up_id=3D23245 =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Max H. <ma...@fl...> - 2002-03-27 16:58:52
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, Is there anyone on this list with some good experience with PostGres? I'm working on PHPWeather 2, and I've noticed that the db abstraction for postgres is missing all the new stuff. http://sourceforge.net/tracker/?func=detail&atid=377952&aid=535797&gro up_id=23245 Can anyone help? Max - -- A man on a mission is far different from a drone on a deadline. * Rheta Grimsley Johnson -----BEGIN PGP SIGNATURE----- Version: PGP 7.0.4 iQA/AwUBPKH6QyaLdinGu4NfEQK0CwCgn41dfTzaLaTa7pciGiHtPm9F0RMAn0m2 gl/2kBWnXcBnxHDj4QUaUmnd =BfTZ -----END PGP SIGNATURE----- |
From: Martin G. <gim...@gi...> - 2002-03-27 08:53:18
|
"Donovan A. Huff" <do...@hu...> writes: > I have PHPWeather running but I am having a few issues getting the > precipitation to show up, I'd also like to add an image of the > current weather conditions like on the > http://www.moulton-udell.k12.ia.us/ site as described in the below > message. That should be easy now that we have images.inc. That's where the functions that deal with images are defined. The following code works: <?php include('./locale_en.inc'); include('./images.inc'); include('./phpweather.inc'); $metar =3D get_metar('EHEH'); $decoded_metar=3Dprocess_metar($metar); ?> <img src=3D"<? get_temp_image($decoded_metar) ?>" height=3D"50" width=3D"20= " border=3D"1"> <img src=3D"<? get_winddir_image($decoded_metar) ?>" height=3D"40" width=3D= "40" border=3D"1"> <img src=3D"<? get_sky_image($decoded_metar) ?>" height=3D"50" width=3D"80"= border=3D"1"> The code is taken from the file tables.php which is also in CVS in the phpweather-1.x directory. There you'll find a comprehensive test of the functions that deal with images. =20 > It seems like I'm making this process over complicated, but it is > working all except for the precipin and I believe that is due to the > wrong syntax. The problem is, that the precip_6h_in entry isn't a standard field in the METARs. So you cannot rely on it being available at all times, if at all. > Here is the current code I am using: >=20 > -- start -- >=20 > <?php > include('./weather/phpweather.inc'); > include('./weather/locale_en.inc'); > $metar =3D get_metar('KVCT'); > $data =3D process_metar($metar); > $temp_f =3D $data['temp_f']; > $windmph =3D $data['wind_miles_per_hour']; > $winddir =3D $data['wind_dir_text_short']; > $dewf =3D $data['dew_f']; > $humidity =3D $data['rel_humidity']; > $visibility =3D $data['visibility_miles']; > $precipin =3D $data['precip_6h_in']; Something like this would probably be better: if (empty($data['precip_6h_in'])) { $precipin =3D 'None'; } else { $precipin =3D $data['precip_6h_in']; } =20 =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Donovan A. H. <do...@hu...> - 2002-03-27 02:12:11
|
I have PHPWeather running but I am having a few issues getting the precipitation to show up, I'd also like to add an image of the current weather conditions like on the http://www.moulton-udell.k12.ia.us/ site as described in the below message. It seems like I'm making this process over complicated, but it is working all except for the precipin and I believe that is due to the wrong syntax. Here is the current code I am using: -- start -- <?php include('./weather/phpweather.inc'); include('./weather/locale_en.inc'); $metar = get_metar('KVCT'); $data = process_metar($metar); $temp_f = $data['temp_f']; $windmph = $data['wind_miles_per_hour']; $winddir = $data['wind_dir_text_short']; $dewf = $data['dew_f']; $humidity = $data['rel_humidity']; $visibility = $data['visibility_miles']; $precipin = $data['precip_6h_in']; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Temp:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$temp_f °F</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Wind:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$windmph mph $winddir</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Dew Point:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$dewf °F</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Humidity:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$humidity %</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Visibility:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$visibility m</font></div></td></tr>"; echo "<tr><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">Precipitation:</font></div></td><td><font face=\"Arial, Helvetica, sans-serif\" size=\"1\" color=\"#000000\">$precipin</font></div></td></tr>"; ?> -- end -- Regards, Donovan A. Huff Huff Data Systems Owner/Operator (361) 501-2957 www.huffdatasystems.com Message: 8094298 FROM: Kevin GodbyDATE: 03/13/2002 14:29:00SUBJECT: RE: Bug' with weather icons (images.inc) allo! on 3/13/02 3:01 PM, Ray van Beek at <EMAIL: PROTECTED> wrote: > Well, my web site is here: http://www.moulton-udell.k12.ia.us/ The > weather > is located in the navigation column on the left-hand side (at the bottom). > It looks okay in IE, but for some reason, my columns get squished in > Netscape. I'm still trying to work on that. > > I found it. Great! Do you mind if I reference your site on my 'Online > weather' project page http://www.devolder.nl ? Be my guest! I found it extraordinarily easy to use the phpweather.inc and images.inc files. Works marvelously! >This way if there is no current weather data in the metar, it will fall >back >on the cloud condition. Hope this helps. > > That *is* a good idea. Well, I don't know if most weather stations report current weather conditions frequently or not. But the station I'm using doesn't appear to use them very often, so instead of printing nothing, I decided to print the cloud conditions. It's a little more useful that way. > Now Kevin, I like the today's specials for lunch. Maybe I'll drop by :-) <grin> Well then, you won't want to miss tomorrow's lunch -- we're having turkey fritters and hash browns! Thanks again for the script and graphics -- they look great! ---- Kevin Godby <<EMAIL: PROTECTED>> Technology Coordinator Moulton-Udell Community School District 305 E. Eighth St. Phone: (641) 642-8131 Moulton, Iowa 52572 Fax: (641) 642-3461 |
From: Gyulai <gy...@fb...> - 2002-03-26 19:38:38
|
Max Hammond =EDrta, 2002-03-26, 18:42-kor kelt level=E9ben, ami 49 so= rb=F3l =E1llt: > Windchill is the temperature that a person feels - You know that if > the wind is blowing strongly, it feels colder? Ok, it's clear now... Thanks. We have the word in Hungarian... :) --=20 Mih=E1ly Gyulai http://gyulai.freeyellow.com/ |
From: Martin G. <gim...@gi...> - 2002-03-26 19:27:01
|
"Max Hammond" <ma...@fl...> writes: > Hi all, >=20 > I was thinking about having an option to include smaller icons > instead - the set on http://www.met-office.gov.uk/weather/key.html > seem to be ripe for adaption - what do we think? I like them! But we cannot just steal them, we'll have to ask for permission first. =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Max H. <ma...@fl...> - 2002-03-26 18:42:43
|
Windchill is the temperature that a person feels - You know that if the w= ind is blowing strongly, it feels colder? That's what this is. The stronger t= he wind blows, the colder it feels. The number that it gives here is the temperature that it will feel like to a person. Max -- A man on a mission is far different from a drone on a deadline. * Rheta Grimsley Johnson > -----Original Message----- > From: php...@li... > [mailto:php...@li...]On Behalf Of > Gyulai Mih=E1ly > Sent: 26 March 2002 18:38 > To: php...@li... > Subject: Re: Translations need updating... > > > Martin Geisler =EDrta, 2002-03-24, 21:05-kor kelt level=E9ben, ami 37 > sorb=F3l =E1llt: > > > I've just applied the patch for windchill support to PHP Weather 1.x. > > Can anyone explain to me what 'windchill' is? I am not a professional > translator and it seems that I have an old dictionary which does not > contain this word... > > Please explain it to me with other words, expressions, or how its > look & feel... :) > > -- > Mih=E1ly Gyulai http://gyulai.freeyellow.com/ > > > _______________________________________________ > PHPWeather-devel mailing list > PHP...@li... > https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: Gyulai <gy...@fb...> - 2002-03-26 18:38:27
|
Martin Geisler =EDrta, 2002-03-24, 21:05-kor kelt level=E9ben, ami 37= sorb=F3l =E1llt: > I've just applied the patch for windchill support to PHP Weather 1.= x. Can anyone explain to me what 'windchill' is? I am not a professional translator and it seems that I have an old dictionary which does not contain this word... Please explain it to me with other words, expressions, or how its look & feel... :) --=20 Mih=E1ly Gyulai http://gyulai.freeyellow.com/ |
From: Max H. <ma...@fl...> - 2002-03-26 18:09:44
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I was thinking about having an option to include smaller icons instead - the set on http://www.met-office.gov.uk/weather/key.html seem to be ripe for adaption - what do we think? Max - -- A man on a mission is far different from a drone on a deadline. * Rheta Grimsley Johnson -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> iQA/AwUBPKC5YiaLdinGu4NfEQIefACgkrgiNiFgLwOUpRv8sYEGoHEQYBYAnivg 9Jr90tjsBt3lQsferI9j9Raz =5dic -----END PGP SIGNATURE----- |
From: Max H. <ma...@fl...> - 2002-03-26 17:46:59
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Maybe you could add a metar-check-hook. Normally, it doesn't check. > By setting a hook to a check routine (in a separate file or > something), you can > check the metar syntax immediately after processing it. > This way, you can concentrate on the metar decoder now, and add > the checking > software later, and have severa subsequent versions without > changing the metar decoder. > > I don't know if this fits in your phpweather 2 design. It's probably just as easy to include it in the phpweather.inc for 1.x, and in the phpweather class for phpweather 2 - it's not really any conceptually different from the sections of code that actually do the decoding. The question is, what do we do if it doesn't check out? Like in the example from EGBE, most of that metar was okay, but the wind was wrong. Do we want to err on the safe side, and discard the whole lot? Max -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> iQA/AwUBPKC0CyaLdinGu4NfEQKABgCgrWTdxAKbApbp/FNEAv9y0Y1bEBgAn0I2 3qy32o6Z+Ifoa8GUZ9Hev3GQ =ROu0 -----END PGP SIGNATURE----- |
From: Ray v. B. <r_v...@ho...> - 2002-03-26 17:32:30
|
Maybe you could add a metar-check-hook. Normally, it doesn't check. By setting a hook to a check routine (in a separate file or something), you can check the metar syntax immediately after processing it. This way, you can concentrate on the metar decoder now, and add the checking software later, and have severa subsequent versions without changing the metar decoder. I don't know if this fits in your phpweather 2 design. Greetz, Ray >From: Martin Geisler <gim...@gi...> >Reply-To: Martin Geisler <gim...@gi...> >To: php...@li... >Subject: Re: SV: Strange METAR >Date: Tue, 26 Mar 2002 17:42:38 +0100 > >"Funder, Johnny OTP" <jh...@NA...> writes: > >Hi Johnny > > > You are right 0200KT is wrong. Looking at the current weather in > > England my guess is that the last number of the velosity is missing > > should most likely read 02007KT og something like that. > >OK, but that would be rather difficult for the script to figure that >out by itself :-) > > > The reason the decoding is fooled, is (as I have mentioned before) > > because each group is decoded as a group by it self and not in the > > context of the message. > >I know - it should probably be reworked a bit. > > > Normally when decoding metars we make sure that the sequence of the > > groups are correct and that eg. there must be a cloud group and if a > > weathergroup is present it must be placed correctly in the metar > > message. > >Hmm, we should probably have such logic in PHP Weather too. Let's look >at that when we have a version 2 ready... > >-- >Martin Geisler My GnuPG Key: 0xF7F6B57B > >See my homepage at http://www.gimpster.com/ for: >PHP Weather => Shows the current weather on your webpage. >PHP Shell => A telnet-connection (almost :-) in a PHP page. ><< attach3 >> _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com |
From: Martin G. <gim...@gi...> - 2002-03-26 16:42:45
|
"Funder, Johnny OTP" <jh...@NA...> writes: Hi Johnny =20 > You are right 0200KT is wrong. Looking at the current weather in > England my guess is that the last number of the velosity is missing > should most likely read 02007KT og something like that. OK, but that would be rather difficult for the script to figure that out by itself :-) =20 > The reason the decoding is fooled, is (as I have mentioned before) > because each group is decoded as a group by it self and not in the > context of the message. I know - it should probably be reworked a bit. > Normally when decoding metars we make sure that the sequence of the > groups are correct and that eg. there must be a cloud group and if a > weathergroup is present it must be placed correctly in the metar > message. Hmm, we should probably have such logic in PHP Weather too. Let's look at that when we have a version 2 ready... =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Funder, J. O. <jh...@NA...> - 2002-03-26 11:35:53
|
Hi Martin, You are right 0200KT is wrong. Looking at the current weather in England my guess is that the last number of the velosity is missing should most likely read 02007KT og something like that. The reason the decoding is fooled, is (as I have mentioned before) because each group is decoded as a group by it self and not in the context of the message. Normally when decoding metars we make sure that the sequence of the groups are correct and that eg. there must be a cloud group and if a weathergroup is present it must be placed correctly in the metar message. rgds Johnny -----Oprindelig meddelelse----- Fra: Martin Geisler [mailto:gim...@gi...] Sendt: 26. marts 2002 10:45 Til: PHP Weather Emne: Strange METAR Hi again, I just saw this METAR: EGBE 260820Z 0200KT 340V060 CAVOK 06/02 Q1033 There's an error in the windgroup (0200KT), isn't there? Johnny? It fools the get_winddir_image() method in pw_images.php because the '340V060' makes the 'wind' entry non-empty, but still, there's no 'deg' entry because '0200KT' is malformed. The fix is trivial in pw_images.php, but I just wanted to make sure, that it's the METAR that's wrong, and not the parsing. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2002-03-26 09:44:45
|
Hi again, I just saw this METAR: EGBE 260820Z 0200KT 340V060 CAVOK 06/02 Q1033 There's an error in the windgroup (0200KT), isn't there? Johnny? It fools the get_winddir_image() method in pw_images.php because the '340V060' makes the 'wind' entry non-empty, but still, there's no 'deg' entry because '0200KT' is malformed. The fix is trivial in pw_images.php, but I just wanted to make sure, that it's the METAR that's wrong, and not the parsing. =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2002-03-26 09:37:54
|
Hi all, There's now data available at SourceForge, have a look for yourself: http://phpweather.sourceforge.net/phpweather/index.php The data comes from the cycle-files produced by the NWS: http://weather.noaa.gov/weather/metar.shtml#files Each file contains the data for the corresponding cycle, and a cycle is from x:45 to (x+1):44. The difficult thing is to update the database at the right time. I've set up a cronjob at SourceForge that updates it 11, 24, and 52 minutes past each hour. The check at 11 minutes past catches most stations. Some stations make two reports each hour, (say at 50 and 20) so we check again at 24 minutes past to catch those as well. The last check is an attempt to catch the rest. It might be unnecessary. We might have to process the old cycle files one more time. The data is appended to the files as it is received. So, if a report is inserted into a file that's older than one hour, then we wont see it. I don't know how often this happens... =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2002-03-26 08:37:35
|
"Ray van Beek" <r_v...@ho...> writes: >> Have you included the right version? This looks like what's there >> already :) >=20 >=20 > Oops! Sorry, here is the real dutch one, Thanks a lot! I've commited it to CVS. If only the others translators would hurry up so that we can release this thing... =2D-=20 Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather =3D> Shows the current weather on your webpage. PHP Shell =3D> A telnet-connection (almost :-) in a PHP page. |
From: Ray v. B. <r_v...@ho...> - 2002-03-26 07:11:14
|
>Have you included the right version? This looks like what's there already >:) Oops! Sorry, here is the real dutch one, Ray <?php /* * This file holds the Dutch translation of PHP Weather. To use it, * just include it in the main phpweather.inc file. * * Author: Nicky Haan <ni...@ne...> * Raymond van Bek <r_v...@ho...> */ /* Unsets old language variables and loads new ones. */ if (isset($strings)) { /* The strings array is loaded - assume the same for the rest. */ unset($strings); unset($wind_dir_text_short_array); unset($wind_dir_text_array); unset($weather_array); unset($cloud_condition_array); } /* Load the new strings */ $strings = array( 'no_data' => '<blockquote><p>Helaas, er is geen data beschikbaar voor %s.</p></blockquote>', 'mm_inches' => '<b>%s</b> mm (<b>%s</b> inch', 'precip_a_trace' => 'een spoor', 'precip_there_was' => 'Er was %s neerslag ', 'sky_str_format1' => 'er was <b>%s</b> op een hoogte van <b>%s</b> meter (<b>%s</b> voet)', 'sky_str_clear' => 'er was <b>geen</b> bewolking', 'sky_str_format2' => ', <b>%s</b> op een hoogte van <b>%s</b> meter (<b>%s</b> voet) en <b>%s</b> op een hoogte van <b>%s</b> meter (<b>%s</b> voet)', 'sky_str_format3' => ' en <b>%s</b> op een hoogte van <b>%s</b> meter (<b>%s</b> voet)', 'sky_cavok' => 'Er is geen bewolking beneden <b>1,524</b> meter (<b>5,000</b> voet)', 'clouds' => ' bewolking', 'clouds_cb' => ' buienwolken', 'clouds_tcu' => ' stapelwolking', 'visibility_format' => 'De zichtbaarheid was <b>%s</b> kilometer (<b>%s</b> mijl).', 'wind_str_format1' => 'met windsnelheden van <b>%s</b> meter per seconde(<b>%s</b> mijl per uur)', 'wind_str_format2' => ', met vlagen tot <b>%s</b> meter per seconde (<b>%s</b> mijl per uur),', 'wind_str_format3' => ' vanuit <b>%s</b>', 'wind_str_calm' => '<b>kalm</b>', 'wind_vrb_long' => 'variable richtingen', 'wind_vrb_short' => 'VAR', 'windchill' => ' de gevoelstemperatuur is <b>%s</b> °C (<b>%s</b> °F) ', 'precip_last_hour' => 'in het laatste uur. ', 'precip_last_6_hours' => 'in de laatste 3 tot 6 uur. ', 'precip_last_24_hours' => 'in de laatste 24 uur. ', 'precip_snow' => 'Er is <b>%s</b> mm (<b>%s</b> inch) sneeuw op de grond. ', 'temp_min_max_6_hours' => 'De maximum en minumum temperaturen over de laatste 6 uur waren <b>%s</b> en <b>%s</b> graden Celsius (<b>%s</b> en <b>%s</b> graden Fahrenheit).', 'temp_max_6_hours' => 'De maximum temperatuur over de laatste 6 uur was <b>%s</b> graden Celsius (<b>%s</b> graden Fahrenheit). ', 'temp_min_6_hours' => 'De minumum temperatuur over de laatste 6 uur was <b>%s</b> graden Celsius (<b>%s</b> graden Fahrenheit). ', 'temp_min_max_24_hours' => 'De maximum en minumum temperaturen over de laatste 24 uur waren <b>%s</b> en <b>%s</b> graden Celsius (<b>%s</b> en <b>%s</b> graden Fahrenheit). ', 'runway_vis' => 'De zichtbare baanlengte voor startbaan <b>%s</b> is <b>%s</b> meter (<b>%s</b> voet).', 'runway_vis_min_max' => 'De zichtbare baanlengte voor startbaan <b>%s</b> varieert tussen <b>%s</b> meter (<b>%s</b> voet) en <b>%s</b> meter (<b>%s</b> voet).', 'light' => 'Licht ', 'moderate' => 'Gematigd ', 'Heavy' => 'Zwaar ', 'nearby' => 'Dichtbij ', 'current_weather' => 'Het huidige weer is <b>%s</b>. ', 'pretty_print_metar' => '<blockquote><p><b>%s</b> minuten geleden, om <b>%s</b> UTC, de wind blies %s nabij %s. De temperatuur was <b>%s</b> graden Celsius (<b>%s</b> graden Fahrenheit), %s en de barometerdruk was <b>%s</b> hPa (<b>%s</b> inHg). De relatieve vochtigheid was <b>%s%%</b>. %s %s %s %s %s</p></blockquote>'); $wind_dir_text_short_array = array( 'N', 'NNO', 'NO', 'ONO', 'O', 'OZO', 'ZO', 'ZZO', 'Z', 'ZZW', 'ZW', 'WZW', 'W', 'WNW', 'NW', 'NNW', 'N'); $wind_dir_text_array = array( 'Noord', 'Noord-noordoost', 'Noordoost', 'Oost-noordoost', 'Oost', 'Oost-zuidoost', 'Zuidoost', 'Zuid-zuidoost', 'Zuid', 'Zuid-zuidwest', 'Zuidwest', 'West-zuidwest', 'West', 'West-noordwest', 'Noordwest', 'Noord-noordwest', 'Noord'); $weather_array = array( 'MI' => 'Shallow ', 'PR' => 'Deeltje ', 'BC' => 'Flarden ', 'DR' => 'Laag optrekkende ', 'BL' => 'Blazen ', 'SH' => 'Bui(en) ', 'TS' => 'Onweersbui ', 'FZ' => 'Vriest', 'DZ' => 'Motregen ', 'RA' => 'Regen ', 'SN' => 'Sneeuw ', 'SG' => 'Motsneeuw ', 'IC' => 'IJs Kristallen ', 'PE' => 'IJs Hagel ', 'GR' => 'Hagel ', 'GS' => 'Fijne Hagel en/of Motsneeuw ', 'UP' => 'Onbekend ', 'BR' => 'Mist ', 'FG' => 'Mist ', 'FU' => 'Rook ', 'VA' => 'Vulkanische As ', 'DU' => 'Wijdeverspreide Stofdeeltjes ', 'SA' => 'Zand ', 'HZ' => 'Nevel ', 'PY' => 'Nevel', 'PO' => 'StuifZand/-Stof ', 'SQ' => 'Vlagen ', 'FC' => 'Trechtervormige Tornado Waterhoos ', 'SS' => 'Zandstorm/Stofstorm '); $cloud_condition_array = array( 'SKC' => 'helder', 'CLR' => 'helder', 'VV' => 'vertikale zichtbaarheid', 'FEW' => 'weinig', 'SCT' => 'verspreide', 'BKN' => 'gebroken', 'OVC' => 'betrekkelijk'); ?> _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |