package altosui;
-import java.io.IOException;
-import java.text.ParseException;
import java.lang.UnsupportedOperationException;
import java.util.NoSuchElementException;
import java.util.Iterator;
+import org.altusmetrum.AltosLib.*;
class AltosDataPointReader implements Iterable<AltosDataPoint> {
Iterator<AltosRecord> iter;
public double battery_voltage() { return record.battery_voltage(); }
public double drogue_voltage() { return record.drogue_voltage(); }
public double main_voltage() { return record.main_voltage(); }
+ public boolean has_accel() { return has_accel; }
};
}
throw new UnsupportedOperationException();
}
public boolean hasNext() {
+ if (record != null && record.state == Altos.ao_flight_landed)
+ return false;
return iter.hasNext();
}
public AltosDataPoint next() {
- read_next_record();
+ do {
+ read_next_record();
+ } while (record.time < -1.0 && hasNext());
return current_dp();
}
};