fowsr and PCE FWS 20 (WH 1080 clone) dewpoint strange value

52 views
Skip to first unread message

Silvano Fraticelli

unread,
Mar 8, 2014, 1:11:28 PM3/8/14
to fo...@googlegroups.com
Dear group,
I install the fowsr to connect over internet my PCE FWS 20 meteo station, I check that dewpoint value are very strange and the result to have the right value  is to modify the routine (fowsr.c):

float CWS_dew_point(char* raw, float scale, float offset)

The problem is that the routine make the DEWPOINT evaluation using formula tha need CELSIUS for temp, but the routine receive the temp value in fahrenheit, I make a simple change to convert (is not the best solution... is a patch) and the value now is ok.

// Compute dew point, using formula from
float a = 17.271;
float b = 237.7;
      temp = (temp - 32.0) / 1.80; 
float gamma = (a * temp) / (b + temp) + log(hum / 100);
return  ((b * gamma) / (a - gamma)) *1.80 + 32;

silvano

Josch

unread,
Mar 14, 2014, 2:08:56 AM3/14/14
to fo...@googlegroups.com
Hi Silvano,

it's a bit more difficult, because the routine receives the temp either in Celsius or Fahrenheit and it has to deliver the dew point in the corresponding unit. I will have a look on it as soon as I have time. Thanks for your hint.

Josch

Arne-Jørgen Auberg

unread,
Mar 17, 2014, 4:05:04 PM3/17/14
to fo...@googlegroups.com

The PWS uses metric values internally. All readings are Celcius and millibar. The cleanest would be to keep it in metric units, and do the conversion to Fahrenheit as the last thing before it is sent.

I see that the routine performs the transformation to Fahrenheit in the start of the function, which looks wrong. What is the result if it returned something like this:

float CWS_dew_point(char* raw, float scale, float offset)
{
        float temp = CWS_signed_short(raw+WS_TEMPERATURE_OUT);
        float hum = raw[WS_HUMIDITY_OUT];

        // Compute dew point, using formula from
        // http://en.wikipedia.org/wiki/Dew_point.
        float a = 17.27;
        float b = 237.7;

        float gamma = ((a * temp) / (b + temp)) + log(hum / 100);

        return (((b * gamma) / (a - gamma * scale) + offset);
}

Josch

unread,
Mar 29, 2014, 3:15:36 PM3/29/14
to fo...@googlegroups.com
With version 2.0-140328 should the dewpoint now be correct for °C and °F.

Josch
Reply all
Reply to author
Forward
0 new messages