#include <SmoothDerivative.h>
Classes | |
| struct | MiddleSteps |
Public Member Functions | |
| bool | Initialize (std::vector< double > xA, std::vector< double > smoothingA, double frequencyA) |
| Initialize the class with input data. | |
| void | OnExecute (std::vector< double > xA, std::vector< double > &xDotA) |
| OnExecute should be called in the timing loop. [iL]It will compute the first derivative estimate based on the input data and return it in xDotA. Make sure both arrays are the same size. | |
| SmoothDerivative () | |
| Constructor. | |
| SmoothDerivative (std::vector< double > xA, std::vector< double > smoothingA, double frequencyA) | |
| Constructor. | |
| virtual | ~SmoothDerivative () |
| Destructor. | |
Public Attributes | |
| bool | isInitialized |
Protected Attributes | |
| double | m_freq |
| unsigned int | m_size |
| std::vector< double > | m_smoothing |
| std::vector< MiddleSteps > | xDotCalc |
Definition at line 8 of file SmoothDerivative.h.
Constructor.
Definition at line 30 of file SmoothDerivative.cpp.
| SmoothDerivative::SmoothDerivative | ( | std::vector< double > | xA, |
| std::vector< double > | smoothingA, | ||
| double | frequencyA | ||
| ) |
Constructor.
| xA | an array of doubles with initial signal values |
| smoothingA | an array of doubles ranging from 0.0->1.0 where 0 is no smoothing and 1.0 is a straight line |
| frequencyA | frequency in Hz that the OnExecute routine will be called |
| toleranceA | tolerance value for when two values are the same. Default 1.0e-6 |
Definition at line 47 of file SmoothDerivative.cpp.
| SmoothDerivative::~SmoothDerivative | ( | ) | [virtual] |
Destructor.
Definition at line 59 of file SmoothDerivative.cpp.
| bool SmoothDerivative::Initialize | ( | std::vector< double > | xA, |
| std::vector< double > | smoothingA, | ||
| double | frequencyA | ||
| ) |
Initialize the class with input data.
| xA | an array of doubles with initial signal values |
| smoothingA | an array of doubles ranging from 0.0->1.0 where 0 is no smoothing and 1.0 is a straight line |
| frequencyA | frequency in Hz that the OnExecute routine will be called |
| toleranceA | tolerance value for when two values are the same. Default 1.0e-6 |
Definition at line 75 of file SmoothDerivative.cpp.
| void SmoothDerivative::OnExecute | ( | std::vector< double > | xA, |
| std::vector< double > & | xDotA | ||
| ) |
OnExecute should be called in the timing loop. [iL]It will compute the first derivative estimate based on the input data and return it in xDotA. Make sure both arrays are the same size.
| xA | an array of doubles with signal values |
| xDotA | an array of doubles first derivative estimate of xA (output) |
Definition at line 121 of file SmoothDerivative.cpp.
Definition at line 16 of file SmoothDerivative.h.
double SmoothDerivative::m_freq [protected] |
Definition at line 40 of file SmoothDerivative.h.
unsigned int SmoothDerivative::m_size [protected] |
Definition at line 39 of file SmoothDerivative.h.
std::vector<double> SmoothDerivative::m_smoothing [protected] |
Definition at line 41 of file SmoothDerivative.h.
std::vector<MiddleSteps> SmoothDerivative::xDotCalc [protected] |
Definition at line 37 of file SmoothDerivative.h.