altos: Fix up flight code testing
[fw/altos] / src / test / run-one
1 #!/bin/sh
2
3 for i in "$@"; do
4 ./ao_flight_test "$i" > run-out.full
5 ./ao_flight_test_baro "$i" > run-out.baro
6 #./ao_flight_test_accel "$i" > run-out.accel
7
8 #"run-out.accel" using 1:9 with lines lt 4 axes x1y1 title "accel height",\
9 #"run-out.accel" using 1:11 with lines lt 4 axes x1y2 title "accel speed",\
10 #"run-out.accel" using 1:13 with lines lt 4 axes x1y2 title "accel accel",\
11 #"run-out.accel" using 1:15 with lines lt 4 axes x1y1 title "accel drogue",\
12 #"run-out.accel" using 1:17 with lines lt 4 axes x1y1 title "accel main",\
13
14 gnuplot << EOF
15 set ylabel "altitude (m)"
16 set y2label "velocity (m/s), acceleration(m/s²)"
17 set xlabel "time (s)"
18 set xtics border out nomirror
19 set ytics border out nomirror
20 set y2tics border out nomirror
21 set title "$i"
22 plot "run-out.full" using 1:3 with lines lw 2 lt 1 axes x1y1 title "raw height",\
23 "run-out.full" using 1:5 with lines lw 2 lt 1 axes x1y2 title "raw accel",\
24 "run-out.full" using 1:9 with lines lt 2 axes x1y1 title "full height",\
25 "run-out.full" using 1:11 with lines lt 2 axes x1y2 title "full speed",\
26 "run-out.full" using 1:13 with lines lt 2 axes x1y2 title "full accel",\
27 "run-out.full" using 1:15 with lines lt 2 axes x1y1 title "full drogue",\
28 "run-out.full" using 1:17 with lines lt 2 axes x1y1 title "full main", \
29 "run-out.baro" using 1:9 with lines lt 3 axes x1y1 title "baro height",\
30 "run-out.baro" using 1:11 with lines lt 3 axes x1y2 title "baro speed",\
31 "run-out.baro" using 1:13 with lines lt 3 axes x1y2 title "baro accel",\
32 "run-out.baro" using 1:15 with lines lt 3 axes x1y1 title "baro drogue",\
33 "run-out.baro" using 1:17 with lines lt 3 axes x1y1 title "baro main"
34 pause mouse close
35 EOF
36 done