First of all, I only have accelerometer to solve this problem.
I have tilted accelerometer mounted in a vehicle, and I like to get the output values of this accelerometer
as if this accelerometer is mounted in level (flat).
For example, each axis’s output values of level accelerometer would be as below. (ignored small errors)
[Flat] X = 0, Y = 0, Z = 1 (stationary)
But when the accelerometer is tilted which is in my case, the output values would be,
[Tilt] X = +0.4, Y = -0.3, Z = +0.85 (stationary)
Values of above are when the vehicle is stationary.
And let’s say the vehicle has accelerated. (0 -> 20 miles/h forward)
For the level accelerometer, the output values of X or Y will be changed (value of Z would not change)
[Flat] X = 0.5, Y = 0, Z = 1 or (0 -> 20 miles/h forward)
[Flat] X = 0, Y = 0.5, Z = 1 etc.. (0 -> 20 miles/h forward)
And for the tilted acceleromter in same situation, (20 miles/h forward)
it would be like below,
[Tilt] X = 0.98, Y = -0.2, Z = +0.6 (0 -> 20 miles/h forward)
values could be little different.
I mean, all the values of 3 axes will change.
And in this situation, what I would like to do is,
I would like to get the values of [Tilt] as [Flat].
I mean I would like to convert the output of
[Tilt] X = 0.98, Y = -0.2, Z = +0.6 (0 -> 20 miles/h forward)
to
[Flat] X = 0.5, Y = 0, Z = 1 (0 -> 20 miles/h forward)
I want convert every value of [Tilt] to [Flat].
To achieve my goal, what kind of calculation is needed?
I know simple addition and subtraction is not the answer for this.
I heard that “Translation Matrix” and “quaternion” is useful for this case,
I feel difficult to apply in this case. Please teach me how to apply if it is the answer.
Somewhat errors would be OK as long as if I can get rough answer.
Thank you for reading my question.
I can provide more information if more details needed.