phpweather-devel Mailing List for PHP Weather (Page 16)
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: Martin G. <gim...@gi...> - 2002-06-29 11:07:23
|
Ondrej Jombik <ne...@po...> writes: > Maxim, 11:54:35 > 29. jun 2002 (sobota) > Geetings! >=20 > I have problems with the following phrases, because they are > not in any from my dictonaries. I know the meaning of verb > `cumulate', but I don't understand how it is connected with these > phrases. >=20 > $this->strings['cumulonimbus'] =3D ' cumulonimbus'; > $this->strings['towering_cumulus'] =3D ' towering cumulus'; >=20 > Is there some explainations of used weather terms in > phpWeather? I'm not very familiar with meteorology and it will help > me a lot. :) No, there's currently no extra explainations... I can see that they would be helpfull - I remember that I had to consult a Danish-English dictionary several times when I did the Danish translation. In your particular case, then the words 'cumulonimbus' and 'towering cumulus' refer to a particular kind of clouds: big fluffy clouds. There's a description on these webpages: http://www.doc.mmu.ac.uk/aric/eae/Weather/Older/Cumulonimbus_Clouds.html http://www.doc.mmu.ac.uk/aric/eae/Weather/Older/Cumulus_Clouds.html > I also ask you for the way of testing translation. I > downloaded around 400 metars and I'm going through every one and > test if translation is correct. If not appropriate corrections are > done. Wow - you're being careful! Impressive. > Although this, it does not seems to be good way, because metars are > often similar or the same and thus I will not test all metar > possibilities and cases. Yes, I agree. I've thought about making a tool that could test the different combinations - that would also make it easier for us to test if PHP Weather can handle strange METARs. =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-06-29 10:47:47
|
Ondrej Jombik <ne...@po...> writes: > Maxim, 00:03:18 > 29. jun 2002 (sobota) > Greetings! >=20 > In output/pw_lang_en.php file is this: >=20 > $this->strings['weather'] =3D > array( > .. > 'IC' =3D> ' ice crystals', > 'PL' =3D> ' ice pellets', > .. >=20 > But in phpweather.php file is no test for PL, but only for PE. > Look at 'Precipitation' line of code below. >=20 > I suppose, that only one from these shold be used, PL or PE. > What do you think about this? You're right - there is a problem. The code for icepellets was changed in 1998 from PE to PL but somehow this isn't reflected in PHP Weather. I'll change the code so that it tests for PL instead of PE. =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: Ondrej J. <ne...@po...> - 2002-06-29 10:18:59
|
Maxim, 11:54:35 29. jun 2002 (sobota) Geetings! I have problems with the following phrases, because they are not in any from my dictonaries. I know the meaning of verb `cumulate', but I don't understand how it is connected with these phrases. $this->strings['cumulonimbus'] = ' cumulonimbus'; $this->strings['towering_cumulus'] = ' towering cumulus'; Is there some explainations of used weather terms in phpWeather? I'm not very familiar with meteorology and it will help me a lot. :) I also ask you for the way of testing translation. I downloaded around 400 metars and I'm going through every one and test if translation is correct. If not appropriate corrections are done. Although this, it does not seems to be good way, because metars are often similar or the same and thus I will not test all metar possibilities and cases. Thanks, =Nepto= ____________________________________________________________________________ Ondrej 'Nepto' Jombik, Open Source software developer, http://www.platon.sk/ |
From: Ondrej J. <ne...@po...> - 2002-06-29 10:18:59
|
Maxim, 00:03:18 29. jun 2002 (sobota) Greetings! In output/pw_lang_en.php file is this: $this->strings['weather'] = array( ... 'IC' => ' ice crystals', 'PL' => ' ice pellets', ... But in phpweather.php file is no test for PL, but only for PE. Look at 'Precipitation' line of code below. ... } elseif (ereg('^(VC)?' . /* Proximity */ '(-|\+)?' . /* Intensity */ '(MI|PR|BC|DR|BL|SH|TS|FZ)?' . /* Descriptor */ '((DZ|RA|SN|SG|IC|PE|GR|GS|UP)+)?' . /* Precipitation */ '(BR|FG|FU|VA|DU|SA|HZ|PY)?' . /* Obscuration */ '(PO|SQ|FC|SS)?$', /* Other */ $part, $regs)) { ... I suppose, that only one from these shold be used, PL or PE. What do you think about this? =Nepto= ____________________________________________________________________________ Ondrej 'Nepto' Jombik, http://www.nepto.sk/ ne...@at... |
From: Ondrej J. <ne...@po...> - 2002-06-28 20:40:32
|
Maxim, 20:46:05 28. jun 2002 (piatok) Greetings! Following metar causes several warnings: cc: IN, icao: VABB 201530Z VABB 24012KT 5000 FU FEW018 SCT025 28/22 Q1004 NOSIG I have one another question. What does it means "The temperature feels like"? I don't understand this issue, so I can't properly translate it into Slovak language. I hope your explaination will help me. Thanks, =Nepto= ____________________________________________________________________________ Ondrej 'Nepto' Jombik, perl -le '$_=1;(1x$_)!~/^(11+)\1+$/&&print while$_++' |
From: Martin G. <gim...@gi...> - 2002-06-28 18:21:56
|
Hi everybody! I've finished by exams for this round, so now I have time to look at PHP Weather again - yeah! I've been doing some cleaning today on the 1.x version. Unless someone objects, then I would like to make a release of the code found in CVS very soon (tomorrow). It's about time that people get a chance to enjoy the new icons! So, please have a look at the code - correct any embarrassing typos I've made etc... Also, I think we can make a release of version 2.0 soon. It's been running on gimpster.com lately, and I haven't seen any problems with it. =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: <no...@so...> - 2002-06-28 18:13:42
|
Feature Requests item #545190, was opened at 2002-04-17 16:31 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=545190&group_id=23245 Category: None Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Logo Image Initial Comment: I have worked up a .jpg image quite a bit different than the logo you currently have. Sort of a more professional image - would like to know if I can send it to someone to check out. Email me - rga...@mo... ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2002-06-28 20:13 Message: Logged In: YES user_id=104098 I've seen the image, but I think we should continue to use the ones designed by Max Hammond (Iridium). ---------------------------------------------------------------------- Comment By: Max Hammond (iridium) Date: 2002-04-17 17:31 Message: Logged In: YES user_id=81516 You can just attach the file to this tracker... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=545190&group_id=23245 |
From: <no...@so...> - 2002-06-28 18:10:51
|
Feature Requests item #573470, was opened at 2002-06-25 04:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=573470&group_id=23245 Category: Localisation Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) >Summary: Missing Portuguese translation? Initial Comment: I can't find anywere on this site the file for Portugal.. But you show the weather on your demo site... How can I get that file to use on my web site? ---------------------------------------------------------------------- >Comment By: Martin Geisler (gimpster) Date: 2002-06-28 20:10 Message: Logged In: YES user_id=104098 It's only the old version 1.x that has been translated into Portuguese. (Version 1.x is the one you can download from the Files section here at SourceForge.) The new beta version (2.x) found in CVS has been translated into English, Danish, Hungarian, Spanish and Norwegian but not Porguguese. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=573470&group_id=23245 |
From: Martin G. <gim...@gi...> - 2002-06-26 12:31:21
|
"Tom Grant" <Tom...@LA...> writes: > I currently have v 1.6x setup at: > http://codeworks.org/phpweather/dtn.php displaying a table with 12 > airports from our local area (within a couple of hundred miles). It > currently gives an error if the cloud array is empty. >=20 > I've decided to make it work with the new version... Cool! =20 > Here's my test code for accessing array elements directly. I used as > a base a reply to a question on this list from back in March. >=20 > Apparently the get_metar_value function doesn't exist anymore. Has > it been replaced? No, it's hiding in the output/pw_text.php file... But there's no real reason to use that function instead of just accessing the array yourself - the following pieces of code to exactly the same: <?php $weather =3D new phpweather(); $data =3D $weather->decode_metar(); $temp =3D $data['temperature']['temp_c']; $hum =3D $data['rel_humidity']; ?> <?php $weather =3D new phpweather(); $text =3D new pw_text($weather); $temp =3D $text->get_metar_value('temperature', 'temp_c'); $hum =3D $text->get_metar_value('rel_humidity'); ?> The get_metar_value method is just a wrapper around the associative array returned by a call to decode_metar. > Or, do I need to include some other files. I've searched through > most of the files, but haven't been able to find it. Hehe - I couldn't find it either until I used 'grep' recursively on all the files :-) =20 > All help is appreciated! >=20 > Thanks! >=20 > <?php > error_reporting(E_ALL); >=20 > require('./phpweather.php'); > require('./pw_utilities.php'); >=20 > $weather =3D new phpweather(array()); $weather->set_icao('KDTN'); The above line should be shortened into this: $weather =3D new phpweather(array('icao' =3D> 'KDTN')); The array-argument is meant to be used when you know some values at the time you construct the object. =20 > $language =3D "en"; >=20 > include(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); > $type =3D 'pw_text_' . $language; > $text =3D new $type($weather, array()); It's no longer necessary to use array() as a second argument it's the default value. Since you're fiddling with the raw data returned by decode_metar, you'll probably be interested in this: The Raw Data =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D It's easy for you to get hold of the raw data produced by the code in `phpweather.php': $weather =3D new phpweather(); $data =3D $weather->decode_metar(); The variable `$data' is now an multidimensional associative array filled with all the information that the `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 `empty' before you use it, otherwise you see warnings from PHP, if you've set the error reporting level high enough. The following entries is always part of a METAR report, and is therefore always part of the decoded METAR array: `type' This can either be `METAR' or `SPECI' and denotes the type of the report. This isn't used for anything. `metar' The raw METAR report. `icao' The ICAO of the station which made the report. `location' The English name of the station. `time' A UNIX timestamp corresponding to the time of the report. The following entries are optional: `report_mod' A report modifier which gives information about how the report was made: `AUTO' for a fully automated report with no human intervention or `COR' for a corrected report. It's supposed to be part of all METARs, but experience shows that it's not. `wind' This is an array with information about the wind. The `deg' entry tells you the direction of the wind as compass-direction. If the wind came from variable directions, then will be the string `VRB'. The `meters_per_second', `miles_per_hour', and `knots' entries tells you the wind speed in various units. If gust was observer, there will be three extra entries: `gust_meters_per_second', `gust_miles_per_hour', and `gust_knots'. If the wind was varying, then two extra entries are present: `var_beg' and `var_end'. Both of these entries contain a compass-direction `visibility' This is an array with visibility information. Each entry in the array is a separate visibility group. Each visibility group contains a `prefix' which can be `-1', `0', or `1' which tells you if the visibility reported is "less than", "normal", or "greater than" respectively. The visibility itself is stored in the `meter', `km', `ft', and `miles' entries. There is an optional entry `dir' for a direction -- if there's no direction, then the visibility refers to the overall visibility. `runway' This is an array of runway groups. Each entry is a separate group. The groups contain an `nr' entry and an optional `approach' entry which tells you the runway-number and the approach respectively. The approach is one of `L', `C', or `R' for "left", "center", or "right" respectively. The visibility information can either be a single value or a pair of values in case of varying conditions. If there's only a single value, then `meter' and `ft' holds the visibility, an optional `prefix' can be `-1' if range is less than the lowest reportable value or `1' if greater than the greatest reportable value. A `tendency' entry holds either `D', `N' or `U' for "downward tendency", "no distinct tendency", or "upward tendency" respectively. `weather' This holds the current weather phenomena and is one of the most interesting groups. It's an array of weather groups. Each group contains a `proximity' entry which can be either `VC' for phenomena in the vicinity or the empty string otherwise. Next comes the `intensity'. This can be `-' for light phenomena, the empty string for moderate phenomena, or `+' for heavy phenomena. This is followed by a `descriptor', a `precipitation', a `obscuration', and finally a `other' entry. These entries contain the actual data found in the METAR. This means that it's up to the application to decode these symbols further, so that `RA' becomes "rain" and so on. `clouds' This is an array of cloud groups. Each group has a `condition' entry which can be either `CAVOK' for no clouds and no significant weather, `VV' for "vertical visibility", `FEW' for "few clouds", `SCT' for "scattered clouds", `BKN' for "broken clouds", `OVC' for "overcast", and `SKC' and `CLR' for "clear sky". The condition `CAVOK' is a bit special, because if it's present, then the `condition' entry will be the only entry in the cloud group. The other conditions will be part of a larger array with an optional `cumulus' entry denoting the presence of cumulonimbus (`CB') or towering cumulus (`TCU') clouds. There will also be `meter' and `ft' entries with the height of the clouds. If the clouds are below the station, then the height will be stored as `nil'. Theres an optional `prefix' with the usual meaning. `temperature' This is the temperature group. It's an array with two or four entries: `temp_c' and `temp_f' is always present and is the temperature in degrees Celsius and Fahrenheit respectively. If information about the dew-point is present, then `dew_c' and `dew_f' will be added to the array. `temp_min_max' Some stations report the minimum and maximum temperature over various timescales. The temperatures are stored in `min6h_c', `min6h_f', `max6h_c' and `max6h_f' for the temperatures in the last 6 hours, and in `min24h_c', `min24h_f', `max24h_c' and `max24h_f' for the temperatures in the last 24 hours. `altimeter' This is the air pressure measured in various units. The array has these entries: `inhg', `mmhg', `hpa', and `atm'. `precipitation' This is an array which stores the precipitation measured over various timescales. The entries `mm' and `in' contains the precipitation during the last hour, entries `mm_h6' and `in_6h' store the amount of precipitation in the last 3-6 hours and finally there's `mm_24h' and `in_24h' with the precipitation measured over the last 24 hours. If there has been snowfall, then that will be reported in the `snow_mm' and `snow_in' entries. All the entries can contain the special value `-1' which means that there was only a trace of precipitation. `remarks' Anything which isn't recognized is added to this entry. =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: <no...@so...> - 2002-06-25 02:57:46
|
Feature Requests item #573470, was opened at 2002-06-24 19:57 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=573470&group_id=23245 Category: Localisation Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Portugal Initial Comment: I can't find anywere on this site the file for Portugal.. But you show the weather on your demo site... How can I get that file to use on my web site? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377955&aid=573470&group_id=23245 |
From: Tom G. <Tom...@LA...> - 2002-06-20 20:11:29
|
I currently have v 1.6x setup at: http://codeworks.org/phpweather/dtn.php displaying a table with 12 airports from our local area (within a couple of hundred miles). It currently gives an error if the cloud array is empty. I've decided to make it work with the new version... Here's my test code for accessing array elements directly. I used as a base a reply to a question on this list from back in March. Apparently the get_metar_value function doesn't exist anymore. Has it been replaced? Or, do I need to include some other files. I've searched through most of the files, but haven't been able to find it. All help is appreciated! Thanks! <?php error_reporting(E_ALL); require('./phpweather.php'); require('./pw_utilities.php'); $weather = new phpweather(array()); $weather->set_icao('KDTN'); $language = "en"; include(PHPWEATHER_BASE_DIR . "/output/pw_text_$language.php"); $type = 'pw_text_' . $language; $text = new $type($weather, array()); $text->print_pretty(); $temp_f = get_metar_value('temperature','temp_f'); echo "$temp_f °F"; echo '<pre>'; print_r($weather->decode_metar()); echo '</pre>'; ?> Tom Grant Louisiana CodeWORKS, Inc. 104 Marshall St. Minden, LA 71055 318-377-1149 / 800-489-1149 Voice/Fax 318-469-2934 / 877-489-1149 Cell |
From: Martin G. <gim...@gi...> - 2002-06-09 13:57:31
|
Ondrej Jombik <ne...@po...> writes: > Maxim, 22:51:23 > 06. jun 2002 (stvrtok) > Greetings. >=20 > I think DocBook is the right solution. It is designed for > documentation like that what you want. Yes, I can see that this is one of the strengths of DocBook. That was the problem with plain LaTeX: I had to invent all the commands myself, and I had to take care of making them robust (there's a number of LaTeX special characters in LaTeX and many of them are used in PHP-code). But Texinfo is also designed to make documentation... and because it's a macro-package for TeX, then I felt more comfortably with it :-) > Of course dynamic examples cannot be included, but anyway you can > include link to examples on phpWeather website. Yes, that would be an OK solution. =20 >> But Docbook is a very verbose markup language because all tags >> has to be closed, and because the tag-names are long: they use >> <para> instead of just <p>. Can this be changed? >=20 > It is possible to create new <p> tag. Its behaviour will be > the same as <para>. It is possible with some addition to DTD, but I > don't know how, because I never need this feature. Why not? Don't you get tired of typing all those long tags again and again? Texinfo also has a bunch of tags, but they're at least as short as their DocBook counterparts. =20 > The question is, if it will be DocBook anymore, also after > that DTD change. >=20 >> Docbook can be converted to HTML which looks good. It can also >> be converted into PDF and PS which looks very bad. I don't know >> why, but the Docbook source is converted into a strange mess >> which can only be processed by jadetex. Why not just convert it >> into good- looking LaTeX-code? >=20 > I don't think that output of DocBook into PDF ans PS is bad. > I use it very often and it looks good. It's just that I'm used to the output from LaTeX - it's probably a matter of adaptation, the output doesn't look as bad today as it did yesterday :-) But I still think, that it looks strange when the text is indented about an inch while the headings are left at the left margin. Also, then spacing around the paragraphs, lists and displayed code is "funny"... The worst thing is how the <term>'s in a <variablelist> is at the left margin together with the headings. Take a look here: http://www.gimpster.com/temp/phpweather-doc/ I've converted the Texinfo docs I've written into DocBook. I then went through the DocBook file and fixed it a little (removed some empty <para></para> tags an so on...) > For developer documentation you have tools like Doxygen > (mailly C/C++ sources), JavaDoc (mainly Java sources) and PHPDoc (of > course mainly PHP sources). Yes, I know - I've used all three systems :-) I actually like Doxygen: it generates very nice HTML and LaTeX output. It's a shame that it doesn't grok PHP code yet... > You will use special tags directly in source codes, such as @author, > @param to mark module, function, method or variable. Appropriate > tool will generate well-arranged documentation for you. We're already using PHPDoc in PHP Weather. Speaking of PHP Doc: is it still being worked on? phpdoc.de haven't been updated in about two years and the phpdoc I was able to find at cvs.php.net is behaving strange: it eats the first word in the documentation of each function/variable/etc... =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: Ondrej J. <ne...@po...> - 2002-06-06 20:58:00
|
Maxim, 22:51:23 06. jun 2002 (stvrtok) Greetings. All written here will be only my opinion. It could be wrong, so than please correct me. Maybe your opinion will be different, so feel free to disagree with me. > Although I'm in the middle of my exams (Probability Theory tomorrow!), Combinatoric analyze (called as combat ;-) tomorrow. > Docbook: With all the buzz about SGML and XML, I thought that > Docbook would be the thing to use... I've tried it, but I don't > particularly like it. The good thing about Docbook is, that it's > designed for this task: there's tags for filenames, code examples > and so on. I think DocBook is the right solution. It is designed for documentation like that what you want. Of course dynamic examples cannot be included, but anyway you can include link to examples on phpWeather website. > But Docbook is a very verbose markup language because all tags has > to be closed, and because the tag-names are long: they use <para> > instead of just <p>. Can this be changed? It is possible to create new <p> tag. Its behaviour will be the same as <para>. It is possible with some addition to DTD, but I don't know how, because I never need this feature. The question is, if it will be DocBook anymore, also after that DTD change. > Docbook can be converted to HTML which looks good. It can also be > converted into PDF and PS which looks very bad. I don't know why, > but the Docbook source is converted into a strange mess which can > only be processed by jadetex. Why not just convert it into good- > looking LaTeX-code? I don't think that output of DocBook into PDF ans PS is bad. I use it very often and it looks good. HTML is preffered, usege of PS desirable, when you want to print whole, part or parts of documentation. > So, what do you guys think? Which formats do you know and which formats do > you like? I strictly difference two types of documentation: user and developer. DocBook is ideal for generating user documentation. But its not good for developer documentation. For developer documentation you have tools like Doxygen (mailly C/C++ sources), JavaDoc (mainly Java sources) and PHPDoc (of course mainly PHP sources). You will use special tags directly in source codes, such as @author, @param to mark module, function, method or variable. Appropriate tool will generate well-arranged documentation for you. So my conclusion: DocBook for user documentation, PHPDoc for developer documentation. I wish you a good decision. =Nepto= ____________________________________________________________________________ Ondrej 'Nepto' Jombik, http://www.nepto.sk/ ne...@at... |
From: Martin G. <gim...@gi...> - 2002-06-05 15:35:37
|
Hi everybody! Although I'm in the middle of my exams (Probability Theory tomorrow!), I've been thinking about how we can write some documentation for PHP Weather. I've tried all sorts of formats, and I'm currently thinking about using Texinfo. These are the formats I've played with: LaTeX: I've written some documentation in LaTeX, it's currently in CVS. LaTeX is very good at producing printable documentation in PS and PDF formats. The problem with LaTeX is, that it's difficult to convert to HTML, and I think that it would be best if we could produce some HTML pages to put up at phpweather.net. Texinfo: this is the format used by the GNU-people. It's possible to generate documentation in several formats: HTML, PDF, PS, Info, Docbook and plain text. All those formats look very nice - have a look for yourself: I've written some test-documentation here: http://gimpster.com/temp/phpweather-doc/=20=20=20=20 Docbook: With all the buzz about SGML and XML, I thought that Docbook would be the thing to use... I've tried it, but I don't particularly like it. The good thing about Docbook is, that it's designed for this task: there's tags for filenames, code examples and so on. But Docbook is a very verbose markup language because all tags has to be closed, and because the tag-names are long: they use <para> instead of just <p>. Can this be changed? Docbook can be converted to HTML which looks good. It can also be converted into PDF and PS which looks very bad. I don't know why, but the Docbook source is converted into a strange mess which can only be processed by jadetex. Why not just convert it into good- looking LaTeX-code? HTML/PHP: We could also just write the documentation in HTML and save us the trouble of converting from another language. This also means that we could embed PHP code in the documentation, so that we could refer to live examples of what PHP Weather can do. We might be able to do this with Texinfo also, but it'll involve hacking the Perl texi2html script. So, what do you guys think? Which formats do you know and which formats do you like? =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-05-30 20:34:13
|
"Tom Corser" <to...@to...> writes: > Quoting Martin Geisler <gim...@gi...>: >>http://tgsv5.nws.noaa.gov/oso/site.shtml >> >>There I downloaded a list of all stations that have an ICAO - there's >>6257 stations in that list, but I'm still missing information about >>187 stations! >=20 > Ive downloaded the list from NWS - but out of all the locations, > including my 10,000 locations, only about 3000 seem to want to > return any data! I know... but you should only expect to have about 4500 stations reporting data - there was 4518 METAR reports available from the NWS yesterday when I checked. With 'available' I mean that you could download a report from the station here: ftp://weather.noaa.gov/data/observations/metar/ =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: Tom C. <to...@to...> - 2002-05-30 17:13:09
|
Quoting Martin Geisler <gim...@gi...>: >http://tgsv5.nws.noaa.gov/oso/site.shtml > >There I downloaded a list of all stations that have an ICAO - there's >6257 stations in that list, but I'm still missing information about >187 stations! Ive downloaded the list from NWS - but out of all the locations, including my 10,000 locations, only about 3000 seem to want to return any data! -- ( Tom Corser to...@to... ) ( http://www.tomcorser.com ) ( http://www.capegig.org.uk ) |
From: Martin G. <gim...@gi...> - 2002-05-29 21:48:38
|
Tom Corser <to...@to...> writes: > Quoting Martin Geisler <gim...@gi...>: >=20 >> How is it going with your refreshing of your locations database, >> Tom? With 10,000 ICAOs, then we ought to be able to find our >> missing 774 ICAOs there... >=20 > It hasnt proved all that successful - out of the 10,000 on the > database only 3009 have been identified as active. I'm sorry to hear that... I asked the NWS for a list of active stations, and was directed to this page: http://tgsv5.nws.noaa.gov/oso/site.shtml There I downloaded a list of all stations that have an ICAO - there's 6257 stations in that list, but I'm still missing information about 187 stations! It's a bit strange: the list has been updated last week and it says that all stations that have a location identifier assigned by the ICAO (I now know that ICAO is an abbreviation for International Civil Aviation Organization, see www.icao.int). =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: Tom C. <to...@to...> - 2002-05-29 11:10:25
|
Quoting Martin Geisler <gim...@gi...>: > How is it going with your refreshing of your locations database, Tom? > With 10,000 ICAOs, then we ought to be able to find our missing 774 > ICAOs there... It hasnt proved all that successful - out of the 10,000 on the database only 3009 have been identified as active. Im trying to modify the caching, so that locations that have not returned any data recently (i.e. last 24 hours) get marked as "old". For example ( http://www.sanddesign.co.uk/weather/index.php? location=NZCM&action=report&country=Antarcitca%20(New%20Zealand) ) McMurdo sound hasnt returned any data in the last 27 days, but it is still set as "current data". Ive still got the problem of different country names, plus many of the locations in the 10,000 database I downloaded are spelt incorrectly! Cheers Tom Corser |
From: Martin G. <gim...@gi...> - 2002-05-29 10:22:51
|
Martin Geisler <gim...@gi...> writes: > I don't know how many of the new stations actually produce METARs, > but it seams that there are many dead stations... We should probably > ask the NWS for their list of active stations so that we can provide > an accurate list. I've now retrieved a directory-listing of=20 ftp://weather.noaa.gov/data/observations/metar/stations/ which is where the METARs are stored by the NWS. There are 4518 files in that directory. Some of the files are quite old - they haven't been modified this year! After those files are removed there's still 4203 METARs left. I then compared the ICAOs with the ICAOs in stations.csv and found that we know the names of 3429 of those stations. In other words: there are 774 METARs from unknown stations at the NWS. How is it going with your refreshing of your locations database, Tom? With 10,000 ICAOs, then we ought to be able to find our missing 774 ICAOs there...=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: Martin G. <gim...@gi...> - 2002-05-28 16:55:54
|
"Tom Corser" <to...@to...> writes: > I found a website which has over 10,000 airport codes, the link is > in my favorites at work, Ill get it tomorrow if you are interested. > Ive attempted to merge the two databases, but quite a few of the > country names are different from the original database. Out of the > 10,000 stations only about 3000 return data. Ive changed the code on > the site to ignore sites (and countries) that have not retuned any > data. I see... I've written to the NWS and asked for a list of the stations that actually make METARs. =20 > Ive downloaded all the files from the phpweather directory (Im > presuming that this is where PHP Weather v2 is) and I will have a > look at the code soon! Yes, that's the right directory. If you don't use CVS, then you can download a snapshot instead: http://phpweather.net/downloads/ =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-05-28 14:54:08
|
"Tom Corser" <to...@to...> writes: > Ive been developing a weather site based around PHP weather, the aim > in the long run is to have a fast updating database, that other > webmasters can use to access up to date weather reports quickly and > easily. So, should you site work as a kind of mirror or the data at the NWS? I've thought about that too, but it gives rise to a whole bunch of new (interesting) problems... =20 > Database info: the database is updated every 15 minutes by the > update_metars_db() function, Apropos your database: I've merged the data you gave me with the data I already had and the result is a list of 5131 stations. I can send it to you as a SQL dump if you like. I don't know how many of the new stations actually produce METARs, but it seams that there are many dead stations... We should probably ask the NWS for their list of active stations so that we can provide an accurate list. > Ive been in email conversation with Martin, he suggested I make an > output plug in for PHP Weather 2, The site is based around v1.6, > when I have some time Ill have a look through the v2 code and > (probably) make an output plug in if its not too difficult! Well, I think it's easy, but that's probably because I'm the one who made the system ;-) Ask here for help if you get stuck. > What do you think about the site and the speed of the reports? I think the speed is great! =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: Tom C. <to...@to...> - 2002-05-27 19:23:27
|
Ive been developing a weather site based around PHP weather, the aim in the long run is to have a fast updating database, that other webmasters can use to access up to date weather reports quickly and easily. Im still working on the code for the other web masters bit, but if you go to http://www.sanddesign.co.uk/weather/ youll find a weather reports site for the world. Database info: the database is updated every 15 minutes by the update_metars_db() function, every 15 minutes by a script that searches for stations with no data (and marks them ND) and every hour by the get_metar() function. This last hourly check makes sure that metars are stored in the metar database table and are ready to be cached by the update_metars_db() function. Ive been in email conversation with Martin, he suggested I make an output plug in for PHP Weather 2, The site is based around v1.6, when I have some time Ill have a look through the v2 code and (probably) make an output plug in if its not too difficult! What do you think about the site and the speed of the reports? -- ( Tom Corser to...@to... ) ( http://www.tomcorser.com ) ( http://www.capegig.org.uk ) |
From: Donovan A. H. <do...@hu...> - 2002-05-24 23:34:04
|
Just wanted to let you know the PHP Weather has PHP errors on it. Regards, Donovan A. Huff Owner / Operator Huff Data Systems / EdnaOnline www.huffdatasystems.com / www.ednaonline.com (361) 501-2957 do...@hu... |
From: Martin G. <gim...@gi...> - 2002-05-22 12:07:04
|
Ondrej Jombik <ne...@po...> writes: >> The windspeed doesn't have to be a whole number of meters per hour: >> it's converted from a whole number of knots into meters/second and >> miles/hour so it will not be a whole number after the conversion. >=20 > Numbers which are not whole are handled in first 'if' case. Ah, sorry! Please make sure to put plenty of comments in the final version! It's a very nice way of extending the base-class, but it's also a bit confusing at first :-) But after two or three mails I think I get it... >> What if the windspeed is more than 4 meters per second? Don't you miss >> that case? >=20 > No, I don't. In that case default string > ($this->strings['meters_per_second']) will be used. Of course, you're right. > My goal was to avoid counting logic in pw_text_sk. This way I > can only change strings accoding to Slovak grammar convetions and at > the end call original method. If there is no problem with this, I > will use this way also in others parts. No problem - I've just never thought of doing things this way, so it really confused me in the beginning. =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: Ondrej J. <ne...@po...> - 2002-05-22 11:43:22
|
Pauli, 13:39:20 22. maj 2002 (streda) Greetings. > > function print_pretty_wind($wind) > > { > > extract($wind); > > > > if (! empty($meters_per_second)) { > > if ($meters_per_second - floor($meters_per_second) > 0) { > > $this->strings['meters_per_second'] = ' metra za sekundu'; > > } > > elseif ($meters_per_second == 1) { > > $this->strings['meters_per_second'] = ' meter za sekundu'; > > } > The windspeed doesn't have to be a whole number of meters per hour: > it's converted from a whole number of knots into meters/second and > miles/hour so it will not be a whole number after the conversion. Numbers which are not whole are handled in first 'if' case. > > elseif ($meters_per_second == 2 > > || $meters_per_second == 3 > > || $meters_per_second == 4) { > > $this->strings['meters_per_second'] = ' metre za sekundu'; > > } > What if the windspeed is more than 4 meters per second? Don't you miss > that case? No, I don't. In that case default string ($this->strings['meters_per_second']) will be used. > > return parent::print_pretty_wind($wind); > Ahh - very clever! :-) At first I didn't understand what you were trying > to do, but now I see it - pretty cool. There should probably be a little > comment that explains it to others... My goal was to avoid counting logic in pw_text_sk. This way I can only change strings accoding to Slovak grammar convetions and at the end call original method. If there is no problem with this, I will use this way also in others parts. =Nepto= ____________________________________________________________________________ Ondrej 'Nepto' Jombik, Perl CGI developer #!/usr/bin/perl -w |