Definition and access functions for a BeoSub PID. More...
#include <Controllers/PID.H>
Public Member Functions | |
PID (const float pGain, const float iGain, const float dGain, const T &iMin, const T &iMax, const T &errThresh=0, const T &posThresh=0, const T &negThresh=0, const T &maxMotor=100, const T &minMotor=-100, const int noMoveThresh=150, const bool runPID=true, const float speed=1, const T &posStaticErrThresh=50, const T &negStaticErrThresh=-50) | |
Constructor. | |
~PID () | |
Destructor. | |
void | setPIDPgain (float p) |
Set the gains. | |
void | setPIDIgain (float i) |
void | setPIDDgain (float d) |
void | setSpeed (float s) |
void | setPIDOn (bool val) |
float | getPIDPgain () |
float | getPIDIgain () |
float | getPIDDgain () |
T | getVel () |
T | getErr () |
T | getVal () |
T | getTarget () |
T | getPTerm () |
T | getRunPID () |
T | update (const T &target, const T &val) |
Receive a new measurement value and get the new recommended action. | |
T | update (const T &targetPos, const T &targetVel, const T ¤tVal) |
Receive a new measurement value and get the new recommended action. |
Definition and access functions for a BeoSub PID.
Definition at line 44 of file PID.H.
PID< T >::PID | ( | const float | pGain, | |
const float | iGain, | |||
const float | dGain, | |||
const T & | iMin, | |||
const T & | iMax, | |||
const T & | errThresh = 0 , |
|||
const T & | posThresh = 0 , |
|||
const T & | negThresh = 0 , |
|||
const T & | maxMotor = 100 , |
|||
const T & | minMotor = -100 , |
|||
const int | noMoveThresh = 150 , |
|||
const bool | runPID = true , |
|||
const float | speed = 1 , |
|||
const T & | posStaticErrThresh = 50 , |
|||
const T & | negStaticErrThresh = -50 | |||
) | [inline] |
void PID< T >::setPIDPgain | ( | float | p | ) | [inline] |
Set the gains.
Definition at line 77 of file PID.C.
Referenced by MovementController::paramChanged(), BeoSubOneBal::setDepthPgain(), BeoSubOneBal::setHeadingPgain(), BeoSubOneBal::setPitchPgain(), BeoSubOneBal::setRotVelPgain(), tunePID(), and SeaBee3Simulator::updateMessage().
T PID< T >::update | ( | const T & | targetPos, | |
const T & | targetVel, | |||
const T & | currentVal | |||
) | [inline] |
T PID< T >::update | ( | const T & | target, | |
const T & | val | |||
) | [inline] |
Receive a new measurement value and get the new recommended action.
Definition at line 109 of file PID.C.
Referenced by MyBeeSTEMListener::event(), BeoPilot::evolve(), IMUListener::newData(), BeoSubOneBal::updateCompass(), and BeoSubOneBal::updateDepth().