I'm currently working on device that uses always-on 3D accelerometer(using scale +-2g) and 3D gyroscope(using scale +-250g) -sensor.
I can read every possible vector (X,Y,Z) and their acceleration (g's) and angular rate (dps) and also the angle where the device currently is. But my problem is that when the device is on tilt (0g when no tilt) the acceleration is between (downward) 0g->-1g or between (upwards) 0g-> 1g depending on what angle the device currently is. Below is picture that hopefully clears the idea.
The device will located in a car and should measure acceleration when car is slowing down (brake) . However if the device is already on tilt the accelerometer will measure some acceleration that tilt causes which makes it hard to tell if the device has truly some acceleration or is it just the tilt that causing the acceleration.
X and Y -Axis produce 0g and the Z axis is 1g when device has no tilt and is on flat surface. The tilt causes the reading of X axis to go towards 1g if tilting is towards up and to -1g when downwards. The +-1g is reached when the device is on 90* degree from original position
I have been thinking my head off how to eliminate that acceleration that tilt causes and only measure the real acceleration of the device but just can't think way out from this problem with the following data that i can produce.
Basically i think that if i could only measure the X axis acceleration (picture) even if the sensor is in tilt like in picture.
Hopefully this message isn't too hard too understand because of my english skills and the way I'm trying to explain my problem.