Mostly as a understanding/learning exercise I am coding a DCM in Python based on the write up of the ArduIMU. My 'sensor' is a Wii Nunchuck with a Motion+ mounted inside the Nunchuck, interfaced to a PC via I2C.
The bit that I am having brain trouble with is the 'correction' of pitch/roll using the gravity vector. Hopefully someone here will be able to point me in the correct direction.
1). Does the gravity vector totally describe the pitch/roll(/yaw?) angles, assuming the sensor is not accelerating in any direction?
2). If you take the angle(s) between the gravity vector and a plane (X, Y, Z) you can infer roll and pitch if the sensor is only rolled or pitched. How do you calculate if the sensor is rolled AND pitched at the same time?
3). Given that my sensor is not augmented with GPS, does it seem possible to correct the yaw if there is sufficient 'gravity vector' in the yaw angle - for example if the sensor was pitched 45' downwards?