+ AltosCalData cal_data = listener.cal_data();
+
+ if (imu != null) {
+ listener.set_gyro(cal_data.gyro_roll(imu.gyro_y),
+ cal_data.gyro_pitch(imu.gyro_x),
+ cal_data.gyro_yaw(imu.gyro_z));
+ listener.set_accel_ground(imu.accel_y,
+ imu.accel_x,
+ imu.accel_z);
+ if (imu.mag_x != AltosLib.MISSING) {
+ listener.set_mag(cal_data.mag_along(imu.mag_y),
+ cal_data.mag_across(imu.mag_x),
+ cal_data.mag_through(imu.mag_z));
+ }
+ }