- #1
erickulcyk
- 8
- 0
Hello, I have an Ocean server 4000 compass/accelerometer, and I am trying to use it to gauge the position of a robot on which it is placed. I get Ax, Ay, Az, pitch, roll, and heading as the output currently. I also have the accelerometer set to do a moving average of 16 readings. I did a simple experiment where I moved the robot forward in roughly the direction and stopped it. When I calculate the velocity straight from the Ax readings, the velocity doesn't end at 0 like it should (I brought the robot to stop for several seconds at the end). Furthermore the resting Ax at the start is different then at the end. The pitch has also changed though. In fact, the Ax values followed the pitch very well. I think there must be a relation to get the true x value given the two. I have tried Ax-pitch, Ax+pitch, Ax-sin(pitch), Ax+sin(pitch), √(Ax^2-sin(pitch)^2), however non of these gives me a velocity of close to 0 at the end. Can you help me out?
Thanks,
Eric
Thanks,
Eric