EDIT: Moved to ElectricalEngineering StackExchange Community

I'm using Sparkfun Razor IMU 9DOF sensor which incorporates accelerometer, gyroscope, and magnetometer, for giving the Euler's angles (yaw, pitch, and roll). I'm using the firmware at this link. It has Processing sketch for calibration of magnetometer, but it doesn't give the precise measurements. Especially, the yaw is imprecise. I'm using this sensor for measuring azimuth and altitude of stellar objects. The altitude is mostly correct, but azimuth (yaw) isn't.

I have several questions:

  • Is there a better way to calibrate magnetometer? Is the calibration sufficient, without using the Madgwick or Kalman filter?
  • Is there some nonlinearity present in the sensor? Since the yaw offset isn't constant, it changes (around -12 degrees up north to almost correct value at southwest). And if it is, how could I measure that nonlinearity and apply to the yaw measurements?
  • If I have to use Madgwick or Kalman, do I have to apply them on quaternions? I believe that applying them at the final yaw measurements wouldn't do the job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.