Use pressure speed for drogue and beyond states. Fix differentiation time.
[fw/altos] / ao-tools / ao-postflight / ao-postflight.c
index c5814c93de4e7fe30fccd3a89c832aeb5693d4b1..0c632c343ca0e576c2c247e6405992c16b712cbc 100644 (file)
@@ -128,7 +128,7 @@ analyse_flight(struct cc_flightraw *f, FILE *summary_file, FILE *detail_file)
                }
 
                if (cooked) {
-                       if (state_start < apogee) {
+                       if (state < ao_flight_drogue) {
                                speed_i = cc_perioddata_max(&cooked->accel_speed, state_start, state_stop);
                                if (speed_i >= 0)
                                        speed = cooked->accel_speed.data[speed_i];
@@ -205,7 +205,7 @@ main (int argc, char **argv)
        int                     c;
        int                     serial;
        char                    *s;
-       char                    *summary_name, *detail_name;
+       char                    *summary_name = NULL, *detail_name = NULL;
 
        while ((c = getopt_long(argc, argv, "S:D:", options, NULL)) != -1) {
                switch (c) {