It turns out that I had forgotten to convert from degrees to radians, and that made a significant difference. My angular data is maintaining precision at a level that I would expect. My positional data, on the other hand, quickly becomes unusable due to the slight angular error that causes the gravity vector to become misaligned and no longer accounted for. A little constant acceleration quickly becomes a large velocity and a very wrong position. This is where a Kalman filter would be helpful, perhaps. I could also probably look into measuring the total acceleration magnitude, and when it is about equal to Earth's gravity, assume the device is sitting still and recalibrate, which might help some, particularly when the device isn't moving much, like sitting on a table.

- Josh Leverette's blog
- Login to post comments
- 62913 reads