- AltosIMU imu = state.imu;
- AltosMag mag = state.mag;
-
- if (imu == null)
- imu = new AltosIMU();
- if (mag == null)
- mag = new AltosMag();
- out.printf("%6d,%6d,%6d,%6d,%6d,%6d,%6d,%6d,%6d",
- imu.accel_x, imu.accel_y, imu.accel_z,
- imu.gyro_x, imu.gyro_y, imu.gyro_z,
- mag.x, mag.y, mag.z);
+ out.printf("%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f,%7.2f",
+ state.accel_along(), state.accel_across(), state.accel_through(),
+ state.gyro_roll(), state.gyro_pitch(), state.gyro_yaw(),
+ state.mag_along(), state.mag_across(), state.mag_through());