Re: SV: Humidity Calculation Error and Fix v 1.59
Brought to you by:
iridium
From: Martin G. <gim...@gi...> - 2002-02-03 10:04:19
|
"Funder, Johnny OTP" <jh...@NA...> writes: > Hi, > > For your information, the official formular looks like this: > > 1779,75 (Td - Tt) > RH = ANTILOG ( -------------------------- + 2 ) > (237,3 + Td) ( 237.3 + Tt) > > where Tt = temperature and Td = dewpoint (of course) > > This is how my code looks like in Fortran 77 (for what it's worth) > > > TAELLER = (DEWPOINT-TEMPERATURE)*1779.75 > NAEVNER = (237.3+DEWPOINT)*(237.3+TEMPERATURE) > LOG10_VAL = ((TAELLER/NAEVNER)+2) > BASE = 10 > CONSTANT = LOG(BASE) > R_HUMIDITY = EXP(LOG10_VAL * CONSTANT) > > It should be very easy to convert that to php. Very nice - I'll update the tarballs accordingly, just as soon at I hear about my attempts at implementing extract and str_replace in PHP3-friendly code. By the way: I've been thinking about putting the old-but-working code into CVS at Sourceforge. It seams that people are using v 1.59 and are happy about it, so we should make it easy for ourselves to fix things in that source-tree as well. Is there anybody here who has experience with branches in CVS? I've only used CVS for PHP Weather, but I think that we should do a branch here, so that we could have the stable and unstable code in CVS at the same time. I know that we could also just make a directory called 'old' or something like that, but it doesn't sound like the correct way to do things with CVS. -- 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. |