Smooth g RC Filter g Low Pass

Applies a RC Low Pass filter using the following formula: 

Yout,i  =  Alpha * Yin,i + (1 - Alpha) * Yout,i-1 

Alpha = DT / (RC + DT)

DT = Xi - Xi-1

Smooth g RC Filter g High Pass

Applies a RC High Pass filter using the following formula: 

Yout,i  =  Alpha * Yout,i-1 + Alpha * (Yin,i - Yin,i-1)

Alpha = RC / (RC + DT)

DT = Xi - Xi-1

 

For both filters you only have to specify the RC factor. Alpha is calculated for each datapoint separately, using the X-distance of the current datapoint to the previous datapoint. For a correct sample frequency calculation X needs to be in seconds (X=6 means t = 6 seconds).