PWS Weather format

56 views
Skip to first unread message

Doug

unread,
Sep 2, 2012, 10:00:29 PM9/2/12
to fo...@googlegroups.com
Can anyone tell me if this looks correct for PWSweather updates. This is what is coming out of my log. The service says it excepted the data but the data does not appear  on the site. I get a red icon - old or no data.

Is the day of the week (Monday) suppose to be in there like that?  I have changed nothing in the source.

dateutc=2012-09-03+01Monday48Monday02&winddir=135.0&windspeedmph=0.0&windgustmph=0.0&tempf=75.020&rainin=0.000&dailyrainin=0.000&baromin=30.068&dewptf=73.3&humidity=93.0

My Wunderground log is working and is:

dateutc=2012-09-03 01:53:02&winddir=135.0&windspeedmph=0.0&windgustmph=0.0&humidity=93.0&tempf=75.020&rainin=0.000&dailyrainin=0.000&baromin=30.094&dewptf=73.3

Doug
 

Doug

unread,
Sep 2, 2012, 11:08:19 PM9/2/12
to fo...@googlegroups.com
OK I will answer my own question....

The original code - fowsr.c -  note the "\%3A"   This is suppose to decode to a ":"  On my system it does not. Instead it just transl;ates as %A  to strftime which prints the day of the week!!! 


 // Save in PWS Weather format
                                        n=strftime(s1,100,"dateutc=%Y-%m-%d+%H\%3A%M\%3A%S", gmtime(&timestamp));

So I changed it to just putting the colons ":"  in and it works. This is the way it is done for the prior definition for wundergroumd. Why it was done differently here I don't know. Another quirk in the code. Why my compiler is not defining it the way it was intended I don't know but I suspect others could have a similar problem. I guess official code updates are dead so we are on our own here.


 // Save in PWS Weather format
                                        n=strftime(s1,100,"dateutc=%Y-%m-%d+%H:%M:%S", gmtime(&timestamp));

The proper pwsweather log output should look like this:

dateutc=2012-09-03+03:03:01&winddir=45.0&windspeedmph=0.0&windgustmph=0.7&tempf=74.300&rainin=0.000&dailyrainin=0.000&baromin=30.068&dewptf=72.1&humidity=91.0

 So I am now updating  pwsweather (NCMAYNJ) as well as wunderground (KNJNORTH13).

Doug


From: Doug <dsc...@yahoo.com>
To: "fo...@googlegroups.com" <fo...@googlegroups.com>
Sent: Sunday, September 2, 2012 10:00 PM
Subject: PWS Weather format

Josch 600

unread,
Sep 3, 2013, 7:41:35 AM9/3/13
to fo...@googlegroups.com, Doug
Has been fixed in V2.0

Josch
Reply all
Reply to author
Forward
0 new messages