PosturePerfection
Public Member Functions
IIR::IIRFilter Class Reference

An IIR filter that can be initialised with SOS coefficients. More...

#include <iir.h>

Public Member Functions

 IIRFilter (SmoothingSettings smoothing_settings)
 Construct a new IIRFilter object. More...
 
void set (float x)
 Set all data in the filter to the given value. More...
 
float run (float x)
 Apply the filter to the next data sample, x More...
 

Detailed Description

An IIR filter that can be initialised with SOS coefficients.

This class is intended to be used with SOS coefficients as generated by the SciPy functions referenced here: https://docs.scipy.org/doc/scipy/reference/signal.html#matlab-style-iir-filter-design.

The filter can be disabled by passing no coefficients to the constructor.

Constructor & Destructor Documentation

◆ IIRFilter()

IIR::IIRFilter::IIRFilter ( SmoothingSettings  smoothing_settings)
explicit

Construct a new IIRFilter object.

Passing empty SmoothingSettings disables the IIR filter.

Parameters
smoothing_settingsSmoothingSettings structure containing the SOS coefficients for the IIR filter

Member Function Documentation

◆ run()

float IIR::IIRFilter::run ( float  x)

Apply the filter to the next data sample, x

Every call to this method constitutes a time step in the IIR filter

Parameters
xThe next data sample
Returns
float Filtered data sample

◆ set()

void IIR::IIRFilter::set ( float  x)

Set all data in the filter to the given value.

Parameters
xfloat Value to overwrite filter content

The documentation for this class was generated from the following files: