mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
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
This commit is contained in:
@@ -2,11 +2,18 @@
|
||||
|
||||
usage()
|
||||
{
|
||||
echo "usage: file ..." 1>&2
|
||||
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, "
|
||||
@@ -15,9 +22,12 @@ while [ "$1" ]; do
|
||||
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 style data lines
|
||||
set bars small
|
||||
set style data $style
|
||||
plot $files
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user