feb21
authorstephen
Tue, 21 Feb 2017 11:34:34 +0000
changeset 28f610c2541dc7
parent 27 c131aca22f9b
child 29 f3e8c3298eb7
feb21
battery.log
daily/loradtn-2017-02-20.png
daily/loradtn-2017-02-21.gpl
daily/loradtn-2017-02-21.png
doit.sh
loradtn.png
sedded-battery.log
     1.1 Binary file battery.log has changed
     2.1 Binary file daily/loradtn-2017-02-20.png has changed
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/daily/loradtn-2017-02-21.gpl	Tue Feb 21 11:34:34 2017 +0000
     3.3 @@ -0,0 +1,75 @@
     3.4 +# set term postscript eps color solid blacktext "Helvetica" 14
     3.5 +# set output 'loradtn.eps'
     3.6 +# set size 4,4
     3.7 +
     3.8 +set terminal png nocrop enhanced size 1024,768
     3.9 +set output 'loradtn-2017-02-21.png'
    3.10 +
    3.11 +set datafile separator ","
    3.12 +set xdata time
    3.13 +set timefmt "%Y-%m-%d %H:%M:%S"
    3.14 +
    3.15 +os='2017-02-21 11:00:00'
    3.16 +oe='2017-02-21 16:00:00'
    3.17 +#os='2017-01-24 14:00:00'
    3.18 +#oe='2017-01-25 13:00:00'
    3.19 +
    3.20 +set title "Loradtn power (Mech. Eng. roof)"
    3.21 +set key below 
    3.22 +
    3.23 +r1=1700
    3.24 +r2=1800
    3.25 +r3=1900
    3.26 +r4=2000
    3.27 +
    3.28 +nospike=0
    3.29 +spike=1
    3.30 +newdata=2
    3.31 +
    3.32 +set xrange [os:oe]
    3.33 +set yrange [1500:19000]
    3.34 +set y2range [-6000:8000]
    3.35 +
    3.36 +set ylabel "mV"
    3.37 +set y2label "mA"
    3.38 +set ytics nomirror
    3.39 +
    3.40 +set ytics (\
    3.41 +"OVERRIDE" 5000,\
    3.42 +"UP" 4500,\
    3.43 +"STBYSHORT" 4000,\
    3.44 +"STBYLONG" 3500,\
    3.45 +"SLEEP" 3000,\
    3.46 +"OFF" 2500,\
    3.47 +"14500" 14500,\
    3.48 +"14000" 14000,\
    3.49 +"13500" 13500,\
    3.50 +"13000" 13000,\
    3.51 +"12500" 12500,\
    3.52 +"12000" 12000,\
    3.53 +"11500" 11500,\
    3.54 +"11000" 11000,\
    3.55 +"spike" 10050)
    3.56 +
    3.57 +set y2tics ( 4000, 3500, 3000, 2500, 2000, 1500, 1000, 500, 0, -500, -1000, "spike" -2000 )
    3.58 +
    3.59 +
    3.60 +set style arrow 1 nohead ls 1 lt 3
    3.61 +set style arrow 2 nohead ls 2
    3.62 +set style arrow 3 nohead lc rgb "green"
    3.63 +set style arrow 4 nohead lc rgb "red"
    3.64 +
    3.65 +# some horizontal lines to help
    3.66 +set arrow from os,12000 to oe,12000 as 1
    3.67 +set arrow from os,11450 to oe,11450 as 3
    3.68 +set arrow from os,11300 to oe,11300 as 4
    3.69 +set arrow from os,second 1000 to oe,second 1000 as 2
    3.70 +set arrow from os,second 0 to oe,second 0 as 2
    3.71 +set arrow from os,second -1000 to oe,second -1000 as 2
    3.72 +
    3.73 +set pointsize 10
    3.74 +
    3.75 +plot 'sedded-battery.log' using 1: ( ($2 == r1 && $7 != newdata) ? ( ( ($7 == spike) ? 10050 : (10 * $4) ) ) : 1/0 ) axes x1y1 title "mV" with points ps 1, \
    3.76 +     'sedded-battery.log' using 1: ( ($2 == r1 && $7 != newdata) ? ( ( ($7 == spike) ?   -2000 :       $5  ) ) : 1/0 ) axes x1y2 title "mA" with points ps 1, \
    3.77 +     'sedded-battery.log' using 1: ( ($2 == r1) ? (2000 + $6) : 1/0 ) axes x1y1 title "state" with step
    3.78 +
     4.1 Binary file daily/loradtn-2017-02-21.png has changed
     5.1 --- a/doit.sh	Mon Feb 20 14:44:07 2017 +0000
     5.2 +++ b/doit.sh	Tue Feb 21 11:34:34 2017 +0000
     5.3 @@ -10,6 +10,9 @@
     5.4  
     5.5  	if [ "$state" == "up" ]
     5.6  	then
     5.7 +		# there's a chance of loss of battery.log here if device went
     5.8 +		# down just as we're copying from it. But given we have all
     5.9 +		# in mercurial that's ok, we can recover.
    5.10  		ssh basil.dsg.cs.tcd.ie scp loradtn@tunloradtn:/var/log/battery.log .
    5.11  		scp basil.dsg.cs.tcd.ie:battery.log .
    5.12  		./battery-seds.sh battery.log >sedded-battery.log
     6.1 Binary file loradtn.png has changed
     7.1 --- a/sedded-battery.log	Mon Feb 20 14:44:07 2017 +0000
     7.2 +++ b/sedded-battery.log	Tue Feb 21 11:34:34 2017 +0000
     7.3 @@ -5277,3 +5277,54 @@
     7.4  2017-02-20 14:37:53,1700,pbmd,1216,-1008,2500,0
     7.5  2017-02-20 14:39:04,1700,pbmd,1213,-1119,2500,0
     7.6  2017-02-20 14:40:13,1700,pbmd,1213,-1008,2500,0
     7.7 +2017-02-20 14:41:22,1700,pbmd,1219,-952,2500,0
     7.8 +2017-02-20 14:42:31,1700,pbmd,1209,-989,2500,0
     7.9 +2017-02-20 14:43:40,1700,pbmd,1221,-989,2500,0
    7.10 +2017-02-20 14:44:49,1700,pbmd,1215,-1026,2500,0
    7.11 +2017-02-20 14:45:58,1700,pbmd,1213,-989,2500,0
    7.12 +2017-02-20 14:47:07,1700,pbmd,1213,-971,2500,0
    7.13 +2017-02-20 14:48:16,1700,pbmd,1215,-971,2500,0
    7.14 +2017-02-20 14:49:26,1700,pbmd,1210,-1008,2500,0
    7.15 +2017-02-20 14:50:35,1700,pbmd,1212,-971,2500,0
    7.16 +2017-02-20 14:51:44,1700,pbmd,1210,-989,2500,0
    7.17 +2017-02-20 14:52:53,1700,pbmd,1210,-1026,2500,0
    7.18 +2017-02-20 14:54:02,1700,pbmd,1209,-971,2500,0
    7.19 +2017-02-20 14:55:11,1700,pbmd,1205,-952,2500,0
    7.20 +2017-02-20 14:56:20,1700,pbmd,1200,-897,2500,0
    7.21 +2017-02-20 14:57:29,1700,pbmd,1199,-971,2500,0
    7.22 +2017-02-20 14:58:38,1700,pbmd,1191,-1045,2500,0
    7.23 +2017-02-20 14:59:47,1700,pbmd,1189,-1045,2500,0
    7.24 +2017-02-20 15:00:56,1700,pbmd,1184,-989,2500,0
    7.25 +2017-02-20 15:02:05,1700,pbmd,1174,-952,2500,0
    7.26 +2017-02-20 15:03:14,1700,pbmd,1165,-1008,2500,0
    7.27 +2017-02-20 15:04:23,1700,pbmd,1156,-934,2500,0
    7.28 +2017-02-20 15:05:32,1700,pbmd,1152,-860,2500,0
    7.29 +2017-02-20 15:06:41,1700,pbmd,1137,-823,2000,0
    7.30 +2017-02-21 10:16:09,1700,pbmd,1235,-582,3000,0
    7.31 +2017-02-21 10:17:18,1700,pbmd,1225,-767,1000,0
    7.32 +2017-02-21 11:02:39,1700,pbmd,1249,-527,2500,0
    7.33 +2017-02-21 11:03:48,1700,pbmd,1243,-564,2500,0
    7.34 +2017-02-21 11:04:57,1700,pbmd,1238,-490,2500,0
    7.35 +2017-02-21 11:06:06,1700,pbmd,1237,-453,2500,0
    7.36 +2017-02-21 11:07:15,1700,pbmd,1237,-508,2500,0
    7.37 +2017-02-21 11:08:24,1700,pbmd,1235,-490,2500,0
    7.38 +2017-02-21 11:09:33,1700,pbmd,1234,-490,2500,0
    7.39 +2017-02-21 11:10:42,1700,pbmd,1234,-379,2500,0
    7.40 +2017-02-21 11:11:51,1700,pbmd,1238,-138,2500,0
    7.41 +2017-02-21 11:13:00,1700,pbmd,1237,-360,2500,0
    7.42 +2017-02-21 11:14:09,1700,pbmd,1235,-323,2500,0
    7.43 +2017-02-21 11:15:18,1700,pbmd,1235,-212,2500,0
    7.44 +2017-02-21 11:16:27,1700,pbmd,1231,-379,2500,0
    7.45 +2017-02-21 11:17:36,1700,pbmd,1230,-416,2500,0
    7.46 +2017-02-21 11:18:45,1700,pbmd,1230,-342,2500,0
    7.47 +2017-02-21 11:19:54,1700,pbmd,1227,-360,2500,0
    7.48 +2017-02-21 11:21:03,1700,pbmd,1219,-527,2500,0
    7.49 +2017-02-21 11:22:12,1700,pbmd,1205,-638,2500,0
    7.50 +2017-02-21 11:23:21,1700,pbmd,1200,-601,2500,0
    7.51 +2017-02-21 11:24:30,1700,pbmd,1196,-730,2500,0
    7.52 +2017-02-21 11:25:39,1700,pbmd,1190,-749,2500,0
    7.53 +2017-02-21 11:26:48,1700,pbmd,1186,-841,2500,0
    7.54 +2017-02-21 11:27:57,1700,pbmd,1189,-749,2500,0
    7.55 +2017-02-21 11:29:06,1700,pbmd,1189,-693,2500,0
    7.56 +2017-02-21 11:30:16,1700,pbmd,1187,-712,2500,0
    7.57 +2017-02-21 11:31:25,1700,pbmd,1184,-656,2500,0