![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
code to fly a quadrocopter
Diff: PID/PID_yaw.h
- Revision:
- 0:b0f9c5ac0305
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PID/PID_yaw.h Tue May 05 21:11:38 2020 +0000 @@ -0,0 +1,24 @@ +#ifndef PID_YAW_H +#define PID_YAW_H + +#include "mbed.h" + +class PID_YAW_Class +{ + + public: + + PID_YAW_Class(float AngleKp,float AngleKi, float RateKp, float RateKd); + + float update_yaw(float Setpoint, float CurrentPosition, float Rate, float dt); + + private: + + float Angle_Kp,Angle_Ki,Rate_Kp,Rate_Kd; + float AngleError,RateError; + float Angle_I,Rate_D; + float Output,WindUp; + float PreviousError; + +}; +#endif \ No newline at end of file