Bioscara
DALSA's DIY SCARA Robot Arm.
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
bioscara_joint_firmware::MovMax Class Reference

Simple FIR moving maximum filter. More...

#include <filters.h>

Public Member Functions

 MovMax (float windowSize)
 Constucts and initializes the MovMax filter.
 
float updateState (float u)
 Update and return the filter state.
 

Protected Attributes

unsigned int M = 200
 Window Size.
 
float * cb_data
 Pointer to ring buffer holding the data.
 
unsigned int cb_index
 Current ringbuffer index.
 

Detailed Description

Simple FIR moving maximum filter.

Implements a circular ringbuffer holding the sampled data over the window size M

Constructor & Destructor Documentation

◆ MovMax()

bioscara_joint_firmware::MovMax::MovMax ( float  windowSize)
inline

Constucts and initializes the MovMax filter.

Allocates a ring buffer cb_data of size M.

Parameters
windowSizethe window size

Member Function Documentation

◆ updateState()

float bioscara_joint_firmware::MovMax::updateState ( float  u)
inline

Update and return the filter state.

Returns
The updated filter state

Member Data Documentation

◆ cb_data

float* bioscara_joint_firmware::MovMax::cb_data
protected

Pointer to ring buffer holding the data.

◆ cb_index

unsigned int bioscara_joint_firmware::MovMax::cb_index
protected

Current ringbuffer index.

◆ M

unsigned int bioscara_joint_firmware::MovMax::M = 200
protected

Window Size.


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