Changeset 13 in flair-dev for trunk/include/FlairFilter/NestedSat.h
- Timestamp:
- 04/08/16 15:39:24 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairFilter/NestedSat.h
r9 r13 16 16 #include <ControlLaw.h> 17 17 18 namespace flair 19 { 20 namespace gui 21 { 22 class Layout; 23 class LayoutPosition; 24 } 18 namespace flair { 19 namespace gui { 20 class Layout; 21 class LayoutPosition; 22 } 25 23 } 26 24 27 25 class NestedSat_impl; 28 26 29 namespace flair 30 { 31 namespace filter 32 { 33 /*! \class NestedSat 34 * 35 * \brief Class defining a PID with saturations 36 * 37 * The output of this control law is calculated 38 * as follows: \n 39 * p_ref=Sat(p_ref,k*sat_ref) \n 40 * d_ref=Sat[(p_ref-p)*kp,k*sat_dref] \n 41 * law=Sat[(d-d_ref)*kd,sat_u] \n 42 * where p, p_ref and d are input values (see SetValues()), \n 43 * where sat_ref, sat_dref and sat_u are settings availables on the ground station, \n 44 * where k is a conversion factor (see ConvertSatFromDegToRad()). 45 */ 46 class NestedSat : public ControlLaw 47 { 48 friend class ::NestedSat_impl; 27 namespace flair { 28 namespace filter { 29 /*! \class NestedSat 30 * 31 * \brief Class defining a PID with saturations 32 * 33 * The output of this control law is calculated 34 * as follows: \n 35 * p_ref=Sat(p_ref,k*sat_ref) \n 36 * d_ref=Sat[(p_ref-p)*kp,k*sat_dref] \n 37 * law=Sat[(d-d_ref)*kd,sat_u] \n 38 * where p, p_ref and d are input values (see SetValues()), \n 39 * where sat_ref, sat_dref and sat_u are settings availables on the ground 40 *station, \n 41 * where k is a conversion factor (see ConvertSatFromDegToRad()). 42 */ 43 class NestedSat : public ControlLaw { 44 friend class ::NestedSat_impl; 49 45 50 public: 51 /*! 52 * \brief Constructor 53 * 54 * Construct a NestedSat at given place position. \n 55 * The NestedSat will automatically be child of position->getLayout() Layout. After calling this function, 56 * position will be deleted as it is no longer usefull. \n 57 * 58 * \param position position to display settings 59 * \param name name 60 */ 61 NestedSat(const gui::LayoutPosition* position,std::string name); 46 public: 47 /*! 48 * \brief Constructor 49 * 50 * Construct a NestedSat at given place position. \n 51 * The NestedSat will automatically be child of position->getLayout() Layout. 52 *After calling this function, 53 * position will be deleted as it is no longer usefull. \n 54 * 55 * \param position position to display settings 56 * \param name name 57 */ 58 NestedSat(const gui::LayoutPosition *position, std::string name); 62 59 63 64 65 66 67 60 /*! 61 * \brief Destructor 62 * 63 */ 64 ~NestedSat(); 68 65 69 70 71 72 73 74 75 76 void SetValues(float p_ref,float p,float d);66 /*! 67 * \brief Set input values 68 * 69 * \param p_ref proportional reference 70 * \param p proportional value 71 * \param d derivative value 72 */ 73 void SetValues(float p_ref, float p, float d); 77 74 78 79 80 81 82 83 84 85 86 75 /*! 76 * \brief Convert saturation parameters in radians 77 * 78 * If this function is called, saturation parameters 79 * on the ground station will be interpreted as degrees. \n 80 * Thus, an internal conversion from degrees to radians will 81 * be done (k=PI/180). 82 */ 83 void ConvertSatFromDegToRad(void); 87 84 88 89 90 91 92 93 94 95 96 85 private: 86 /*! 87 * \brief Update using provided datas 88 * 89 * Reimplemented from IODevice. 90 * 91 * \param data data from the parent to process 92 */ 93 void UpdateFrom(const core::io_data *data); 97 94 98 NestedSat_impl*pimpl_;99 95 NestedSat_impl *pimpl_; 96 }; 100 97 } // end namespace filter 101 98 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.