* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altoslib_11;
+package org.altusmetrum.altoslib_12;
import java.io.*;
import java.util.*;
public void set_accel(double along, double across, double through) { }
public void set_mag(double along, double across, double through) { }
public void set_pyro_voltage(double volts) { }
- public void set_ignitor_voltage(double[] voltage) { }
+ public void set_igniter_voltage(double[] voltage) { }
public void set_pyro_fired(int pyro_mask) { }
public void set_companion(AltosCompanion companion) { }
public boolean cal_data_complete() {
/* All telemetry packets */
+ AltosCalData cal_data = cal_data();
+
if (cal_data.serial == AltosLib.MISSING)
return false;
/*
* TelemetryLocation
*/
- if (AltosLib.has_gps(cal_data.device_type) && cal_data.gps_ground_altitude == AltosLib.MISSING)
+ if (AltosLib.has_gps(cal_data.device_type) && cal_data.gps_pad == null)
return false;
return true;
AltosTelemetryNullListener l = new AltosTelemetryNullListener(cal_data);
for (AltosTelemetry telem : telems) {
- telem.provide_data(l, cal_data);
+ telem.provide_data(l);
if (l.cal_data_complete())
break;
}
- System.out.printf("Telemetry boost tick %d\n", cal_data.boost_tick);
}
return cal_data;
}
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)
- telem.provide_data(listener, cal_data);
+
+ /* Try to pick up at least one pre-boost value */
+ if (cal_data.time() >= -2)
+ telem.provide_data(listener);
+ if (listener.state() == AltosLib.ao_flight_landed)
+ break;
}
+ listener.finish();
}
- public AltosTelemetryFile(FileInputStream input) {
+ public AltosTelemetryFile(FileInputStream input) throws IOException {
telems = new AltosTelemetryIterable(input);
}
}