So I can't really wrap my head around this problem.
I have an Inertial Measurement Unit (IMU consisting of an accelerometer and a gyroscope) mounted to a stick which can rotate from a fixed position in the ground with a motor (see picture).
The length of the stick is unknown and through rotations of the motor (the motor has an encoder to measure the angle and speed and acceleration) I want to determine the distance from the rotational joint to the IMU.
I could just make a sufficient arc and calculate with the angle the radius, but that is error prone if you have a bad IMU due to double integration to get the distance, right?
Is there a way by measuring the gravity vectors at certain static positions and calculating a radial vector through that? Would it help if there is also an IMU at the bottom of the stick at the rotational joint?