Root/usrp/plscan

Source at commit 89bcd3cfa8c798405ce0f7626f2c12f098eacb63 created 12 years 11 months ago.
By Werner Almesberger, tools/lib/atben.c (atben_open): corrected comment claiming the clock was 316 MHz
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