summaryrefslogtreecommitdiff
path: root/mpplot
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-12-26 22:51:14 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-12-26 22:51:14 +0100
commit588ff9cd2baa942a85cc938bd22410637b08e274 (patch)
treea6229a0208e3f97ca4b6efb278edf276ea2c1f18 /mpplot
parent938f55bceb43972547faa067f4151cd4b4cb66cc (diff)
Add acclog, reorganize plotting
Diffstat (limited to 'mpplot')
-rw-r--r--mpplot/acc13
-rwxr-xr-xmpplot/loop10
-rw-r--r--mpplot/mplus12
-rw-r--r--mpplot/plot12
4 files changed, 32 insertions, 15 deletions
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"