I am trying to use the phidget spatial 3/3/3 as a position sensor for a mobile robot.
The way I am doing is by integrating twice the acceleration. THe formulas I have for calculating position are (1 means the axis):
v = vo + a1t
x = x0 + v + (a*t*t/2)
But the error grows unbounded really fast. I am working with a rate of 0.032 s. Also, sometimes I get some negative velocities (which is not suppose to happen). I know that the error is cummulative, but how can I get the best of this sensor in a sample of, let´s say, 10 seconds? How precise am I going to be?
I need to get the best position I can from the sensor. I am working in c#