1#ifndef Math_PFEEDBACKLOOP_H
2#define Math_PFEEDBACKLOOP_H
78 this->state = curState;
79 this->goal = curState;
154 this->time = curTime;
158 this->time = curTime - 0.5;
161 while (this->time < curTime)
163 this->state = this->state + (this->state - this->goal) * this->gain * this->stepSize;
164 this->time += this->stepSize;
A P feedback loop (proportional feedback loop) is a simple object which moves a system's current stat...
Definition pfeedbackloop.h:27
TYPE state
Definition pfeedbackloop.h:53
TYPE goal
Definition pfeedbackloop.h:52
const TYPE & GetState() const
get the current state the system is in
Definition pfeedbackloop.h:137
void SetState(const TYPE &s)
set the current state directly
Definition pfeedbackloop.h:127
const TYPE & GetGoal() const
get the goal
Definition pfeedbackloop.h:117
float stepSize
Definition pfeedbackloop.h:50
void Reset(Timing::Time time, float stepSize, float gain, const TYPE &curState)
reset the time
Definition pfeedbackloop.h:73
Timing::Time time
Definition pfeedbackloop.h:49
PFeedbackLoop()
constructor
Definition pfeedbackloop.h:60
void SetGain(float g)
set the gain
Definition pfeedbackloop.h:87
void SetGoal(const TYPE &c)
set the goal
Definition pfeedbackloop.h:107
float gain
Definition pfeedbackloop.h:51
float GetGain() const
get the gain
Definition pfeedbackloop.h:97
void Update(Timing::Time time)
update the object, return new state
Definition pfeedbackloop.h:147
Different curves.
Definition angularpfeedbackloop.h:17
double Time
the time datatype
Definition time.h:18
Typedefs for the Timing subsystem.