source: flair-src/trunk/lib/FlairFilter/src/NestedSat.h@ 157

Last change on this file since 157 was 15, checked in by Bayard Gildas, 6 years ago

sources reformatted with flair-format-dir script

File size: 2.3 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 NestedSat.h
7 * \brief Class defining a PID with saturations
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2013/04/15
10 * \version 4.0
11 */
12
13#ifndef NESTEDSAT_H
14#define NESTEDSAT_H
15
16#include <ControlLaw.h>
17
18namespace flair {
19namespace gui {
20class Layout;
21class LayoutPosition;
22}
23}
24
25class NestedSat_impl;
26
27namespace flair {
28namespace 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*/
43class NestedSat : public ControlLaw {
44 friend class ::NestedSat_impl;
45
46public:
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);
59
60 /*!
61 * \brief Destructor
62 *
63 */
64 ~NestedSat();
65
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);
74
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);
84
85private:
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);
94
95 NestedSat_impl *pimpl_;
96};
97} // end namespace filter
98} // end namespace flair
99#endif // NESTEDSAT_H
Note: See TracBrowser for help on using the repository browser.