[Xastir] Davis weather not posting rain totals properly (Curt, WE7U) (Tom Russo)

Mike Swiatkowski, AA9VI aa9vi at yahoo.com
Sat May 12 19:56:57 EDT 2012


Curt and Tony, 
THANKS A TON for looking into this and updating the CVS!  I know what a pain in the rear so many inquiries can be.  Some of us don't say it enough but we certainly appreciate your help with this stellar program.

73, 
Mike, AA9VI

--- On Wed, 5/9/12, xastir-request at lists.xastir.org <xastir-request at lists.xastir.org> wrote:

From: xastir-request at lists.xastir.org <xastir-request at lists.xastir.org>
Subject: Xastir Digest, Vol 78, Issue 4
To: xastir at lists.xastir.org
Date: Wednesday, May 9, 2012, 11:00 AM

Send Xastir mailing list submissions to
    xastir at lists.xastir.org

To subscribe or unsubscribe via the World Wide Web, visit
    http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir
or, via email, send a message with subject or body 'help' to
    xastir-request at lists.xastir.org

You can reach the person managing the list at
    xastir-owner at lists.xastir.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Xastir digest..."


Today's Topics:

   1. Re: Davis weather not posting rain totals properly (Curt,
      WE7U) (Mike Swiatkowski, AA9VI)
   2. Re: Davis weather not posting rain totals properly (Curt,
      WE7U) (Tom Russo)
   3. Re: Davis weather not posting rain totals properly (Curt,
      WE7U) (Tom Russo)


----------------------------------------------------------------------

Message: 1
Date: Tue, 8 May 2012 09:41:10 -0700 (PDT)
From: "Mike Swiatkowski, AA9VI" <aa9vi at yahoo.com>
To: xastir at lists.xastir.org
Subject: Re: [Xastir] Davis weather not posting rain totals properly
    (Curt,    WE7U)
Message-ID:
    <1336495270.44258.YahooMailClassic at web130204.mail.mud.yahoo.com>
Content-Type: text/plain; charset=iso-8859-1

Hi Curt, correct.? If you see the Third item you quoted? "2009-05-19 13:47? tvrusso"? below I am running the 6540 Weatherlink and the meteo/db2APRS interface is not needed.? The 6540 from Davis spits out a pure APRS text line that Xastir is supposed to process directly, similar to the Peet data where it does not require a 3rd party interface program. 

I think there is something in wx.c that is not processing the rain portions of the data string from the Davis 6540 serial interface properly.? Since I didn't write the code I don't quite understand exactly where that issue resides.? 

The changelog indicates a patch.? Is there a new wx.c?? The version I have is "wx.c, v 1.73 2010/08/14? 23:21:18 we7u Exp $"

I am willing to be a guinea pig and run a patch to test it if you guys can give me one to test.? Can you or Tony please take a look at the data being processed for the r, p, and P parts of the data string for the Davis 6540 Weatherlink section of the code??? Like I said, the wind, temp, humidity, barometer parts of the data are being processed properly.? The rain parts are the only ones in question.

Mike

--- On Tue, 5/8/12, xastir-request at lists.xastir.org <xastir-request at lists.xastir.org> wrote:

From: xastir-request at lists.xastir.org <xastir-request at lists.xastir.org>
Subject: Xastir Digest, Vol 78, Issue 3
To: xastir at lists.xastir.org
Date: Tuesday, May 8, 2012, 11:00 AM

Send Xastir mailing list submissions to
??? xastir at lists.xastir.org

To subscribe or unsubscribe via the World Wide Web, visit
??? http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir
or, via email, send a message with subject or body 'help' to
??? xastir-request at lists.xastir.org

You can reach the person managing the list at
??? xastir-owner at lists.xastir.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Xastir digest..."


Today's Topics:

???1. Re: Davis weather not posting rain totals properly (Curt, WE7U)


----------------------------------------------------------------------

