When diving into the field of attitude detection from sensor readings a couple of answers seem omnipresent:
- You need an accelerometer and a magnetometer.
- You need to tilt compensate.
- You need to low-pass filter.
- Or use the complimentary filter.
- Or better still, use the mystical Kalman filter (but it’s too complicated to explain).
Starting from the above and having an accelerometer and a magnetometer at hand, the old question a wise man once asked is:
To tilt compensate, or not to tilt compensate, that is the question—
Whether ’tis Nobler in the mind to suffer
The Slings and Arrows of outrageous StackOverflow answers,
Or to take Arms against a Sea of troubles,
And by using the attitude matrix, end them? To tilt: to roll.
In other words: Is tilt compensation required? Weiterlesen »