Wednesday, March 5, 2014

Big Dongle Array ~ See 50 Mhz (6 meter) CW beacons using RTL_POWER

Click on the image above for a larger view of it

This image was generated using GNUPLOT from data logged to a log file using RTL_POWER only.  All 'rtl_power' actually does is scan a frequency range and provide dBm measurements.  An example of the output of this data looks something like this....

2014-03-06, 01:00:30, 126300000, 129050000, 1342.77, 104, -56.21, -56.28, -58.03, -58.06, -58.60, -58.66, -58.82, -55.77, -56.88, -56.28, -5
3.70, -56.93, -58.22, -57.81, -56.06, -55.24, -58.70, -59.15, -58.71, -57.95, -57.31, -58.94, -56.00, -58.35, -58.11, -58.58, -59.05, -58.78

, -57.58, -54.52, -54.47, -57.93, -57.93, -58.52, -58.46, -59.00, -57.96, -53.85,.........

This then gets post-processed into something that looks more like this:

2014-03-06 00:00:29,1300000,-56.84
2014-03-06 00:00:29,1301342.77,-58.82
2014-03-06 00:00:29,1302685.54,-59.92
2014-03-06 00:00:29,1304028.31,-60.52
2014-03-06 00:00:29,1305371.08,-60.11
2014-03-06 00:00:29,1306713.85,-60.31
2014-03-06 00:00:29,1308056.62,-58.79

2014-03-06 00:00:29,1309399.39,-57.21...................

The result is that I end up with (date time,frequency_in_hz,dbm)

This is something that GNUPLOT can use EASILY!

Here the gnuplot script I used to create the above image:

#!/usr/bin/gnuplot

load '/var/www/mufmon/bin/plot/default.plt'
set xlabel "Time" font "arial,8"
set ylabel "Frequency (MHz)" font "arial,8"
set zlabel "Gain (dBm)" font "arial,8"
set grid lc rgbcolor "#BBBBBB"
set timefmt '%Y-%m-%d %H:%M:%S'
set format y "%1.3f"
set format x "%H:%M"
set xdata time
set xrange ["2014-03-05 14:00:00":"2014-03-05 16:00:00"]
set zrange[-50:-25]
unset key

set datafile separator ","
set pm3d interpolate 5,5
# REMARK THESE OUT FOR TRUE 3D Plot
set view 0,180,0.98
set pm3d map

set terminal pngcairo crop
set term png enhanced size 2000,1000 enhanced font 'Verdana,10'

reportdatetime = "`date +'%Y-%m-%d' -d '1 hours ago'`"
set title "6m HI RES ".reportdatetime
reportpng = '/var/www/mufmon/6m_hi_res.'.reportdatetime.'.png'
set output '/var/www/mufmon/6m_hi_res.'.reportdatetime.'.png'
print reportpng

splot '/tmp/3d_6m_hi_res.dat.3d' u 1:2:3 with pm3d

And that's it.  Easy-Peezie! (kinda) :-)

PS: here is how I run 'rtl_power' (more or less, I've written code wrappers around the actual command more on that another time)

/bin/bash -c while true; do /usr/local/bin/rtl_power -d 0 -f 125000000:180000000:1500 -i 30 -g 20.9 -p -29 -e 1h | /usr/sbin/rotatelogs /rtl_log/live/0.55000000.1356_34Hz.%Y-%m-%d.%H 3600; done&

Notice I'm using rotatelogs with this!  This makes managing the log data WAY WAY simpler.





No comments:

Post a Comment