3
\$\begingroup\$

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.
\$\endgroup\$
  • 1
    \$\begingroup\$ Ahh silly question: Are you compensating for the difference between magnetic and geographic north. www1.appstate.edu/~goodmanj/4401/notes/magnets/mnvsgn.html \$\endgroup\$ – George Herold Sep 6 '16 at 14:14
  • \$\begingroup\$ That has come to my mind, but now I've checked that from my location the difference is approximately 4 degrees. If it was constant error that wouldn't be the problem, but sensor readings vary from 1 to 12 degrees on errors (12 degrees up north to 1 or less on south-west). \$\endgroup\$ – dejan Sep 6 '16 at 14:50
  • \$\begingroup\$ Local magnetic fields can vary greatly do to pieces of iron in the environment. Especially indoors. Try taking it to an area free of iron... A field perhaps. \$\endgroup\$ – George Herold Sep 6 '16 at 15:15
  • \$\begingroup\$ That's exactly how I performed measurement, outdoor, on the field, and made sure no nearby magnetic disturbances existed. Some people say that nonlinearity of the sensor is the problem, but I don't know how to do that, and incorporate that in the code. \$\endgroup\$ – dejan Sep 6 '16 at 15:19
  • 1
    \$\begingroup\$ @Jogitech No, only low current wiring. It turns out that the IMU used is not precise enough for such type of navigation. \$\endgroup\$ – dejan Nov 11 '17 at 19:56
0
\$\begingroup\$

May be the magnetometer is influenced by iron or steel parts nearby. The compass of large steel ships was compensated against the influence of the steel hull. There were flag signals given: I am regulating my compass.

\$\endgroup\$
  • \$\begingroup\$ It is not the case. I've put the sensor far enough from all objects that can interact with magnetic field. Again, there are nonlinear errors, from 1 to 12 degrees in yaw. I was said that maybe I should do the nonlinearity test (circle the sensor in 1 degree until full circle), thus I get some data that can be approximated, but I don't know how to use such results. \$\endgroup\$ – dejan Sep 6 '16 at 13:07
  • \$\begingroup\$ @dejan current-carrying wires (for example - to motors) influence magnetometer too. A circular-path test setup shows ellipses instead of circles. Not much current is required to upset the expected circles. \$\endgroup\$ – glen_geek Nov 5 '16 at 16:49

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.