1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-18 17:31:34 +02:00
ben-wpan/tools/atrf-path/plot
Werner Almesberger b159e00316 atrf-path: added min/max values and corrected averaging algorithm
- 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
2011-04-12 20:53:17 -03:00

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