Implemented first Hangar-Service

Dependencies:   CalibrateMagneto QuaternionMath

Fork of SML2 by TobyRich GmbH

Embed: (wiki syntax)

« Back to documentation index

LowPassFilter Class Reference

LowPassFilter Class Reference

Low-pass filters an incoming stream of numbers. More...

#include <Filter.h>

Public Member Functions

 LowPassFilter (float const a)
 Construct the filter with given coefficient.
float filter (float const x)
 Main processing function, passes given value to filter and returns the filter's output.
void reset ()
 Resets the internal state of the filter. Use to start filtering a new stream.

Detailed Description

Low-pass filters an incoming stream of numbers.

Implements a 1st-order IIR low-pass filter. The coefficient can be used to specify how much to filter.

Definition at line 9 of file Filter.h.


Constructor & Destructor Documentation

LowPassFilter ( float const   a )

Construct the filter with given coefficient.

Parameters:
afilter coefficient (0.0 to 1.0), higher values result in more filtering.

Definition at line 18 of file Filter.h.


Member Function Documentation

float filter ( float const   x )

Main processing function, passes given value to filter and returns the filter's output.

Call repeatedly to filter an incoming stream of numbers.

Parameters:
xone value to send to filter as input
Returns:
filtered output

Definition at line 24 of file Filter.h.

void reset (  )

Resets the internal state of the filter. Use to start filtering a new stream.

Definition at line 30 of file Filter.h.