Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to add tilt compensation feature on magnetometer without using another sensor? #6

Open
ActionNerd opened this issue Feb 4, 2015 · 1 comment
Assignees
Labels

Comments

@ActionNerd
Copy link
Collaborator

Magnetometer (compass) skews when tilted out of the XY plane. Investigate if it is practical to try to implement a tilt-compensation feature.

From ST Micro paper on tilt:

Some microcontrollers may not support floating point operation and are timing critical. In
order to build a standalone tilt compensated electronic compass, the following
recommendations may be helpful:
● Use look-up tables for sin, cos, arcsin, and arctan functions to reduce clock cycles
● Use assembly code to implement signed integer multiplication and division subroutines
to reduce clock cycles
● If some sensor calibration parameters are very small, the user can multiply the whole
accelerometer and magnetic sensor calibration parameter matrix with a big constant
integer, then divide it before the pitch/roll/heading calculation
● Use internal EEPROM to save sensor calibration parameters
● Implement some kind of digital filtering or simple moving average function onto the
sensor raw measurements to reduce the noise level and improve the pitch/roll/heading
accuracy

Pololu Github repo on tilt compensation for this sensor controlled with a ATMega chip is here.

@ActionNerd ActionNerd self-assigned this Feb 4, 2015
@praneshkmr
Copy link
Owner

Hi @ActionNerd , any updates on this issue? Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants