Nebula
Loading...
Searching...
No Matches
Math::PIDFeedbackLoop Class Reference

#include <pidfeedbackloop.h>

Detailed Description

A PID feedback loop (proportional integral derivative feedback loop)

Public Member Functions

 PIDFeedbackLoop ()
 constructor
 
void SetState (double value)
 set value of loop
 
void SetGoal (double wantedValue)
 set the goal
 
void SetConstants (double pConst, double iConst, double dConst, double acceleration=0.0)
 set the propotional, integral and derivative constants, and maximum acceleration (how fast the value kann change, will be disabled if set to 0.0 (default))
 
const double & GetState () const
 get current value
 
const double & GetGoal () const
 get the goal
 
double GetLastError () const
 get last computed error
 
double GetLastDelta () const
 last delta of error
 
void Update (Timing::Time time)
 update current value
 
void ResetError ()
 reset running error
 
void SetIsAngularValue (bool val)
 set IsAngularValue
 

Private Attributes

double value
 
double goal
 
double pConst
 
double iConst
 
double dConst
 
double maxAcceleration
 
double lastError
 
double lastDelta
 
double runningError
 
bool validError
 
bool isAngularValue
 
Timing::Time lastTime
 
Timing::Time lastDeltaTime
 
Timing::Time maxAllowableDeltaTime
 

Constructor & Destructor Documentation

◆ PIDFeedbackLoop()

Math::PIDFeedbackLoop::PIDFeedbackLoop ( )
inline

constructor

Member Function Documentation

◆ GetGoal()

const double & Math::PIDFeedbackLoop::GetGoal ( ) const
inline

get the goal

◆ GetLastDelta()

double Math::PIDFeedbackLoop::GetLastDelta ( ) const
inline

last delta of error

◆ GetLastError()

double Math::PIDFeedbackLoop::GetLastError ( ) const
inline

get last computed error

◆ GetState()

const double & Math::PIDFeedbackLoop::GetState ( ) const
inline

get current value

◆ ResetError()

void Math::PIDFeedbackLoop::ResetError ( )
inline

reset running error

◆ SetConstants()

void Math::PIDFeedbackLoop::SetConstants ( double pConst,
double iConst,
double dConst,
double acceleration = 0.0 )
inline

set the propotional, integral and derivative constants, and maximum acceleration (how fast the value kann change, will be disabled if set to 0.0 (default))

◆ SetGoal()

void Math::PIDFeedbackLoop::SetGoal ( double wantedValue)
inline

set the goal

◆ SetIsAngularValue()

void Math::PIDFeedbackLoop::SetIsAngularValue ( bool val)
inline

set IsAngularValue

◆ SetState()

void Math::PIDFeedbackLoop::SetState ( double value)
inline

set value of loop

◆ Update()

void Math::PIDFeedbackLoop::Update ( Timing::Time time)
inline

update current value

Member Data Documentation

◆ dConst

double Math::PIDFeedbackLoop::dConst
private

◆ goal

double Math::PIDFeedbackLoop::goal
private

◆ iConst

double Math::PIDFeedbackLoop::iConst
private

◆ isAngularValue

bool Math::PIDFeedbackLoop::isAngularValue
private

◆ lastDelta

double Math::PIDFeedbackLoop::lastDelta
private

◆ lastDeltaTime

Timing::Time Math::PIDFeedbackLoop::lastDeltaTime
private

◆ lastError

double Math::PIDFeedbackLoop::lastError
private

◆ lastTime

Timing::Time Math::PIDFeedbackLoop::lastTime
private

◆ maxAcceleration

double Math::PIDFeedbackLoop::maxAcceleration
private

◆ maxAllowableDeltaTime

Timing::Time Math::PIDFeedbackLoop::maxAllowableDeltaTime
private

◆ pConst

double Math::PIDFeedbackLoop::pConst
private

◆ runningError

double Math::PIDFeedbackLoop::runningError
private

◆ validError

bool Math::PIDFeedbackLoop::validError
private

◆ value

double Math::PIDFeedbackLoop::value
private

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