4

When reading about magnetometer / magnetic field / "compass" sensors it is often said that sensor tilt compensation e.g. by using an accelerometer is required in order to get correct measurements. (Note that I am not talking about hard iron and soft iron effects here.) All these sources make use of the two-dimensional compass for clarification which, when tilted, would not work.

When using a 3D magnetometer (e.g. HMC5883L), my understanding is that they provide a 3D vector pointing in (or along) the direction of the strongest magnetic field, which - in case of the earth - should be towards magnetic north.

I was under the impression that I could use the cross product of a gravity vector measured by an accelerometer and the magnetometer "north" vector to get all axes required for determining a reference frame and from that, local orientation.

Then, what is tilt compensation and why would it be required?

sunside
  • 8,069
  • 9
  • 51
  • 74
  • 1
    Does the reply at the bottom help? http://forum.arduino.cc/index.php?topic=152529.0;wap2 – hookenz Nov 28 '13 at 22:20
  • I'm not sure this question is on topic. – hookenz Nov 28 '13 at 22:21
  • In how far not "on topic"? Thanks for the link, the answer supports my understanding (including declination correction) ... still though, what's the idea behind the tilt compensation approach for a 3D sensor? People seem to like it, so there must be a reason. – sunside Nov 28 '13 at 22:29
  • 2
    This question appears to be off-topic because it is not about programming – ravenspoint Nov 28 '13 at 22:38
  • It is about algorithms. But, okay ... I could post it on Robotics - is there a way to move the question? – sunside Nov 28 '13 at 22:46
  • Yeah more of a what is tilt compensation rather than, what is wrong with my tilt compensation code. – hookenz Nov 29 '13 at 01:01
  • I agree. Supporting the close vote. – sunside Nov 29 '13 at 04:24

1 Answers1

1

Before the question is going to be closed, in the comments Matt gave me a pointer to a discussion that helped answering the question.

It states that with 3D devices, tilt compensation is not per se required for making sense of the sensor data. What's more important though, it gave the crucial insight that the perception of the earth's magnetic field is wrong when assuming that it runs perpendicular to the earth (i.e. sensor's 3D vector somehow pointing towards north pole) as quite a lot graphics show it, when it actually enters earth at an angle at any point exluding the equator.

Community
  • 1
  • 1
sunside
  • 8,069
  • 9
  • 51
  • 74