+ double landed_time(AltosRecordIterable iterable) {
+ AltosState state = null;
+ for (AltosRecord record : iterable) {
+ state = new AltosState(record, state);
+
+ if (state.state == Altos.ao_flight_landed)
+ break;
+ }
+
+ double landed_height = state.height;
+
+ state = null;
+
+ boolean above = true;
+
+ double landed_time = -1000;
+
+ for (AltosRecord record : iterable) {
+ state = new AltosState(record, state);
+
+ if (state.height > landed_height + 10) {
+ above = true;
+ } else {
+ if (above && state.height < landed_height + 2) {
+ above = false;
+ landed_time = state.time;
+ }
+ }
+ }
+ if (landed_time == -1000)
+ landed_time = state.time;
+ return landed_time;
+ }
+
+ public AltosFlightStats(AltosRecordIterable iterable) throws InterruptedException, IOException {