I am working on a project that is challenging me. I've researched on the subject as best I can, but would like additional opinions.
I have a 4' long aluminum c-channel (essentially, a metal rod) with a 9DOF sensor on the end of it (FXOS8700 + FXAS21002, accel & mag + gyro). The sensor is under constant acceleration as it rotates in a circle of radius 4'. This "rod" rests on a small castor wheel that lets it move along the ground. The base that the rod is fixed to does not move laterally. Thus, the sensor moves in a 4' circle, and rises and falls with changes in elevation.
Here is our goal: to measure the pitch of the sensor as it moves at regular intervals
First of all, because the sensor is under constant acceleration, am I correct in understanding that the equation of pitch using arctan (used for static applications) will not be correct?
I believe we need to use an IMU in this case. I have tried using the the Mahony and a Kalman filter (written for our particular sensor, based on NXP's Sensor Fusion algorithm, but is not hardware-dependent like NXP's algorithm is).
Both algorithms are 9DOF, incorporating all three sensors. However, I am wondering if this isn't a good idea for us. When we used the same sensor to get the yaw, our results tended to vary terribly. I attributed this to soft-iron errors from fluctuating magnetic fields. The algorithms would function better when we calibrated (using MotionCal software) for hard and soft iron errors, but as soon as we moved the system elsewhere we would get terrible accuracy problems. So my thought is to ignore input from the magnetometer, since we aren't looking to get a heading, just a pitch.
Now, would this mean using a 6DOF algorithm instead, if we wanted to ignore our magnetometer? I am not sure that it's possible to tell either algorithm to "ignore" the magnetometer.
I am also aware about drift error from the gyro. I have tried following the instructions from this post: AHRS algorithm under continuous linear accelerations by taking several readings from the gyro for a few seconds before each run, and then averaging them and subtracting them from subsequent readings.
Here is our problem at the moment: when we read the pitch from either algorithm, even with the sensor not rotating in a circle, the values are constantly falling. They will fall to zero, and then wrap around. Occasionally, they seem to be stable, and respond very quickly and accurately to changes in actual sensor pitch, but other times, they simply fall without stopping.
Other members of my team believe that I am way over complicating things, and all we really need is the y-component of the accelerations. But I believe that we are not looking for accelerations due to gravity exactly, but rather a dynamic pitch, which is complicated slightly by a radial acceleration.
Am I incorrect in my line of thinking somewhere? If so, please correct me.