Message: 1
Date: Mon, 7 May 2012 10:48:19 -0700 (PDT)
From: "Curt, WE7U" <curt.we7u at gmail.com>
To: Xastir - APRS client software discussion <xastir at lists.xastir.org>
Subject: Re: [Xastir] Davis weather not posting rain totals properly
Message-ID: <alpine.LNX.2.00.1205071043360.3043 at DadsBox.we7u.net>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Fri, 4 May 2012, Mike Swiatkowski, AA9VI wrote:

> There is a bug in the APRS string data for the rain totals from the Davis Vantage Pro station.? I can clearly see the day rain, hourly rain, and rain since midnight not being ported to RF or the APRS-IS servers correctly when displayed properly on Own Weather Data..? For some reason when I bring up Own Weather Data all 3 fields are 0 (not the case for all other WX readings).? If I wait a minute they update to the proper number after the new set of data is sent to Xastir every minute.? It seems to me that the data from the 6540 Weather console to serial port interface is reaching the computer but the output string is not being processed correctly in Xastir. The only time I get correct hourly data from Xastir to APRS-IS is if the Own Weather Data box is opened.? The rain since midnight and over the last 24 hrs gets reset to zero multiple times per day. 
>
> So, here's how I am sure it is Xastir.? Note the data 000 following p and P. I also see the p and P fields transposed in the string from Xastir as well.? The APRS spec shows p should proceed P not follow it.
>
> string sent to Xastir from Davis 6540 APRS console to serial interface:
> @050240z4207.44N/08747.20W_021/001g001t054r000p035P035h85b10157.DsVP
>
> string sent from Xastir to APRS-IS:
> @050241z4207.44N/08747.20W_360/001g001t054r000P000p000h85b10157
>
> I am using Debian 6 and the latest CVS Xastir 2.0.1. 
>
> I'll try and dig into the source code but being a novice, I'd appreciate it if someone can help me find what's wrong.? All other weather data including temp, humidity, wind speed/direction are all working correctly.

First:? I don't have any Davis gear so I cannot test this out myself.

Second:? Are you running the special code in the xastir/Davis subdirectory?? In order to support Davis equipment you have to be running that plus some other S/W.? Here's the OVERVIEW from the README located in that directory:


???OVERVIEW
???--------

