3

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.
yode
  • 31
  • 2
  • 1
    Ahh silly question: Are you compensating for the difference between magnetic and geographic north. http://www1.appstate.edu/~goodmanj/4401/notes/magnets/mnvsgn.html – George Herold Sep 06 '16 at 14:14
  • 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). – yode Sep 06 '16 at 14:50
  • 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. – George Herold Sep 06 '16 at 15:15
  • 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. – yode Sep 06 '16 at 15:19
  • Did you go on to read the [Tutorial](https://github.com/ptrbrtz/razor-9dof-ahrs/wiki/Tutorial)? – Andrew Morton Nov 05 '16 at 17:46
  • You need to determine if the issue is with the sensor or with the interpreting code. Likely you should study the code in detail and look for things like rounding errors or truncations, logic flaws, etc. – Chris Stratton Feb 11 '17 at 17:14
  • any wiring in close proximity carrying high current? – Jogitech Nov 08 '17 at 20:23
  • 1
    @Jogitech No, only low current wiring. It turns out that the IMU used is not precise enough for such type of navigation. – yode Nov 11 '17 at 19:56

1 Answers1

1

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.

Uwe
  • 1,602
  • 7
  • 6
  • 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. – yode Sep 06 '16 at 13:07
  • @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. – glen_geek Nov 05 '16 at 16:49