source: flair-src/trunk/lib/FlairFilter/src/PidThrust.h@ 10

Last change on this file since 10 was 10, checked in by Sanahuja Guillaume, 7 years ago

lic

File size: 3.6 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file PidThrust.h
7 * \brief Class defining a Pid for Thrust
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/11/07
10 * \version 4.0
11 */
12
13#ifndef PIDTHRUST_H
14#define PIDTHRUST_H
15
16#include <ControlLaw.h>
17
18namespace flair
19{
20 namespace gui
21 {
22 class LayoutPosition;
23 }
24}
25
26class PidThrust_impl;
27
28namespace flair
29{
30namespace 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;
40
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);
53
54 /*!
55 * \brief Destructor
56 *
57 */
58 ~PidThrust();
59
60 /*!
61 * \brief Reset integral and offset to 0
62 *
63 */
64 void Reset(void);
65
66 /*!
67 * \brief Reset integral to 0
68 *
69 */
70 void ResetI(void);
71
72 /*!
73 * \brief Reset offset to 0
74 *
75 */
76 void ResetOffset(void);
77
78 /*!
79 * \brief Set offset to specified value in ground station
80 *
81 */
82 void SetOffset(void);
83
84 /*!
85 * \brief Get offset
86 *
87 * \return current offset
88 */
89 float GetOffset(void);
90
91 /*!
92 * \brief Step up the offset according to specified value in ground station
93 *
94 * \return false if offset is at its maximum (1) value, true otherwise
95 */
96 bool OffsetStepUp(void);
97
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);
104
105 /*!
106 * \brief Set input values
107 *
108 * \param p proportional value
109 * \param d derivative value
110 */
111 void SetValues(float p,float d);
112
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);
125
126 private:
127 /*!
128 * \brief Update using provided datas
129 *
130 * Reimplemented from IODevice.
131 *
132 * \param data data from the parent to process
133 */
134 void UpdateFrom(const core::io_data *data);
135
136 PidThrust_impl* pimpl_;
137 };
138} // end namespace filter
139} // end namespace flair
140#endif // PIDTHRUST_H
Note: See TracBrowser for help on using the repository browser.