Pyrogenesis  trunk
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Controller Class Reference

regulate IIR gain for rapid but smooth tracking of a function. More...

Public Member Functions

 Controller (double initialValue)
 
int ComputeBias (double smoothedValue, double value)
 

Private Member Functions

bool WasOnSameSide (double value) const
 
bool WasSpike () const
 

Static Private Member Functions

static double Change (double from, double to)
 

Private Attributes

double m_history [m_historySize]
 
int m_timesOnSameSide
 

Static Private Attributes

static const size_t m_historySize = 3
 

Detailed Description

regulate IIR gain for rapid but smooth tracking of a function.

this is similar in principle to a PID controller but is tuned for the special case of FPS values to simplify stabilizing the filter.

Constructor & Destructor Documentation

Controller::Controller ( double  initialValue)
inline

Member Function Documentation

static double Controller::Change ( double  from,
double  to 
)
inlinestaticprivate
int Controller::ComputeBias ( double  smoothedValue,
double  value 
)
inline
bool Controller::WasOnSameSide ( double  value) const
inlineprivate
bool Controller::WasSpike ( ) const
inlineprivate

Member Data Documentation

double Controller::m_history[m_historySize]
private
const size_t Controller::m_historySize = 3
staticprivate
int Controller::m_timesOnSameSide
private

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