I’ve done a quick hunt for any physical / electronic scaling differences shown in my previous post.
3 passive test runs show that each sensor reads ≈1g when their axis is pointing downwards; so the sensors aren’t operating on different scales.
Next, most likely cause is integrating sensor outputs and the effect of propeller noise. The following graph is from the same flight that showed the scale differences.
It’s not a great surprise that the Z-axis noise is smaller than X- and Y-axes. After all, the props spin horizontally. Perhaps reducing the X- and Y-axis noise levels physically might help? The sensor board is already separated from the Raspberry Pi by some noise suppression standoffs (i.e. rubber posts), but they are rather stiff. I don’t have anything to hand to try for the moment so I’ll just have to leave it on my ‘to do’ list.
Regardless propeller noise should be symmetrical. So integrating it to produce speed values shouldn’t lead to any scaling discrepancies between horizontal and vertical. Certainly not to the scale they are seen.
Perhaps there’s some aliasing between sampling, filter and noise frequencies meaning the noise is being included in the horizontal speed calculations. That could lead to a fixed offset but you’d expect it to vary per run. But this factor of 20 appears to be the same each time.
I could filter out the noise by reducing dlpf from 20Hz to 10 or 5. A “higher resolution” plot of the same x-axis accelerometer data for 1s shows 31Hz as the main noise component. There’s no signs of aliasing, and there are several samples per cycle so again, this noise shouldn’t be the problem.
The accelerometer resolution is set to ±2g (the highest resolution), with 16bit output meaning each bit increment represents about 0.6mms-2 (0.0006ms-2) which is more than high enough. There’s clearly no signs of aliasing in the plot.
Which leaves only my code as the cause for this scaling, though I’ve been over it with a fine-toothed comb several times to no avail. I think for the moment I’m going to have to just let it lie, and instead get myself back to drift control.