Go Down

### Topic: Incorrect readings if mag tilted [True?] (Read 509 times)previous topic - next topic

#### freak174

##### Apr 01, 2013, 10:30 pm
Hello dear members,

Is it true that a 3 axis magnetometer outputs the wrong values if you tilt the sensor, and the more you tilt it the worse it gets?

The reason of why Im asking this is because Im in need of a correct yaw value, since the gyroscope doesn't output the correct value. So the question is if I need to combine a magnetometer with a gyroscope to read the correct yaw value.

Any help would be appreciated, especially links with equations to solve this problem.

Cheers

#### Erdin

#1
##### Apr 02, 2013, 02:17 am
Yes, it's true.
Many pages have been written about it. A tilt compensated compass is what you need.

It is because the direction of the magnetism is not pointing to the horizon, but it could be pointing down into the ground with 60 degrees.
Click on this map on your location.
http://www.geomag.bgs.ac.uk/data_service/models_compass/wmm_calc.html
The "Inclination" is how much it is pointing down. 0 degrees is to the horizon, 90 degrees is straight down. If the number is negative it is pointing up.

https://www.loveelectronics.co.uk/Tutorials/13/tilt-compensated-compass-arduino-tutorial
http://arduino.cc/forum/index.php/topic,152529.0.html

#### freak174

#2
##### Apr 02, 2013, 03:14 pmLast Edit: Apr 02, 2013, 04:32 pm by freak174 Reason: 1
Hello dear Erdin,

The negative part with the algorithm provided by loveelectronics is that you are limited to 45 degrees tilt.
Would quaternion support a tilt upto 360 degrees?

Cheers

Edit:
Isn't it just possibly to combine a gyroscope with a magnetometer instead of an accelerometer?

#### Erdin

#3
##### Apr 02, 2013, 05:32 pm
I have little understanding of quaternion, but that should be able to handle 360 all around.
I have not heard of a gyro and magnetometer combination. The gyro MEMS sensors drift, so you would never know what is up and what is down.

In Europe the inclination is about 65 degrees down into the ground. Once I knew that, it really opened my eyes to understand the values of the magnetometer.

Go Up

Please enter a valid email to subscribe