APRS2RRD
@ hg5apz
Hi,
I just discovered that I forgot mention very importan point. After first run of my program you must manually create RRD database, where the program will write its data. To do it you should change directory to your preferred one (witch of course must agree with code) and type such command like this:

rrdtool create predkosc.rrd --start 1390502250 --step 60 DS:predkosc:GAUGE:190:U:U RRA:AVERAGE:0.5:2:150

predkosc.rrd it's filename witch must agree with these used in source code.

--start XXXX it is the start time of whole database file typed in unix-stamp format. You can check it via this web page: http://www.unixtimestamp.com/index.php or just write --start N to use current time.

--step 60 defines period (in seconds) of writing new data to database. This parameter schould has the same value as desired WX station
beacon frequency.

DS:predkosc:GAUGE:190:U:U -- defines Data storage. predkosc is only a catpion. GAUGE means that values wchich app writes are in aboslute value. I mean that this isn't a counter, where RRDtool stores differential of input numbers insted of it's exact values. 190 is a maximum acceptable period of time, when RRDtool won't write NaN (Not a Number) symbol in file. It work's as protection against missed beacon. When this time is elapsed the hole will appear on plots.

RRA:AVERAGE:0.5:2:150 -- This is declaration of Round Robin Alghoritm. AVERAGE is just an average wesoły (you can type MAX, MIN or few other)..... Digit "2" means how much samples will program use to calculate average. "150" is a size of database counted in number of stored samples. But you must know that if you choose average from 2 samples the resolution falls twice. Program will store two subsequentional values in buffer and write them average in rrd file......

As you propably see full path to rrd file appers twice in source code. Firstly, where the DB is filled with new data and next when plots are made. It must be the same as location of this file in your system..



The source I posted is very dirty written, because I need very quickly app witch such functionality (I wrote it in 4 hours). I will make it more "sophisticated" and clean in future. What's more such things as wind direction plot should appered, as typical angle versus time curve and as arrow like this: http://www.meteo.pl/um/php/meteorogram_list.php?ntype=0u&fdate=2014012612&row=465&col=269&lang=pl&cname=Rzesz%F3wp .... And of course configuration via separate .conf file will be added.

Lines like:: # javAPRSSrvr 3.15b07 26 Jan 2014 11:37:30 GMT T2POLAND 46.21.223.230:14580 Please use port 14580 for all of your connections! is normal behaviour. All APRS servers send something in 30 second period to keeps connection alive and prevent from hanging it up.


  PRZEJD NA FORUM