1#ifndef MATH_ANGULARPFEEDBACKLOOP_H
2#define MATH_ANGULARPFEEDBACKLOOP_H
76 this->
state = curState;
161 this->time = curTime;
165 this->time = curTime - 0.5;
168 while (this->time < curTime)
171 float error = n_angulardistance(this->
state, this->
goal);
180 this->time = curTime;
A proportional feedback loop with correct angular interpolation.
Definition angularpfeedbackloop.h:21
float stepSize
Definition angularpfeedbackloop.h:46
void Update(Timing::Time time)
update the object, return new state
Definition angularpfeedbackloop.h:154
Timing::Time GetTime() const
get currrent time
Definition angularpfeedbackloop.h:144
float GetState() const
get the current state the system is in
Definition angularpfeedbackloop.h:134
float gain
Definition angularpfeedbackloop.h:47
float state
Definition angularpfeedbackloop.h:49
void Reset(Timing::Time time, float stepSize, float gain, float curState)
reset the time
Definition angularpfeedbackloop.h:71
void SetGain(float g)
set the gain
Definition angularpfeedbackloop.h:84
float GetGoal() const
get the goal
Definition angularpfeedbackloop.h:114
float goal
Definition angularpfeedbackloop.h:48
AngularPFeedbackLoop()
constructor
Definition angularpfeedbackloop.h:56
void SetState(float s)
set the current state directly
Definition angularpfeedbackloop.h:124
Timing::Time time
Definition angularpfeedbackloop.h:45
void SetGoal(float c)
set the goal
Definition angularpfeedbackloop.h:104
float GetGain() const
get the gain
Definition angularpfeedbackloop.h:94
Different curves.
Definition angularpfeedbackloop.h:17
__forceinline scalar abs(scalar a)
Definition scalar.h:432
double Time
the time datatype
Definition time.h:18
#define N_TINY
Definition scalar.h:43
Typedefs for the Timing subsystem.