int gps_tick;
- boolean saw_boost;
-
int boost_tick;
boolean saw_gps_date;
state.tick = record.tick;
switch (record.cmd) {
case Altos.AO_LOG_FLIGHT:
- state.ground_accel = record.a;
- state.flight = record.b;
- seen |= seen_flight;
+ /* recorded when first read from the file */
break;
case Altos.AO_LOG_SENSOR:
state.accel = record.a;
if (record.cmd == Altos.AO_LOG_INVALID)
continue;
tick = record.tick;
- if (!saw_boost && record.cmd == Altos.AO_LOG_STATE &&
- record.a >= Altos.ao_flight_boost)
- {
- saw_boost = true;
+ if (record.cmd == Altos.AO_LOG_FLIGHT) {
+ state.ground_accel = record.a;
+ state.flight = record.b;
boost_tick = tick;
+ seen |= seen_flight;
}
/* Two firmware bugs caused the loss of some GPS data.