CVS: phpweather phpweather.php,1.39,1.40 stations.csv,1.13,1.14 test....
Brought to you by:
iridium
From: Max H. <ir...@us...> - 2006-03-09 18:32:24
|
Update of /cvsroot/phpweather/phpweather In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19082 Modified Files: phpweather.php stations.csv test.php Log Message: A selection of fixes, thanks all Index: phpweather.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/phpweather.php,v retrieving revision 1.39 retrieving revision 1.40 diff -u -3 -r1.39 -r1.40 --- phpweather.php 30 Jan 2004 20:46:36 -0000 1.39 +++ phpweather.php 9 Mar 2006 18:32:09 -0000 1.40 @@ -196,7 +196,7 @@ for ($i = 0; $i < $num_parts; $i++) { $part = $parts[$i]; - if (ereg('RMK|TEMPO|BECMG|INTER', $part)) { + if (ereg('RMK|AFT|TEMPO|BECMG|INTER', $part)) { /* The rest of the METAR is either a remark or temporary * information. We keep the remark. */ @@ -809,7 +809,7 @@ if($i<$num_parts-1) $part2 = $parts[$i+1]; else $part2 = ''; - if ($part=='RMK') { + if ($part=='RMK' || $part=='AFT') { /* The rest of the TAF is either a remark or temporary * information. We keep the remark. */ Index: stations.csv =================================================================== RCS file: /cvsroot/phpweather/phpweather/stations.csv,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- stations.csv 29 May 2004 16:08:35 -0000 1.13 +++ stations.csv 9 Mar 2006 18:32:09 -0000 1.14 @@ -1,5613 +1,2535 @@ -# Comments start with *one* hash-mark (#). The countries are -# surrounded by *two* marks. They start with a ISO 3166-1-Alpha-2 code -# taken from -# -# http://www.iso.org/iso/en/prods-services/iso3166ma/index.html -# -# Original list made by Sven-Erik Andersen <sve...@an...>. - - -## AF;Afghanistan ## -OAFZ;Faizabad [...8117 lines suppressed...] +OYHD;Hodeidah +OYMB;Marib +OYSH;Sa'Ada / Sadah +OYSN;Sana'A +OYSY;Sayun +OYSQ;Socotra +OYTZ;Taiz + +## ZM;Zambia ## +FLLI;Livingstone +FLLS;Lusaka Internationalairport +FLMF;Mfuwe +FLND;Ndola + +## ZW;Zimbabwe ## +FVCZ;Buffalo Range +FVBU;Bulawayo Airport +FVTL;Gweru +FVHA;Harare Kutsaga +FVMV;Masvingo Index: test.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/test.php,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- test.php 7 Oct 2003 22:31:54 -0000 1.8 +++ test.php 9 Mar 2006 18:32:09 -0000 1.9 @@ -43,7 +43,7 @@ <?php if (!empty($metar)) { - $weather->set_metar($metar); + $weather->set_taf($metar); require(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); require(PHPWEATHER_BASE_DIR . "/output/pw_images.php"); @@ -53,19 +53,20 @@ echo "<h2>Report made by <code>$type</code></h2>\n"; - echo "<p>\n" . $text->print_pretty() . "</p>\n"; + echo "<p>\n" . $text->print_taf() . "</p>\n"; echo "<h2>Images selected by <code>pw_images</code></h2>\n"; - + /* $icons = new pw_images($weather); echo '<p><img src="'.$icons->get_sky_image().'" /> '; echo '<img src="'.$icons->get_winddir_image().'" /> '; echo '<img src="'.$icons->get_temp_image().'" /></p>'; + */ echo "<h2>The decoded METAR follows</h2>\n"; echo "<pre>\n"; - print_r($weather->decode_metar()); + print_r($weather->decode_taf()); echo "</pre>\n"; } |