Reading a little into the C code for the accelerometer i wonder if the method 'filtered_xyz()' does work as expected. Surely, the method name does suggest some sort of filtering. It seems that the C code should return a filtered result over the last four calls to this method. Instead it does return the pure sum of the last four calls to this method.
Dividing the result of this method by 4 (the intended filter depth in the C code: FILT_DEPTH) makes the method result a little more comparable to the pure axis readouts. Then the values are in the usual range of -32 to 31.
Of course i could file a bug report for this, but maybe i do simply miss the real use for this method
Accelerometer filtered values
Re: Accelerometer filtered values
This could be considered more of a documentation issue than a software bug. This kind of average is a legitimate way to increase the precision of a measurement; it is also a very simple (though somewhat crude) way to implement a low-pass filter. Of course the sum could be immediately scaled down to the same range as the original inputs, but any precision gained in the sum is lost unless the new average is converted to a float. Just as easy to keep it as an integer, but note the larger scale.
-Bryan
-Bryan