chrono::utils::ChRunningAverage Class Reference

Description

Moving average filter for smoothing running data.

#include <ChFilters.h>

Public Member Functions

 ChRunningAverage (int n)
 Construct a running moving average filter (backward). More...
 
double Add (double val)
 Insert the specified value and return the current moving average.
 

Constructor & Destructor Documentation

chrono::utils::ChRunningAverage::ChRunningAverage ( int  n)

Construct a running moving average filter (backward).

The filter only uses previous data (as specified by the filter span)

Parameters
nfilter span