Hello, I am new here. First of all I would like to thank Jeff for the great library!
I am using the DMP on an automated foiling sailboat. That means the boat is flying above the water on regulated fins and uses the MPU6050 and an Arduino to autostabilize in horizontal position.
Jeffs code worked pretty much flawless for me right away from the beginning, with one exception: after stronger movements - like after hitting a wave or a wind gust, when the boat rolls by 10 degrees, shakes a bit and comes back to horizontal - the 0-level of the ypr output is offset by a little bit - in the range of 0.1 - 0.2 degrees. Over the course of a longer race this can sum up to several degrees. This means, when the boat tries to stabilize on 0-level, it starts to lean more and more to the side. The stronger the shaking and turning, the bigger the offset will be.
This is reproduceable on my office table: I put the 6050 on the surface and level it to 0, pick it up, swing it and when I put it back, the reading says 0.1. If I do it again, the reading might say 0.25.
Am I doing something wrong? Is this simply the limited precision of the device? Or is this a known problem and is there a solution for it?
Also I notice, when I have the 6050 resting in an odd angle, after a while it starts re-centering. So resting it at 45 degrees will result in a 0.1 degree reading after an hour or so.
Both effects seem to account for some kind of permanent recalibration. Is this possible or what am I doing wrong?
thank you and kind regards,