I have some accelerometers hanging from strings. I would like to be able to compute the position of the string from the accelerometer reading.
What I think I need to do is:
- Compute a transform from the accelerometer at rest in order to normalize my sensor. I will have gravity so I should be able to know where the z-axis is.
- Move the string in a known direction to set x and y.
- Read the sensor and apply the transform to factor out the steady-state reading.
- Subtract out the effect of gravity.
- Integrate to get a position.
Is the integration necessary for position? I know that one side is fixed. I should be able to use the magnitude of gravity to determine where the string is if the string is held at a position with some trigonometry, right?
I realize that this a solved problem, but I'm not sure what it falls into. There are some transforms between coordinate systems, robotics, and also probably some physics.
held at a position
I mean that the string pulled so that it is still taught. $\endgroup$position
: who's position? The sensor itself? The upper end of the string keeping the sensor? The cart holding the entire setup? Relative to what? To the horizontal string / bar? To the cart? To the walls? Please remember thatacceleration
is not directly linked toposition
, it must go throughspeed
. How will you handle all the errors? Note that some errors might be small in absolute values, but their effects will add-up as the time passes, to become prohibitively big. What is the required precision of the end calculation? $\endgroup$compute a transform
? Do you need the position in orthogonal coordinates, or in polar coordinates? Again, relative to what? :) $\endgroup$