Go to the documentation of this file.00001 #ifndef PID_H
00002 #define PID_H
00003
00004 #include <inttypes.h>
00005 #include <mav_common/comm.h>
00006 #include <mav_common/comm_packets.h>
00007 #include <mav_common/comm_types.h>
00008
00009 #include "sdk.h"
00010 #include "LL_HL_comm.h"
00011
00012 typedef struct
00013 {
00014 float kp;
00015 float ki;
00016 float kd;
00017 float kd2;
00018 float d_base;
00019 float bias;
00020 float sum_error;
00021 float max_sum_error;
00022 float max_error;
00023
00024 } PID;
00025
00026 void pidReset(void);
00027
00028 float pidCalc(PID * pid, float error, float d_term, float d_base, float dt);
00029
00030 void processCtrl(void);
00031
00032 void pidParamUpdate(void);
00033
00034 #endif // PID_H
00035