--- /dev/null
+2008050077 0.14648342520240845 0.4419172473160959
+2008050078 -0.26737614827496664 0.6446930067879814
+2008050079 0.24542222714170497 -0.24910957521580634
+2008050080 -0.47140570481618244 -0.5059835244331682
+2008050082 -0.17280303359031676 0.3452259429693222
+2008050083 -0.5107064163389284 -0.5597924875818994
+2008050084 0.4263695485737859 -0.44388545593436884
+2008050086 -0.024463149181877572 0.47625536262989043
+2008050087 0.1922562310937565 0.09658566782050464
--- /dev/null
+set terminal pngcairo color size 800,600
+#set output 'axes.png'
+set output
+
+set xdata time
+set timefmt "%Y-%m-%d %H:%M:%S"
+
+set datafile separator ","
+
+#unset border
+#set key outside
+#set key top left horizontal
+
+set grid
+set key outside tmargin center
+
+#set ylabel "°"
+#set ylabel "deg."
+set ylabel "degrees"
+
+set format x "%H:%M"
+#set format y "%.2f"
+set yrange [ -0.1 : 0.1 ]
+
+#set arrow 1 from first,3 to last,3 nohead linestyle rgb "#ff0000"
+
+set multiplot
+set size 1,0.5
+set origin 0, 0.5
+
+#set linetype 1 lc 'green'
+set linetype 99 lc 'red'
+
+#plot "axes.txt" using 1:2 with lines title "X angle", "" using 1:(3) with dots notitle, "" using 1:(-3) with dots notitle
+
+plot "axes.txt" using 1:2:(abs($2) < 3 ? 1: 99) with lines lc variable title "X angle"
+# http://gnuplot-surprising.blogspot.com/2011/09/gnuplot-background-image.html
+#'/home/dpavlin/zc/www/logo-color.png' binary filetype=png origin=(0,0) dx=0.5 dy=0.5 with rgbimage notitle
+
+set origin 0, 0
+
+set xlabel "time"
+#plot "axes.txt" using 1:3 with lines title "Y angle", "" using 1:(3) with dots notitle, "" using 1:(-3) with dots notitle
+
+plot "axes.txt" using 1:3:(abs($3) < 3 ? 2: 99) with lines lc variable title "Y angle"
+#, "" using 1:(3) with dots notitle, "" using 1:(-3) with dots notitle
--- /dev/null
+select to_char(time, 'YYYY-MM-DD HH24:MI:SS'), x_axis_angle, y_axis_angle
+from zc
+where pn = 2008050087 -- and time > now() - interval '24 hours'
+order by time asc
+
--- /dev/null
+#!/bin/sh
+
+dir=/home/dpavlin/zc/gnuplot/
+
+echo "Content-type: image/svg+xml"
+echo
+
+pn=$( basename $0 | sed 's/.cgi//' )
+offset=$( grep "^$pn" $dir/offset.txt )
+offset_x=$( echo $offset | cut -d' ' -f2 )
+offset_y=$( echo $offset | cut -d' ' -f3 )
+
+cat $dir/template.sql | sed -e "s/2008050087/$pn/" -e "s/x_axis_angle/x_axis_angle + $offset_x/" -e "s/y_axis_angle/y_axis_angle + $offset_y/" | psql --username=dpavlin -A -F "," -t zc > /dev/shm/$pn.txt
+cat $dir/template.gnuplot | sed -e "s,axes.txt,/dev/shm/$pn.txt," -e "s,^set terminal.*$,set terminal svg," -e "s,^set output.*$,set output," > /dev/shm/$pn.gnuplot
+gnuplot /dev/shm/$pn.gnuplot
+
+#rm /dev/shm/axes.txt.$$ /dev/shm/axes.gnuplot.$$
<li><a href="demo1.html">Demo 1</a></li>
<li><a href="demo2.html">Demo 2</a></li>
<li><a href="864823042077016.html">Demo 3</a></li>
+ <li><a href="rijeka.html">Rijeka</a></li>
</ul>
<br>
--- /dev/null
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>Rijeka - senzori nagiba</title>
+</head>
+<body>
+
+ <p>
+ <img src="logo-color.png">
+
+ <h1>201-000115</h1>
+ <img src="cgi-bin/2008050082.cgi" width="100%">
+
+ <h1>201-000116</h1>
+ <img src="cgi-bin/2008050080.cgi" width="100%">
+
+ <h1>201-000117</h1>
+ <img src="cgi-bin/2008050078.cgi" width="100%">
+
+ <h1>201-000118</h1>
+ <img src="cgi-bin/2008050083.cgi" width="100%">
+
+ <h1>201-000119</h1>
+ <img src="cgi-bin/2008050084.cgi" width="100%">
+
+ <h1>201-000120</h1>
+ <img src="cgi-bin/2008050079.cgi" width="100%">
+
+
+
+
+ </p>
+
+</body>