- if (imu == null)
- imu = new AltosIMU();
- if (mag == null)
- mag = new AltosMag();
- out.printf("%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f",
- imu.accel_x, imu.accel_y, imu.accel_z,
- imu.gyro_x, imu.gyro_y, imu.gyro_z,
- mag.x, mag.y, mag.z);
+ double mag_along() { return series.value(AltosFlightSeries.mag_along_name, indices); }
+ double mag_across() { return series.value(AltosFlightSeries.mag_across_name, indices); }
+ double mag_through() { return series.value(AltosFlightSeries.mag_through_name, indices); }
+
+ double tilt() { return series.value(AltosFlightSeries.orient_name, indices); }
+
+ void write_advanced() {
+ out.printf("%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f",
+ accel_along(), accel_across(), accel_through(),
+ gyro_roll(), gyro_pitch(), gyro_yaw(),
+ mag_along(), mag_across(), mag_through(),
+ tilt());
+ }
+
+ void write_igniter_header() {
+ out.printf("pyro");
+ for (int i = 0; i < series.igniter_voltage.length; i++)
+ out.printf(",%s", AltosLib.igniter_short_name(i));
+ }
+
+ double pyro() { return series.value(AltosFlightSeries.pyro_voltage_name, indices); }
+
+ double igniter_value(int channel) { return series.value(series.igniter_voltage_name(channel), indices); }
+
+ void write_igniter() {
+ out.printf("%5.2f", pyro());
+ for (int i = 0; i < series.igniter_voltage.length; i++)
+ out.printf(",%5.2f", igniter_value(i));