How to implement a LowPass Filter for the accelerometer?

I'm trying to implement a low pass filter for all 3 axis of the accelerometer. For the moment I'm just trying to do it for the z-axis, however with very little success. Here is the Builder sequence I use:

To make it work I had to add this transformation to z_ before transforming it to a float:

z_=z_>0?(short)(-z_+Short.MAX_VALUE):(short)(-z_-Short.MAX_VALUE);

What is the correct way to interpret the output data from the filter? Am I doing something wrong in the interpretation of the output data or is this a bug? I would like to chain the low pass filter with other filters but now I'm not sure if I can trust the output of the low pass filter to be correct. The above read out works fine for a math filter for example without the sign transformation.

As mentioned earlier I would like to apply the lowpass filter to the three axis of the accelerometer simultaneously to than pass it to the RMS filter. Now I did realise however that the input size for the low pass filter is limited to 4 bytes. Is it at all possible to pass the three axis simultaneously to a low pass filter?

What I'm trying to do here is accumulating low frequency movements with the following chain:

LowPassFilter (Accelerometer) > get rid of high frequency movements

RMS > get amount of instantaneous low frequency movement

Accumulate > get accumulated low frequency movement

TimeDelay > notify or store on device (10 min)

It's essential to have the low pass filter before the RMS so the high frequency oscillations cancel out.

At the moment I'm doing it on the raw accelerometer data on the phone. This is working fine. Would however be nice to be phone independent. I was considering doing separate chains for each accelerometer axis. Form what I understand from the API this should be possible. However I suppose I'm getting close to the computational capacity of the sensors processor. Besides the updated frequency, I'm not sure how to handle the high numbers I get from the accumulator filter with just two bytes. Any suggestions are welcomed.

Mm, unfortunately I don't think we can do what you want solely on the firmware at this time. I'll ping the firmware dev again about enhancements to the low pass filter, possibly making it more like the RMS filter, in its ability to perform a computation on an array of inputs.