6f3d97a23e2565c32b5869dd839e8e4a649ed97c
[fw/altos] / src / test / run-mm
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_mm "$file" > run-out.mm
15
16 #./ao_flight_test_accel "$file" > run-out.accel
17 #"run-out.accel" using 1:9 with lines lt 4 axes x1y1 title "accel height",\
18 #"run-out.accel" using 1:11 with lines lt 4 axes x1y2 title "accel speed",\
19 #"run-out.accel" using 1:13 with lines lt 4 axes x1y2 title "accel accel",\
20 #"run-out.accel" using 1:15 with lines lt 4 axes x1y1 title "accel drogue",\
21 #"run-out.accel" using 1:17 with lines lt 4 axes x1y1 title "accel main",\
22 #
23
24 gnuplot << EOF
25 set ylabel "altitude (m)"
26 set y2label "velocity (m/s), acceleration(m/s²)"
27 set xlabel "time (s)"
28 set xtics border out nomirror
29 set ytics border out nomirror
30 set y2tics border out nomirror
31 set title "$i"
32 plot "run-out.mm" using 1:3 with lines lw 2 lt 1 axes x1y1 title "raw height",\
33 "run-out.mm" using 1:5 with lines lw 2 lt 1 axes x1y2 title "raw accel",\
34 "run-out.mm" using 1:21 with lines lt 2 axes x1y1 title "mm height",\
35 "run-out.mm" using 1:23 with lines lt 2 axes x1y2 title "mm speed",\
36 "run-out.mm" using 1:25 with lines lt 2 axes x1y2 title "mm accel",\
37 "run-out.mm" using 1:29 with lines lt 2 axes x1y1 title "mm drogue",\
38 "run-out.mm" using 1:31 with lines lt 2 axes x1y1 title "mm main"
39 pause mouse close
40 EOF
41 done