mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-30 02:11:53 +02:00
b159e00316
- atrf-path.c (rssi_to_dBm, sample): moved RSSI value to dBm conversion to separate function - atrf-path.c (sample): corrected calculation of average - atrf-path.c (sample): also output minimum and maximum value - plot: new option -e to display extremal values - plot: added comment to explain y range
34 lines
547 B
Bash
Executable File
34 lines
547 B
Bash
Executable File
#!/bin/sh
|
|
|
|
usage()
|
|
{
|
|
echo "usage: [-e] file ..." 1>&2
|
|
exit 1
|
|
}
|
|
|
|
style=lines
|
|
if [ "$1" = -e ]; then
|
|
style=errorlines
|
|
shift
|
|
fi
|
|
|
|
[ "$1" ] || usage
|
|
|
|
files=
|
|
while [ "$1" ]; do
|
|
[ "$files" ] && files="$files, "
|
|
files="$files\"$1\""
|
|
shift
|
|
done
|
|
|
|
gnuplot -persist <<EOF
|
|
# the y range is not entirely correct - we have RSSI in [-94, -10], and
|
|
# TX in [-17, 3], so the theoretically possible range would be [-97, 7].
|
|
set yrange [-94:-10]
|
|
set ylabel "RX-TX power (dBm)"
|
|
set xlabel "Frequency (MHz)"
|
|
set bars small
|
|
set style data $style
|
|
plot $files
|
|
EOF
|