jAER project on SourceForge

net.sf.jaer.util.filter
Class LowpassFilter

java.lang.Object
  extended by net.sf.jaer.util.filter.Filter
      extended by net.sf.jaer.util.filter.LowpassFilter
Direct Known Subclasses:
AngularLowpassFilter

public class LowpassFilter
extends Filter

A first-order lowpass IIR filter. The first value filtered initializes the filter to the value and stores the first time as reference.


Field Summary
protected  float lastVal
          The last value
protected  float lpVal
          The current state of the filter
 
Fields inherited from class net.sf.jaer.util.filter.Filter
initialized, lastTime, tauMs, TICK_PER_MS
 
Constructor Summary
LowpassFilter()
           
 
Method Summary
 float filter(float val, int time)
          apply the filter.
 float getValue()
           
 void setInternalValue(float value)
          Sets the internral value; used to initialize filter
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jaer.util.filter.Filter
get3dBFreqHz, getLastTime, getTauMs, set3dBFreqHz, setTauMs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lpVal

protected float lpVal
The current state of the filter


lastVal

protected float lastVal
The last value

Constructor Detail

LowpassFilter

public LowpassFilter()
Method Detail

filter

public float filter(float val,
                    int time)
Description copied from class: Filter
apply the filter.

Parameters:
val - the new input value
time - the time in us - note units here, microseconds!
Returns:
the new filter output value

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setInternalValue

public void setInternalValue(float value)
Sets the internral value; used to initialize filter

Parameters:
value - the value

getValue

public float getValue()
Returns:
output of filter

jAER project on SourceForge