CVS: phpweather/doc/src phpweather.texi,1.4,1.5
Brought to you by:
iridium
From: Martin G. <gim...@us...> - 2003-10-10 23:33:33
|
Update of /cvsroot/phpweather/phpweather/doc/src In directory sc8-pr-cvs1:/tmp/cvs-serv5109/doc/src Modified Files: phpweather.texi Log Message: Added latest contributors. I think the AUTHORS file ought to be linked to the Contributors section in the Texinfo source so that the two doesn't have to be keept synchronized. Index: phpweather.texi =================================================================== RCS file: /cvsroot/phpweather/phpweather/doc/src/phpweather.texi,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- phpweather.texi 28 Dec 2002 14:13:53 -0000 1.4 +++ phpweather.texi 10 Oct 2003 23:33:27 -0000 1.5 @@ -2,6 +2,7 @@ @c %**start of header @setfilename phpweather.info @settitle PHP Weather User and Reference Guide +@documentencoding ISO-8859-1 @c @setchapternewpage odd @c %**end of header @@ -17,7 +18,7 @@ @c The following two commands start the copyright page. @page @vskip 0pt plus 1filll -Copyright @copyright{} 2002 Martin Geisler and others, see +Copyright @copyright{} 2002, 2003 Martin Geisler and others, see @ref{Contributors}. Permission is granted to copy, distribute and/or modify this document @@ -494,13 +495,21 @@ The variable @code{$data} is now an multidimensional associative array filled with all the information that the @code{decode_metar} function -was able to extract from the METAR. The different parts in -the METAR is stored under specific keys in the array --- if -the METAR lacks a given part, then the corresponding entry -in the array will be left out. This means, that you'll have to check -each entry with @code{empty} before you use it, otherwise you see -warnings from PHP, if you've set the error reporting level -high enough. +was able to extract from the METAR. The different parts in the METAR +is stored under specific keys in the array --- if the METAR lacks a +given part, then the corresponding entry in the array will be left +out. This means, that you'll have to check each entry with +@code{empty} before you use it, otherwise you see warnings from PHP, +if you've set the error reporting level high enough. + +You can have PHP show you the structure of the array by using the +builtin @code{print_r} function like this: + +@example +echo "<pre>\n"; +print_r($data); +echo "</pre>\n"; +@end example The following entries is always part of a METAR report, and is therefore always part of the decoded METAR array: @@ -525,7 +534,8 @@ @end table -The following entries are optional: +The following entries are all optional so check with @code{empty} +before accessing them: @table @code @@ -543,7 +553,7 @@ The @code{meters_per_second}, @code{miles_per_hour}, and @code{knots} entries tells you the wind speed in various units. -If gust was observer, there will be three extra entries: +If gust was observed, there will be three extra entries: @code{gust_meters_per_second}, @code{gust_miles_per_hour}, and @code{gust_knots}. @@ -586,7 +596,10 @@ @item weather This holds the current weather phenomena and is one of the most -interesting groups. It's an array of weather groups. +interesting groups. It's an array of weather groups which means that +the the first group will be @code{$data['weather'][0]}, the second +group (if there is such a group) will be @code{$data['weather'][1]}, +and so on. Each group contains a @code{proximity} entry which can be either @samp{VC} for phenomena in the vicinity or the empty string otherwise. @@ -707,6 +720,16 @@ Add support for other timezones than UTC so that people can say that they want the time reported in their local timezone. +@item +Have PHP Weather calculate the time of sunset and -rize automatically +based on latitude and longitude data for the stations. This +information would be used to select correct sun/moon images. + +@item +It should be possible to calculate the local time for a given station +based on the same geographical data combined with data about local +daylight saving times. + @end itemize @@ -728,27 +751,25 @@ etc.) that could display the weather. I discovered that they got their data from the NWS who makes the data available at no cost. -The data is available off the Internet via either FTP or -HTTP, so it's easy to get hold of it with PHP. The -only problem was that the data has to be decoded because it's written -in a compact fashion. The data in question is a so-called -METAR report that the airports issue once or twice an hour. - -I then discovered a script written in Perl that could take a -METAR and split it into it's components. The script was -written by Jeremy D. Zawodny @email{Jeremy@@Zawodny.com} and is -licensed under the GPL just like PHP Weather. So there was -no problem with me peeping at his code for PHP Weather. I took the -logic from the Perl script and wrote a function in PHP that -would decode a METAR. +The data is available off the Internet via either FTP or HTTP, so it's +easy to get hold of it with PHP. The only problem was that the data +has to be decoded because it's written in a compact fashion. The data +in question is a so-called METAR report that the airports issue once +or twice an hour. + +I then discovered a script written in Perl that could take a METAR and +split it into it's components. The script was written by Jeremy +D. Zawodny @email{Jeremy@@Zawodny.com} and is licensed under the GPL +just like PHP Weather. So there was no problem with me peeping at his +code for PHP Weather. I took the logic from the Perl script and wrote +a function in PHP that would decode a METAR. But that wouldn't do it --- to be useful the decoded data has to be displayed in a nice fashion, preferable so that it's easy to -customize. The script should also be able to fetch a METAR -from the NWS and once that is done, the METAR -should be cached so that the script would run faster after the -METAR had been fetched once. The problem is, that it takes -about a second to contact the NWS. +customize. The script should also be able to fetch a METAR from the +NWS and once that is done, the METAR should be cached so that the +script would run faster after the METAR had been fetched once. The +problem is, that it takes about a second to contact the NWS. I wanted to see the data I could extract from the METAR in a meaningfull way, so I started wrapping the data in English words to @@ -777,8 +798,8 @@ mess. So I started to split the file up into several files, and also started -to use classes in PHP. This was the first time I had to do -an Object Oriented design, so it was very exciting. +to use classes in PHP. This was the first time I had to do an object +oriented design, so it was very exciting. The result is the current PHP Weather, and it does have a quite flexible structure. All locale-specific code has been moved out from @@ -794,7 +815,10 @@ @chapter Contributors @noindent -The following people have contributed to PHP Weather: +Everybody listed below has helped in some way with the creation of PHP +Weather. If, by some mistake, your name isn't listed below, then send +a mail to @email{gimpster@@gimpster.com} so that proper credit can +given. @table @asis @@ -882,6 +906,85 @@ Lots of different things: bugfixes, clever suggestions, and general maintenance. + +@item Jes@'us Pe@=nas @email{jpc@@educaplus.org} + +Made the Spanish translation. + +@item Ondrej Jombik @email{nepto@@pobox.sk} + +Translated PHP Weather into Slovak and rewrote the navigation system +used in index.php. He also looked at the MySQL and PostgreSQL database +and found some security flaws. + +@item Reini Urban @email{rurban@@xarch.tu-graz.ac.at} + +Fixed some problems with using PHP Weather on a default installation +of PHP 4.2. + +@item Kari Salovaara @email{kari.salovaara@@pp1.inet.fi} and Tage Malmen + +Translated PHP Weater into Swedish and Finnish. + +@item Paul Kairis @email{Paul.Kairis@@sas.com} + +Wrote the code that handles connections through a proxy server. + +@item Bas Elshof @email{bas@@elshof.de} + +Translated PHP Weather into Dutch. + +@item V@'aclav R@'{@dotless{i}}kal @email{vaclavr@@physics.muni.cz} + +Made a Czech translation. + +@item Radoslava Fed@'akov@'a @email{mortischka@@pobox.sk} + +Czech translation. + +@item Guillaume Petit @email{gpetit@@fr.st} + +Translated PHP Weather into French. + +@item Rudy Boedts + +Updated the Dutch translation. + +@item Konrad Tadesse + +Finally, a working German translation. + +@item Andrew Simpson (andrewsimpson) + +Reported problems with the use of short open tags in a couple of +files. + +@item Jim Whitehead @email{jim@@twopalms.com} + +Fixed the rounding of hours and minutes in the pretty-printed report. + +@item Ferhat Bingol @email{s021183@@student.dtu.dk} + +Made a Turkish translation. + +@item Renato Gallmetzer @email{renatogl@@renatogl.com} + +Provided us with an Italian translation. + +@item Pablo Alcaraz (pabloa) + +Updated the Spanish translation and other bugfixes. + +@item Etienne Tourigny (etienne_t) + +Added a method that decodes TAF reports and made some of the database +backends archive the data instead of always replacing the old data +with new reports. + +@item Justin Heideman @email{justin_heideman@@mcad.edu} + +Drew a full set of beautiful icons for PHP Weather to display the +current weather conditions. @end table |