altos: Improve ao_flight_test a bit
authorKeith Packard <keithp@keithp.com>
Tue, 10 Jul 2012 22:15:00 +0000 (15:15 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 10 Jul 2012 22:15:00 +0000 (15:15 -0700)
Add -i flag to include flight description
Have run-tests know how many failures to expect
Add run_baro to plot a single flight using the baro-only mode

Signed-off-by: Keith Packard <keithp@keithp.com>
src/test/run-baro [new file with mode: 0755]
src/test/run-tests
src/test/test-flights

diff --git a/src/test/run-baro b/src/test/run-baro
new file mode 100755 (executable)
index 0000000..21bab9f
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+for i in "$@"; do
+./ao_flight_test_baro "$i" > run-out.baro
+
+#./ao_flight_test_accel "$i" > run-out.accel
+#"run-out.accel" using 1:9 with lines lt 4 axes x1y1 title "accel height",\
+#"run-out.accel" using 1:11 with lines lt 4 axes x1y2 title "accel speed",\
+#"run-out.accel" using 1:13 with lines lt 4 axes x1y2 title "accel accel",\
+#"run-out.accel" using 1:15 with lines lt 4 axes x1y1 title "accel drogue",\
+#"run-out.accel" using 1:17 with lines lt 4 axes x1y1 title "accel main",\
+#
+
+gnuplot << EOF
+set ylabel "altitude (m)"
+set y2label "velocity (m/s), acceleration(m/s²)"
+set xlabel "time (s)"
+set xtics border out nomirror
+set ytics border out nomirror
+set y2tics border out nomirror
+set title "$i"
+plot "run-out.baro" using 1:3 with lines lw 2 lt 1 axes x1y1 title "raw height",\
+"run-out.baro" using 1:5 with lines lw 2 lt 2 axes x1y2 title "raw accel",\
+"run-out.baro" using 1:9 with lines lt 3 axes x1y1 title "baro height",\
+"run-out.baro" using 1:11 with lines lt 4 axes x1y2 title "baro speed",\
+"run-out.baro" using 1:13 with lines lt 5 axes x1y2 title "baro accel",\
+"run-out.baro" using 1:17 with lines lt 6 axes x1y1 title "baro drogue",\
+"run-out.baro" using 1:19 with lines lt 7 axes x1y1 title "baro main"
+pause mouse close
+EOF
+done
\ No newline at end of file
index a8a8dc3fcea7707db64703a6475d19bde36cc55b..4edecf1ad40f51c32c41e2f57967de17a7860843 100755 (executable)
@@ -2,21 +2,26 @@
 
 DIR=~/misc/rockets/flights
 
+expect_baro=2
+expect_full=5
+
 bad_baro=0
 bad_full=0
 while read flight description; do
-    if ./ao_flight_test_baro -s $DIR/$flight; then
+    if ./ao_flight_test_baro -s -i "$description" $DIR/$flight; then
        :
     else
        : $((bad_baro++))
     fi
-    if ./ao_flight_test -s $DIR/$flight; then
+    if ./ao_flight_test -s -i "$description" $DIR/$flight; then
        :
     else
        : $((bad_full++))
     fi
 done < test-flights
-echo baro errors $bad_baro
-echo full errors $bad_full
-: $((bad = bad_baro + bad_full))
-exit $bad
\ No newline at end of file
+echo baro errors $bad_baro expected $expect_baro
+echo full errors $bad_full expected $expect_full
+: $((miss_baro = bad_baro > expect_baro ? bad_baro - expect_baro : expect_baro - bad_baro))
+: $((miss_full = bad_full > expect_full ? bad_full - expect_full : expect_full - bad_full))
+: $((miss = miss_baro + miss_full))
+exit $miss
\ No newline at end of file
index f6b3b99200b6ad2ea1143252a9a65e27dab70cbf..12f62ea92e8237312285a620ea6e87121f8be60a 100644 (file)
@@ -29,7 +29,7 @@
 2010-02-28-serial-052-flight-004.eeprom LDDD Tillamook airport, 2010-02-28, I161
 2010-03-06-serial-010-flight-004.eeprom Robert's Lil Nuke at Hudson Ranch on a CTI 108G57CL Pro29
 2010-03-06-serial-013-flight-003.eeprom Trick-O-Treat at Hudson Ranch on a J595BS
-2010-03-06-serial-051-flight-003.eeprom G-Spot at Hudson Ranch on an H180W
+2010-03-06-serial-051-flight-003.eeprom G-Spot at Hudson Ranch on an H180W (apogee early, fools ao_flight_test_baro)
 2010-03-06-serial-053-flight-004.eeprom Horizon Rebuilt at Hudson Ranch on a J530IM with MAWD as backup
 2010-05-08-serial-229-flight-002.eeprom First customer flight on a sparky.
 2010-05-28-serial-215-flight-002.eeprom Mike's L1 cert flight. Congrats!
 2010-05-30-serial-010-flight-005.eeprom Robert's Lil Nuke on a 84G88 Smoky Sam at Mile High Mayhem 2010 Version 0.1 TeleMetrum with 5010 GPS board.
 2010-05-30-serial-051-flight-004.eeprom Bdale's G-Spot on a CTI 298H159 Green3 at Mile High Mayhem 2010
 2010-05-30-serial-224-flight-003.eeprom Bill Mott's L3 cert flight
-2010-05-30-serial-226-flight-001.eeprom Robert's RG-2 on a 159G54RL at Mile High Mayhem. Very noise accel data, early apogee
+2010-05-30-serial-226-flight-001.eeprom Robert's RG-2 on a 159G54RL at Mile High Mayhem. Very noise accel data, early apogee (fools full)
 2010-05-31-serial-010-flight-006.eeprom Robert's Lil Nuke with a v0.1 TeleMetrum and 5010 GPS board flying on a 159G118 Blue Streak on the last day of Mile High Mayhem 2010
 2010-05-31-serial-216-flight-001.eeprom Sharp Stick in the Sky on an "I something" EX motor from James Russell
-2010-05-31-serial-219-flight-001.eeprom Candy Cane on CTI K300 at MHM.
+2010-05-31-serial-219-flight-001.eeprom Candy Cane on CTI K300 at MHM. (accel noise fools full)
 2010-05-31-serial-227-flight-003.eeprom Mike's Rocket on J285 for successful L2 cert at MHM
 2010-06-05-serial-220-flight-001.eeprom Mini-mmuchness on 159G54RL, Sunday at MHM 2010
 2010-06-26-serial-209-flight-003.eeprom Tripoli Colorado Spring Fling with COSROCS at the Buffalo Ranch
-2010-06-26-serial-215-flight-004.eeprom Tripoli Colorado Spring Fling with COSROCS at the Buffalo Ranch
+2010-06-26-serial-215-flight-004.eeprom Tripoli Colorado Spring Fling with COSROCS at the Buffalo Ranch (accel noise fools full)
 2010-06-26-serial-220-flight-002.eeprom Mini Mmuchness on CTI H120CL to 1975m, OROC June 2010
 2010-06-26-serial-226-flight-002.eeprom Tripoli Colorado Spring Fling with COSROCS at the Buffalo Ranch
 2010-06-27-serial-221-flight-002.eeprom PSAS LV2c on N2000 at OROC june launch
 2010-07-17-serial-230-flight-001.eeprom Mike Ward's Level 1 cert flight on H225
 2010-07-18-serial-219-flight-002.eeprom MMuchness on M1230 for successful L3 cert flight
 2010-08-07-serial-216-flight-003.eeprom Sharp stick on I300T at Metra's august launch. Main out at apogee.
-2010-08-07-serial-220-flight-003.eeprom Mini-mmuchness flight at Metra after debconf. Unstable on G80. ABNORMAL FLIGHT.
-2010-08-12-serial-236-flight-001.eeprom Edgar's L1 flight, Madcow Momba on Aerotech H128
+2010-08-07-serial-220-flight-003.eeprom Mini-mmuchness flight at Metra after debconf. Unstable on G80. ABNORMAL FLIGHT. (fools full)
+2010-08-12-serial-236-flight-001.eeprom Edgar's L1 flight, Madcow Momba on Aerotech H128 (early apogee charge fools baro)
 2010-08-21-serial-010-flight-007.eeprom Robert's Lil Nuke, flying on a CTI Pro29 2-grain 110G250 Vmax. Just awesome!  PFND.
 2010-08-21-serial-224-flight-004.eeprom Anthony Towns' LDDD clone, successful L1 cert on a CTI Pro38 2-grain 266H125 classic.  Airframe was set up for apogee-only with motor based ejection.  The BP charge was larger than necessary, caused nose cone to snap back against aft airframe.  Minor damage to leading edge of aft airframe, big chunk of the nose cone skin cracked away.  Same problem Bdale saw on Sharp Stick's nosecone, also from Performance Rocketry, where there was apparently an air bubble below the gel coat.  Determination was that damage was cosmetic and would not affect cert... confirmed by successful L2 later in the day!
 2010-08-21-serial-224-flight-005.eeprom Anthony Towns' LDDD clone, successful L2 cert on a CTI Pro38 5-grain 58J357 blue streak.  Perfect drogueless dual deploy!  0.8-0.9 grams aft charge and about 1.0 grams forward.  Flew without ground testing charges due to time pressure before waiver closed for the day.  About as close to the waiver as you'd ever want to be on a cert flight, again demonstrating that OpenRocket under-estimates apogee ... approximately 6800 ft predicted...
 2010-08-21-serial-233-flight-002.eeprom Tim van Milligan's 5.5" L2 airframe, flying on a CTI Pro38 6-grain 774J410 red, TM indicated a problem with the apogee igniter continuity, noticed during countdown, turned out to be a loose wire!  Perfect dual deploy flight once that was fixed.
 2010-09-03-serial-051-flight-005.eeprom G-spot on an old Aerotech H125-20W single use 29mm motor.  It appears the ejection at apogee actually happened much later, perhaps as much as 10 seconds late!
-2010-09-03-serial-215-flight-005.eeprom Horizon Rebuild on a K490 Green3 reload.  PFND. About 1.4 grams each end.
+2010-09-03-serial-215-flight-005.eeprom Horizon Rebuild on a K490 Green3 reload.  PFND. About 1.4 grams each end. (accel noise fools full)
 2010-09-24-serial-236-flight-006.eeprom LDDD on I236 in Sheridan on 2010-09-24 to 1216m
 2010-09-25-serial-223-flight-001.eeprom Bdale's 10" Goblin, flying on a CTI Pro75 M1300 Imax dual thrust during Chili Blaster 2 at Hudson Ranch.  First flight after rebuild to do dual deploy from one bay with ARRD and 15' surplus "+ sign" parachute.
 2010-10-17-serial-215-flight-006.eeprom Horizon Rebuild on CTI J595BS at Tripoli Colorado launch site near Hartsel, CO