???This is a bridge utility between "meteo", a Davis Weather Station
???data storage & display application by Andreas Muller (see
???http://meteo.othello.ch) and "Xastir", the APRS package for
???Linux (see http://www.xastir.org). It allows your Davis weather
???data to be used by Xastir for local station data.

???You will need to obtain and install Xastir, mysql and meteo as
???outlined in the following sections. After Xastir and meteo are
???in working order, this utility can be run as a daemon to provide
???weather data to Xastir (or any other APRS-format application).

???"db2APRS" watches for new weather data in the database, retrieves
???the new data, formats it in APRS "position less" ASCII format and
???makes it available on a TCP port of your choosing. Xastir is
???capable of reading this data (see note under Xastir installation).


Third:? I also see this entry in the Xastir ChangeLog, so maybe you're running this hardware?

???2009-05-19 13:47? tvrusso

? ? ? ???* config/language-Dutch.sys, config/language-English.sys,
? ? ? ? ???config/language-French.sys, config/language-German.sys,
? ? ? ? ???config/language-Italian.sys, config/language-Portuguese.sys,
? ? ? ? ???config/language-Spanish.sys, src/database.h, src/wx.c: Add
? ? ? ? ???support for the Davis 6540 "Weatherlink for APRS" with "Streaming
? ? ? ? ???Data Logger".? This attachment to the Davis Vantage Pro causes
? ? ? ? ???the device to stream APRS posits (sans fromcall, tocall, and
? ? ? ? ???path) to the serial port instead of requiring polling.? With such
? ? ? ? ???a device, Meteo and the associated glue program (db2APRS or
? ? ? ? ???whatever it's called) are unnecessary, so long as this patch is
? ? ? ? ???in place.


-- 
Curt, WE7U.? ? ? ? http://www.eskimo.com/~archer
APRS:? Where it's at!? ? ? ? http://www.xastir.org


------------------------------

_______________________________________________
Xastir mailing list
Xastir at lists.xastir.org
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir


End of Xastir Digest, Vol 78, Issue 3
*************************************


------------------------------

Message: 2
Date: Tue, 8 May 2012 11:44:21 -0600
From: Tom Russo <russo at bogodyn.org>
To: Xastir - APRS client software discussion <xastir at lists.xastir.org>
Subject: Re: [Xastir] Davis weather not posting rain totals properly
    (Curt, WE7U)
Message-ID: <20120508174421.GA33088 at bogodyn.org>
Content-Type: text/plain; charset=us-ascii

On Tue, May 08, 2012 at 09:41:10AM -0700, we recorded a bogon-computron collision of the <aa9vi at yahoo.com> flavor, containing:
> Hi Curt, correct.? If you see the Third item you quoted? "2009-05-19 13:47? tvrusso"? below I am running the 6540 Weatherlink and the meteo/db2APRS interface is not needed.? The 6540 from Davis spits out a pure APRS text line that Xastir is supposed to process directly, similar to the Peet data where it does not require a 3rd party interface program. 
> 
> I think there is something in wx.c that is not processing the rain portions of the data string from the Davis 6540 serial interface properly.? Since I didn't write the code I don't quite understand exactly where that issue resides.? 

I wrote that code.  A local user who had the APRS Data Logger helped me test 
it back then (and in fact was the person for whom I added the feature).  It
worked when we tested it out, but then we live in a desert and rain is almost
always 0.  This person still has the data logger, but no longer runs Xastir,
so I can't enlist his help in finding the issue (he may still be subscribed
to this list, though, and maybe will volunteer to get Xastir running at
home again --- but our rainy season is still months away and that might not
help).

The code itself does attempt to decode rain data.  The line in question is:

           if (sscanf((char *)data,
                       "%*27s%3s/%3sg%3st%3sr%3sp%3sP%3sh%2sb%5s.DsVP",
                       weather->wx_course,
                       weather->wx_speed,
                       weather->wx_gust,
                       weather->wx_temp,
                       weather->wx_rain,
                       weather->wx_prec_24,
                       weather->wx_prec_00,
                       weather->wx_hum,
                       weather->wx_baro) == 9){

where it's looking for the rXXX pXXX and PXXX components and parsing out
the fields.

> The changelog indicates a patch.? Is there a new wx.c?? The version I have is "wx.c, v 1.73 2010/08/14? 23:21:18 we7u Exp $"

The patch refers to the change created by that commit.  Some folks who were 
not running CVS Xastir could install the update without switching to CVS
by applying the single set of diffs.

> I am willing to be a guinea pig and run a patch to test it if you guys can give me one to test.? Can you or Tony please take a look at the data being processed for the r, p, and P parts of the data string for the Davis 6540 Weatherlink section of the code??? Like I said, the wind, temp, humidity, barometer parts of the data are being processed properly.? The rain parts are the only ones in question.


I have no patch for you to test, or even any idea what can be going wrong
yet.

Please try enabling debug level 1 (File->Configure->Change Debug Level)
and watching for the following debug output in your terminal window (this
assumes you're launching Xastir from a command line window not a desktop
shortcut, so that Xastir's output will show up somewhere):

              if (debug_level & 1)
                fprintf(stdout,"Davis APRS DataLogger Decode: wd-%s,ws-%s,wg-%s,t-%s,rh-%s,rt-%s,h-%s,ap-%s,station-%s\n",
                        
                        weather->wx_course,weather->wx_speed,weather->wx_gust,
                        weather->wx_temp, weather->wx_rain,
                        weather->wx_rain_total,weather->wx_hum,weather->wx_baro,
                        weather->wx_station);


This should show all the decoded data immediately after it's received from 
the weather station.  If that all looks correct, then the problem is not
specific to the Davis APRS Data Logger code, but is happening downstream and
may be difficult to track down.  If it's wrong, then the problem is in the 
decoding right in this block and should be easily fixable.

Please post the results.
  
The inversion of pXXXPyyy to PyyypXXX you observe is not specific to the
Davis device.  Once Xastir has the weather data parsed from any weather
station, a single function re-assembles the data into a new packet for
transmission.  This code is in the function wx_tx_data1 in wx.c, and
it explicitly puts the rain_00 and rain_24 data in that order rather than
the order that the Davis delivers it.  This is acceptable in APRS, though,
and should be received properly --- the spec says:

  Note: The weather report must include at least the MDHM date/timestamp,
  wind direction, wind speed, gust and temperature, but the remaining
  parameters may be in a different order (or may not even exist).

So the puzzle of pXXXPYYYY turning into P000p000 is only in where the
actual XXX and YYY are getting lost, not the order change.

By looking at the debug level 1 stuff as weather data comes in, you should
be able to determine if it's the Davis APRS Data Logger code that's screwing
it up, or if it's happening later.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
 one trick, rational thinking, but when you're good and crazy, oooh, oooh,
 oooh, the sky is the limit!"  --- The Tick



------------------------------

Message: 3
Date: Tue, 8 May 2012 12:04:50 -0600
From: Tom Russo <russo at bogodyn.org>
To: Xastir - APRS client software discussion <xastir at lists.xastir.org>
Subject: Re: [Xastir] Davis weather not posting rain totals properly
    (Curt, WE7U)
Message-ID: <20120508180450.GA40867 at bogodyn.org>
Content-Type: text/plain; charset=us-ascii

On Tue, May 08, 2012 at 11:44:21AM -0600, we recorded a bogon-computron collision of the <russo at bogodyn.org> flavor, containing:
> Please try enabling debug level 1 (File->Configure->Change Debug Level)
> and watching for the following debug output in your terminal window (this
> assumes you're launching Xastir from a command line window not a desktop
> shortcut, so that Xastir's output will show up somewhere):
> 
>               if (debug_level & 1)
>                 fprintf(stdout,"Davis APRS DataLogger Decode: wd-%s,ws-%s,wg-%s,t-%s,rh-%s,rt-%s,h-%s,ap-%s,station-%s\n",
>                         
>                         weather->wx_course,weather->wx_speed,weather->wx_gust,
>                         weather->wx_temp, weather->wx_rain,
>                         weather->wx_rain_total,weather->wx_hum,weather->wx_baro,
>                         weather->wx_station);

Sigh.  This debug output was copied from a different bit of wx.c, and 
clearly doesn't output all the data that was decoded from a data-logger
string.  The output command begins at line  2942 of wx.c.

Please modify the line this way:
                  fprintf(stdout,"Davis APRS DataLogger Decode: wd-%s,ws-%s,wg-%s,t-%s,rh-%s,rp-%s,rP-%s,rt-%s,h-%s,ap-%s,station-%s\n",
                        weather->wx_course,weather->wx_speed,weather->wx_gust,
                        weather->wx_temp, weather->wx_rain,weather->wx_prec_24,
            weather->wx_prec_00,
                        weather->wx_rain_total,weather->wx_hum,weather->wx_baro,
                        weather->wx_station);

This will add the decoded bits of "pXXX" and "PXXX" to the debug output.

If you're running a CVS version of Xastir, you can just do a cvs update,
as I've just committed that change so that this mistake in debug output
is no longer present.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
"And, isn't sanity really just a one-trick pony anyway? I mean all you get is
 one trick, rational thinking, but when you're good and crazy, oooh, oooh,
 oooh, the sky is the limit!"  --- The Tick



------------------------------

_______________________________________________
Xastir mailing list
Xastir at lists.xastir.org
http://lists.xastir.org/cgi-bin/mailman/listinfo/xastir


End of Xastir Digest, Vol 78, Issue 4
*************************************



More information about the Xastir mailing list