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::Controller ( double  initialValue)

Member Function Documentation

◆ Change()

static double Controller::Change ( double  from,
double  to 

◆ ComputeBias()

int Controller::ComputeBias ( double  smoothedValue,
double  value 

◆ WasOnSameSide()

bool Controller::WasOnSameSide ( double  value) const

◆ WasSpike()

bool Controller::WasSpike ( ) const

Member Data Documentation

◆ m_history

double Controller::m_history[m_historySize]

◆ m_historySize

const size_t Controller::m_historySize = 3

◆ m_timesOnSameSide

int Controller::m_timesOnSameSide

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