auto-sync
This commit is contained in:
parent
4319ef796b
commit
079c5029e7
|
@ -2,4 +2,5 @@
|
|||
CONTROLLERS_MATH_SRC =
|
||||
|
||||
CONTROLLERS_MATH_SRC_CPP = $(PROJECT_DIR)/controllers/math/engine_math.cpp \
|
||||
$(PROJECT_DIR)/controllers/math/pid.cpp \
|
||||
$(PROJECT_DIR)/controllers/math/speed_density.cpp
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @file pid.cpp
|
||||
*
|
||||
* http://en.wikipedia.org/wiki/PID_controller
|
||||
*
|
||||
* @date Sep 16, 2014
|
||||
* @author Andrey Belomutskiy, (c) 2012-2014
|
||||
*/
|
||||
|
||||
#include "pid.h"
|
||||
|
||||
Pid::Pid(float pFactor, float iFactor, float dFactor) {
|
||||
this->pFactor = pFactor;
|
||||
this->iFactor = iFactor;
|
||||
this->dFactor = dFactor;
|
||||
}
|
||||
|
||||
float Pid::getValue(float input) {
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* @file pid.h
|
||||
*
|
||||
* @date Sep 16, 2014
|
||||
* @author Andrey Belomutskiy, (c) 2012-2014
|
||||
*/
|
||||
|
||||
#ifndef PID_H_
|
||||
#define PID_H_
|
||||
|
||||
class Pid {
|
||||
|
||||
public:
|
||||
Pid(float pFactor, float iFactor, float dFactor);
|
||||
float getValue(float input);
|
||||
|
||||
private:
|
||||
float pFactor;
|
||||
float iFactor;
|
||||
float dFactor;
|
||||
|
||||
};
|
||||
|
||||
#endif /* PID_H_ */
|
Loading…
Reference in New Issue