fix missing newline at end of src/test/Makefile
[fw/altos] / src / test / run-one
1 #!/bin/sh
2
3 DIR=~/misc/rockets/flights
4
5 for i in "$@"; do
6 case "$i" in
7     */*)
8     file="$i"
9     ;;
10     *)
11     file="$DIR/$i"
12     ;;
13 esac
14 ./ao_flight_test "$file" > run-out.full
15 ./ao_flight_test_baro "$file" > run-out.baro
16
17 #./ao_flight_test_accel "$file" > run-out.accel
18 #"run-out.accel" using 1:9 with lines lt 4 axes x1y1 title "accel height",\
19 #"run-out.accel" using 1:11 with lines lt 4 axes x1y2 title "accel speed",\
20 #"run-out.accel" using 1:13 with lines lt 4 axes x1y2 title "accel accel",\
21 #"run-out.accel" using 1:15 with lines lt 4 axes x1y1 title "accel drogue",\
22 #"run-out.accel" using 1:17 with lines lt 4 axes x1y1 title "accel main",\
23 #
24
25 gnuplot << EOF
26 set ylabel "altitude (m)"
27 set y2label "velocity (m/s), acceleration(m/s²)"
28 set xlabel "time (s)"
29 set xtics border out nomirror
30 set ytics border out nomirror
31 set y2tics border out nomirror
32 set title "$i"
33 plot "run-out.full" using 1:3 with lines lw 2 lt 1 axes x1y1 title "raw height",\
34 "run-out.full" using 1:5 with lines lw 2 lt 1 axes x1y2 title "raw accel",\
35 "run-out.full" using 1:9 with lines lt 2 axes x1y1 title "full height",\
36 "run-out.full" using 1:11 with lines lt 2 axes x1y2 title "full speed",\
37 "run-out.full" using 1:13 with lines lt 2 axes x1y2 title "full accel",\
38 "run-out.full" using 1:15 with lines lt 2 axes x1y1 title "full drogue",\
39 "run-out.full" using 1:17 with lines lt 2 axes x1y1 title "full main", \
40 "run-out.baro" using 1:9 with lines lt 3 axes x1y1 title "baro height",\
41 "run-out.baro" using 1:11 with lines lt 3 axes x1y2 title "baro speed",\
42 "run-out.baro" using 1:13 with lines lt 3 axes x1y2 title "baro accel",\
43 "run-out.baro" using 1:15 with lines lt 3 axes x1y1 title "baro drogue",\
44 "run-out.baro" using 1:17 with lines lt 3 axes x1y1 title "baro main"
45 pause mouse close
46 EOF
47 done