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

Last change on this file since 62 was 62, checked in by Sanahuja Guillaume, 3 years ago

m

File size: 2.7 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 {
19namespace gui {
20class LayoutPosition;
21}
22}
23
24class PidThrust_impl;
25
26namespace flair {
27namespace 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*/
33class PidThrust : public ControlLaw {
34  friend class ::PidThrust_impl;
35
36public:
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);
49
50  /*!
51  * \brief Destructor
52  *
53  */
54  ~PidThrust();
55
56  /*!
57  * \brief Reset integral to 0
58  *
59  */
60  void ResetI(void);
61
62  /*!
63  * \brief Set offset to a specified value
64  *
65  * \param value desired value
66  */
67  void SetOffset(float value);
68 
69  /*!
70  * \brief Set offset to specified value in ground station
71  *
72  */
73  void SetDefaultOffset(void);
74
75  /*!
76  * \brief Get offset
77  *
78  * \return current offset
79  */
80  float GetOffset(void);
81
82  /*!
83  * \brief Step up the offset according to specified value in ground station
84  *
85  * \return false if offset is at its maximum (1) value, true otherwise
86  */
87  bool OffsetStepUp(void);
88
89  /*!
90  * \brief Step down the offset according to specified value in ground station
91  *
92  * \return false if offset is at its minimum (specified in ground station)
93  *value, true otherwise
94  */
95  bool OffsetStepDown(void);
96
97  /*!
98  * \brief Set input values
99  *
100  * \param p proportional value
101  * \param d derivative value
102  */
103  void SetValues(float p, float d);
104
105  /*!
106  * \brief Use default plot
107  *
108  * Plot the output values at position. \n
109  * Plot consists of 4 curves: proportional part,
110  * derivative part, integral part and
111  * the sum of the three. \n
112  * After calling this function, position will be deleted as it is no longer
113  *usefull. \n
114  *
115  * \param position position to display plot
116  */
117  void UseDefaultPlot(const gui::LayoutPosition *position);
118
119private:
120  /*!
121  * \brief Update using provided datas
122  *
123  * Reimplemented from IODevice.
124  *
125  * \param data data from the parent to process
126  */
127  void UpdateFrom(const core::io_data *data);
128
129  PidThrust_impl *pimpl_;
130};
131} // end namespace filter
132} // end namespace flair
133#endif // PIDTHRUST_H
Note: See TracBrowser for help on using the repository browser.