I've wrote a code to calculate smartphone orientation.
You can see it on the following link(How can I fix few issues(drifting, incorrect movement, error after shaking device) with smartphone IMU unit?)
(If you can answer that question I would appreciate it.)
Anyways now I'm trying at least take care of error occurring after I shake device.
I.E. I leave a phone still on the table. Angles shows 0 degrees in all directions. After I shake the device and return in the same position, degrees are like in random place.
Sometimes its 83.123, -273.234, 150.123, sometimes its more extreme.
I thought it was due to linear acceleration, so now I am receiving filtered gravity from device.(android api)
Now I'm thinking it occurs because g goes over 1 when I shake device. But I'm not sure if its correct and how to implement it.
Any ideas?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…