source: flair-dev/trunk/include/FlairFilter/PidThrust.h@ 6

Last change on this file since 6 was 6, checked in by Sanahuja Guillaume, 8 years ago

filter

File size: 3.5 KB
Line 
1/*!
2 * \file PidThrust.h
3 * \brief Class defining a Pid for Thrust
4 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
5 * \date 2014/11/07
6 * \version 4.0
7 */
8
9#ifndef PIDTHRUST_H
10#define PIDTHRUST_H
11
12#include <ControlLaw.h>
13
14namespace flair
15{
16 namespace gui
17 {
18 class LayoutPosition;
19 }
20}
21
22class PidThrust_impl;
23
24namespace flair
25{
26namespace filter
27{
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 {
35 friend class ::PidThrust_impl;
36
37 public:
38 /*!
39 * \brief Constructor
40 *
41 * Construct a PidThrust at given position
42 * The PidThrust will automatically be child of position->getLayout() Layout. 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);
49
50 /*!
51 * \brief Destructor
52 *
53 */
54 ~PidThrust();
55
56 /*!
57 * \brief Reset integral and offset to 0
58 *
59 */
60 void Reset(void);
61
62 /*!
63 * \brief Reset integral to 0
64 *
65 */
66 void ResetI(void);
67
68 /*!
69 * \brief Reset offset to 0
70 *
71 */
72 void ResetOffset(void);
73
74 /*!
75 * \brief Set offset to specified value in ground station
76 *
77 */
78 void SetOffset(void);
79
80 /*!
81 * \brief Get offset
82 *
83 * \return current offset
84 */
85 float GetOffset(void);
86
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);
93
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) value, true otherwise
98 */
99 bool OffsetStepDown(void);
100
101 /*!
102 * \brief Set input values
103 *
104 * \param p proportional value
105 * \param d derivative value
106 */
107 void SetValues(float p,float d);
108
109 /*!
110 * \brief Use default plot
111 *
112 * Plot the output values at position. \n
113 * Plot consists of 4 curves: proportional part,
114 * derivative part, integral part and
115 * the sum of the three. \n
116 * After calling this function, position will be deleted as it is no longer usefull. \n
117 *
118 * \param position position to display plot
119 */
120 void UseDefaultPlot(const gui::LayoutPosition* position);
121
122 private:
123 /*!
124 * \brief Update using provided datas
125 *
126 * Reimplemented from IODevice.
127 *
128 * \param data data from the parent to process
129 */
130 void UpdateFrom(const core::io_data *data);
131
132 PidThrust_impl* pimpl_;
133 };
134} // end namespace filter
135} // end namespace flair
136#endif // PIDTHRUST_H
Note: See TracBrowser for help on using the repository browser.