From 588ff9cd2baa942a85cc938bd22410637b08e274 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 26 Dec 2011 22:51:14 +0100 Subject: Add acclog, reorganize plotting --- mpplot/acc | 13 +++++++++++++ mpplot/loop | 10 +++++++--- mpplot/mplus | 12 ++++++++++++ mpplot/plot | 12 ------------ 4 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 mpplot/acc create mode 100644 mpplot/mplus delete mode 100644 mpplot/plot (limited to 'mpplot') diff --git a/mpplot/acc b/mpplot/acc new file mode 100644 index 0000000..d0ba7db --- /dev/null +++ b/mpplot/acc @@ -0,0 +1,13 @@ +set xlabel "Time" +set ylabel "Sensor Value" +#set yrange [0:16000] + +set size 1.0, 0.6 +set terminal postscript portrait enhanced mono dashed lw 1 "Helvetica" 14 + +set title "Sensors" +set output '/tmp/wii.ps' +plot '/tmp/wii.tail' using 1:2 with lines lt 1 lc rgb "green" title "X", \ + '/tmp/wii.tail' using 1:3 with lines lt 1 lc rgb "blue" title "Y", \ + '/tmp/wii.tail' using 1:4 with lines lt 1 lc rgb "red" title "Z", \ + '/tmp/wii.tail' using 1:5 with lines lt 2 lc rgb "black" title "A" diff --git a/mpplot/loop b/mpplot/loop index 51840db..cc1d47e 100755 --- a/mpplot/loop +++ b/mpplot/loop @@ -1,8 +1,12 @@ #!/bin/sh +set -e + +test -r "$1" + while true; do - tail -n 2000 /tmp/wibble.log | head -n 1999 > /tmp/wibble.tail - gnuplot plot - convert /tmp/mp.ps /tmp/mp.png + tail -n 2000 /tmp/wii.log | head -n 1999 > /tmp/wii.tail + gnuplot "$1" + convert /tmp/wii.ps /tmp/wii.png date done diff --git a/mpplot/mplus b/mpplot/mplus new file mode 100644 index 0000000..20c2bc1 --- /dev/null +++ b/mpplot/mplus @@ -0,0 +1,12 @@ +set xlabel "Time" +set ylabel "Sensor Value" +#set yrange [0:16000] + +set size 1.0, 0.6 +set terminal postscript portrait enhanced mono dashed lw 1 "Helvetica" 14 + +set title "Sensors" +set output '/tmp/wii.ps' +plot '/tmp/wii.tail' using 1:2 with lines lt 1 lc rgb "green" title "Pitch", \ + '/tmp/wii.tail' using 1:3 with lines lt 1 lc rgb "blue" title "Roll", \ + '/tmp/wii.tail' using 1:4 with lines lt 1 lc rgb "red" title "Yaw" diff --git a/mpplot/plot b/mpplot/plot deleted file mode 100644 index a5f1383..0000000 --- a/mpplot/plot +++ /dev/null @@ -1,12 +0,0 @@ -set xlabel "Time" -set ylabel "Sensor Value" -#set yrange [0:16000] - -set size 1.0, 0.6 -set terminal postscript portrait enhanced mono dashed lw 1 "Helvetica" 14 - -set title "Sensors" -set output '/tmp/mp.ps' -plot '/tmp/wibble.tail' using 1:2 with lines lt 1 lc rgb "green" title "Pitch", \ - '/tmp/wibble.tail' using 1:3 with lines lt 1 lc rgb "blue" title "Roll", \ - '/tmp/wibble.tail' using 1:4 with lines lt 1 lc rgb "red" title "Yaw" -- cgit v1.2.3