Nothing new to see here, but I thought I’d show you more detail of the problem I’m trying to resolve.
The graphs below shows the distances travelled in the X, Y, and Z axes over a flight – derived from accelerometer readings; the top graph transformed to earth axes, the lower one direct from the accelerometer axes.
The Z axes are a pretty close match (take-off to 1m, hover and descend), but the X and Y differ significantly; given that Phoebe was close to horizontal, they too should be a close match.
The earth axes version shows horizontal drift under a meter in the X and Y directions. In contrast, the direct sensor reads show a drift between 4 and 8 meters in the X and Y directions.
In reality, there was a drift of about 8m total in all, suggesting the sensors are working correctly, but that faulty matrix conversion is suppressing this somehow.
Now I’d be happy to tweak the matrix to correct this – the change is simply swapping a couple of minus signs around; except I have a strong belief the matrix in use is correct in that when Phoebe is stationary but on a tilt on the ground, the earth axis readings are 0, 0, ~1) g clearly showing the only force in place is gravity in the earth z axis. I’ve tested this with her at up to 30° of tilt and it works beautifully.
And yet, it is almost certainly this same matrix conversion which makes the huge drift imperceptible in the earth axes, and the last but most frustrating bane of my life. You wouldn’t believe the numbers of sheets of paper littered around my desk with diagrams of vectors and angles trying to prove which is the correct implementations.
I’m on hold again waiting for some spare parts (new case for the Raspberry Pi) which I’m expecting Wednesday – once rebuilt my plan will be to actually just try the revised matrices, and see if any give better results than shown above.
Once more, fingers crossed.