Changeset 13 in flair-dev for trunk/include/FlairFilter/PidThrust.h
- Timestamp:
- 04/08/16 15:39:24 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/FlairFilter/PidThrust.h
r9 r13 16 16 #include <ControlLaw.h> 17 17 18 namespace flair 19 { 20 namespace gui 21 { 22 class LayoutPosition; 23 } 18 namespace flair { 19 namespace gui { 20 class LayoutPosition; 21 } 24 22 } 25 23 26 24 class PidThrust_impl; 27 25 28 namespace flair 29 { 30 namespace filter 31 { 32 /*! \class PidThrust 33 * 34 * \brief Class defining a Pid for Thrust.\n 35 * This Pid as an extra offset for compensating gravity. 36 */ 37 class PidThrust : public ControlLaw 38 { 39 friend class ::PidThrust_impl; 26 namespace flair { 27 namespace filter { 28 /*! \class PidThrust 29 * 30 * \brief Class defining a Pid for Thrust.\n 31 * This Pid as an extra offset for compensating gravity. 32 */ 33 class PidThrust : public ControlLaw { 34 friend class ::PidThrust_impl; 40 35 41 public: 42 /*! 43 * \brief Constructor 44 * 45 * Construct a PidThrust at given position 46 * The PidThrust will automatically be child of position->getLayout() Layout. After calling this function, 47 * position will be deleted as it is no longer usefull. \n 48 * 49 * \param position position to display settings 50 * \param name name 51 */ 52 PidThrust(const gui::LayoutPosition* position,std::string name); 36 public: 37 /*! 38 * \brief Constructor 39 * 40 * Construct a PidThrust at given position 41 * The PidThrust will automatically be child of position->getLayout() Layout. 42 *After calling this function, 43 * position will be deleted as it is no longer usefull. \n 44 * 45 * \param position position to display settings 46 * \param name name 47 */ 48 PidThrust(const gui::LayoutPosition *position, std::string name); 53 49 54 55 56 57 58 50 /*! 51 * \brief Destructor 52 * 53 */ 54 ~PidThrust(); 59 55 60 61 62 63 64 56 /*! 57 * \brief Reset integral and offset to 0 58 * 59 */ 60 void Reset(void); 65 61 66 67 68 69 70 62 /*! 63 * \brief Reset integral to 0 64 * 65 */ 66 void ResetI(void); 71 67 72 73 74 75 76 68 /*! 69 * \brief Reset offset to 0 70 * 71 */ 72 void ResetOffset(void); 77 73 78 79 80 81 82 74 /*! 75 * \brief Set offset to specified value in ground station 76 * 77 */ 78 void SetOffset(void); 83 79 84 85 86 87 88 89 80 /*! 81 * \brief Get offset 82 * 83 * \return current offset 84 */ 85 float GetOffset(void); 90 86 91 92 93 94 95 96 87 /*! 88 * \brief Step up the offset according to specified value in ground station 89 * 90 * \return false if offset is at its maximum (1) value, true otherwise 91 */ 92 bool OffsetStepUp(void); 97 93 98 /*! 99 * \brief Step down the offset according to specified value in ground station 100 * 101 * \return false if offset is at its minimum (specified in ground station) value, true otherwise 102 */ 103 bool OffsetStepDown(void); 94 /*! 95 * \brief Step down the offset according to specified value in ground station 96 * 97 * \return false if offset is at its minimum (specified in ground station) 98 *value, true otherwise 99 */ 100 bool OffsetStepDown(void); 104 101 105 106 107 108 109 110 111 void SetValues(float p,float d);102 /*! 103 * \brief Set input values 104 * 105 * \param p proportional value 106 * \param d derivative value 107 */ 108 void SetValues(float p, float d); 112 109 113 /*! 114 * \brief Use default plot 115 * 116 * Plot the output values at position. \n 117 * Plot consists of 4 curves: proportional part, 118 * derivative part, integral part and 119 * the sum of the three. \n 120 * After calling this function, position will be deleted as it is no longer usefull. \n 121 * 122 * \param position position to display plot 123 */ 124 void UseDefaultPlot(const gui::LayoutPosition* position); 110 /*! 111 * \brief Use default plot 112 * 113 * Plot the output values at position. \n 114 * Plot consists of 4 curves: proportional part, 115 * derivative part, integral part and 116 * the sum of the three. \n 117 * After calling this function, position will be deleted as it is no longer 118 *usefull. \n 119 * 120 * \param position position to display plot 121 */ 122 void UseDefaultPlot(const gui::LayoutPosition *position); 125 123 126 127 128 129 130 131 132 133 134 124 private: 125 /*! 126 * \brief Update using provided datas 127 * 128 * Reimplemented from IODevice. 129 * 130 * \param data data from the parent to process 131 */ 132 void UpdateFrom(const core::io_data *data); 135 133 136 PidThrust_impl*pimpl_;137 134 PidThrust_impl *pimpl_; 135 }; 138 136 } // end namespace filter 139 137 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.