code to fly a quadrocopter

Dependencies:   mbed

Revision:
0:b0f9c5ac0305
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PID/PID_pitch.h	Tue May 05 21:11:38 2020 +0000
@@ -0,0 +1,24 @@
+#ifndef PID_PITCH_H
+#define PID_PITCH_H
+ 
+#include "mbed.h"
+ 
+class PID_PITCH_Class
+{
+ 
+   public:
+   
+   PID_PITCH_Class(float AngleKp,float AngleKi, float RateKp, float RateKd);
+   
+   float update_pitch(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