- double landed_time = landed_time(iterable);
-
- year = month = day = -1;
- hour = minute = second = -1;
- serial = flight = -1;
- for (AltosRecord record : iterable) {
- if (serial < 0)
- serial = record.serial;
- if ((record.seen & AltosRecord.seen_flight) != 0 && flight < 0)
- flight = record.flight;
- new_state = new AltosState(record, state);
- end_time = new_state.time;
- state = new_state;
+ double landed_time = landed_time(states);
+
+ year = month = day = AltosLib.MISSING;
+ hour = minute = second = AltosLib.MISSING;
+ serial = flight = AltosLib.MISSING;
+ lat = lon = AltosLib.MISSING;
+ has_gps = false;
+ has_other_adc = false;
+ has_rssi = false;
+ for (AltosState state : states) {
+ if (serial == AltosLib.MISSING && state.serial != AltosLib.MISSING)
+ serial = state.serial;
+ if (flight == AltosLib.MISSING && state.flight != AltosLib.MISSING)
+ flight = state.flight;
+ if (state.battery_voltage != AltosLib.MISSING)
+ has_other_adc = true;
+ if (state.rssi != AltosLib.MISSING)
+ has_rssi = true;
+ end_time = state.time;