code to fly a quadrocopter

Dependencies:   mbed

PID/PID_roll.h

Committer:
DD1993
Date:
2020-05-05
Revision:
0:b0f9c5ac0305

File content as of revision 0:b0f9c5ac0305:

#ifndef PID_ROLL_H
#define PID_ROLL_H
 
#include "mbed.h"
 
class PID_ROLL_Class
{
 
   public:
   
   PID_ROLL_Class(float AngleKp,float AngleKi, float RateKp, float RateKd);
   
   float update_roll(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