Root/usrp/plscan

Source at commit fff1e1ed2f2c1654fa550107946c7858acd4484d created 13 years 25 days ago.
By Werner Almesberger, usrp/fft.c: added Hamming, make dump easier to interpret
1#!/bin/sh
2
3usage()
4{
5    echo "usage: $0 [-o pngfile] file ..." 1>&2
6    exit 1
7}
8
9
10if [ "X$1" = X-o ]; then
11    out=$2
12    shift 2
13fi
14[ "$1" ] || usage
15[ "${1#-}" = "$1" ] || usage
16
17gnuplot -persist <<EOF
18`[ "$out" ] && ( echo set term png\;; echo set output \'$out\'; )`
19set xlabel "MHz"
20set ylabel "dB"
21set xrange [2402:2483]
22#set yrange [-30:-5]
23set title "Received signal strength"
24set data style errorlines
25plot \
26  `for n in $@; do
27     if [ "$n" = "${n#*=}" ]; then
28    file=$n
29    title=${n%.*}
30     else
31    file=${n#*=}
32    title=${n%%=*}
33     fi
34     echo -n $comma \'$file\' title \'$title\'
35     comma=,
36   done`
37EOF
38

Archive Download this file



interactive