[Xastir] Rainfall greater than 10 inches

Ray aprs at exemail.com.au
Thu Mar 18 17:34:17 PDT 2021


I don't know if this question belongs here, or on the aprs sig. Please 
send me away if I'm in the wrong place.

I use xastir as my aprs client and I have modified db.c so that 24 hour 
rain is displayed on the map, along with the usual wx parameters. I've 
been doing this for about 12 years and all has been fine, until this 
morning when 267mm of rain displayed as 26.7mm. The problem happened 
overnight when the rainfall figure exceeded 254mm, or 10 inches, when 
p000 became 4 digits. I convert mm to hundredths of an inch in a script 
prior to using the xastir udp client to upload the data. This is a test 
packet for more than 10" of rain ..

/usr/local/bin/xastir_udp_client localhost 2023 vk2tv-1 xxxxx 
"VK2TV-ZZ>APRS:=3102.12S/15252.72E_156/016g019t070r003p1752P123h96b10194 
Davis VP2"

p1752 equates to 445mm which xastir displays on the localhost as 44.5mm

I then configured the script to directly access aunz.aprs2.net ....

/usr/local/bin/xastir_udp_client aunz.aprs2.net vk2tv-1 xxxxx -to_inet 
"VK2TV-ZZ>APRS:=3102.12S/15252.72E_156/016g019t070r003p1752P123h96b10194 
Davis VP2"

The data was received on my main xastir installation, with its own 
connection to aunz.aprs2.net and displayed as 44.5mm, not 445mm. I seem 
to have convinced myself that by sending via aprs-is the 4 digit 
rainfall number is not an issue, or is my thinking flawed?

The aprs spec 1.01 provides for 4 bytes which allows for considerably 
more than 10" of rain, or am I misunderstanding something, because a 
formatted wx packet string for 24 hour rain is shown in various examples 
as p000?

Having seemingly convinced myself that the sent packet is correctly 
formatted I started pointing my injured finger (sanding discs aren't 
forgiving!) and questioned if xastir is truncating the result for the 
display. This is how I amend db.c to display rainfall

if (strlen(weather->wx_prec_24) > 0) {
                xastir_snprintf(wx_tm, sizeof(wx_tm), " R:%.1fmm", 
atof(weather->wx_prec_24)*0.254);
                strncat(temp_wx_temp,
                    wx_tm,
                    sizeof(temp_wx_temp) - 1 - strlen(temp_wx_temp));
             }

I am NOT a programmer. I'm not afraid to try simple things, but I'm not 
a programmer.

Would somebody please care to comment on my problem, and clarify if 
misunderstandings on my part are responsible? We don't get 10" of rain 
very often but I would like to resolve this for just in case!

Ray vk2tv



More information about the Xastir mailing list