Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-rtos mbed QEI BNO055 MPU6050_DMP_Nucleo-I2Cdev virgo3_imuHandler_Orion_PCB MAX17048 Servo
Fork of Orion_newPCB_test by
pidAttitudeControl.h
00001 #ifndef pidAttitudeControl_H 00002 #define pidAttitudeControl_H 00003 00004 #include "mbed.h" 00005 #include "generalFunctions.h" 00006 #include "config.h" 00007 00008 class pidAttitudeControl 00009 { 00010 public: 00011 pidAttitudeControl(); 00012 void setGains(float kP,float kI, float kD, float kFf); 00013 void setTermLimits(float P_min, float P_max, float I_min, float I_max, float D_min, float D_max, float Ff_min, float Ff_max); 00014 void setOutputRange(float outMin, float outMax); 00015 float calcOutput(float setPoint, float feedback, float servoTime); 00016 00017 float PIDFf_terms[4]; 00018 float Summ_term; 00019 00020 private: 00021 float PIDFf_gains[4]; 00022 float PIDFf_limits[4][2]; 00023 float output_limits[2]; 00024 00025 float controlError[2]; 00026 00027 float prevSetPoint; //for acceleration 00028 float compensatedSetPoint; 00029 00030 //float PIDFf_terms[4]; 00031 //float Summ_term; 00032 }; 00033 00034 00035 #endif
Generated on Tue Jul 12 2022 20:53:07 by
