- listener.set_gyro(cal_data.gyro_roll(imu.gyro_roll(imu_type)),
- cal_data.gyro_pitch(imu.gyro_pitch(imu_type)),
- cal_data.gyro_yaw(imu.gyro_yaw(imu_type)));
+ if (imu.imu_model != AltosLib.MISSING)
+ cal_data.set_imu_model(imu.imu_model);
+ if (imu.mag_model != AltosLib.MISSING)
+ cal_data.set_mag_model(imu.mag_model);
+
+ if (imu.gyro_roll(imu_type) != AltosLib.MISSING) {
+ cal_data.set_gyro_zero(0, 0, 0);
+ listener.set_gyro(cal_data.gyro_roll(imu.gyro_roll(imu_type)),
+ cal_data.gyro_pitch(imu.gyro_pitch(imu_type)),
+ cal_data.gyro_yaw(imu.gyro_yaw(imu_type)));
+ }