X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosTelemetryFile.java;h=a4792f118938b4d0283954d7bd1d8ae8919bb158;hp=8adf7e695c569900ead1a3d301b547c5e0cce15a;hb=78b4bf77fca96bef2cce443ad4c9544ae83f0acc;hpb=2e82051a6aaaccf1e8a242f9c8141e4167e652d2 diff --git a/altoslib/AltosTelemetryFile.java b/altoslib/AltosTelemetryFile.java index 8adf7e69..a4792f11 100644 --- a/altoslib/AltosTelemetryFile.java +++ b/altoslib/AltosTelemetryFile.java @@ -118,15 +118,21 @@ public class AltosTelemetryFile implements AltosRecordSet { public void capture_series(AltosDataListener listener) { AltosCalData cal_data = cal_data(); + cal_data.reset(); for (AltosTelemetry telem : telems) { int tick = telem.tick(); cal_data.set_tick(tick); - if (cal_data.time() >= -1) + + /* Try to pick up at least one pre-boost value */ + if (cal_data.time() >= -2) telem.provide_data(listener, cal_data); + if (listener.state == AltosLib.ao_flight_landed) + break; } + listener.finish(); } - public AltosTelemetryFile(FileInputStream input) { + public AltosTelemetryFile(FileInputStream input) throws IOException { telems = new AltosTelemetryIterable(input); } }