altosui: Initialize flight velocity to zero when reading eeprom files
authorKeith Packard <keithp@keithp.com>
Wed, 12 Sep 2012 09:26:32 +0000 (02:26 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 12 Sep 2012 09:26:32 +0000 (02:26 -0700)
Otherwise, the integration of velocity will start at MISSING and get
stranger. Fortunately, we know the initial velocity of the rocket when
sitting on the pad.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosEepromIterable.java

index 1aa816e1aa6908e5e8f8af05399b6acd54471623..2ac10e85eb0d47cfa2c29066d174ce6f84b62d34 100644 (file)
@@ -200,6 +200,7 @@ public class AltosEepromIterable extends AltosRecordIterable {
                state.state = AltosLib.ao_flight_pad;
                state.accel_plus_g = 15758;
                state.accel_minus_g = 16294;
+               state.flight_vel = 0;
 
                /* Pull in static data from the flight and gps_date records */
                if (flight_record != null)