Flair
Framework Libre Air
PidThrust.h
Go to the documentation of this file.
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}
13 #ifndef PIDTHRUST_H
14 #define PIDTHRUST_H
15 
16 #include <ControlLaw.h>
17 
18 namespace flair {
19 namespace gui {
20 class LayoutPosition;
21 }
22 }
23 
24 class PidThrust_impl;
25 
26 namespace flair {
27 namespace filter {
33 class PidThrust : public ControlLaw {
34  friend class ::PidThrust_impl;
35 
36 public:
48  PidThrust(const gui::LayoutPosition *position, std::string name);
49 
54  ~PidThrust();
55 
64  void Reset(void);
65 
70  void ResetI(void);
71 
77  void SetOffset(float value);
78 
83  void SetDefaultOffset(void);
84 
90  float GetOffset(void) const;
91 
97  float GetIntegral(void) const;
98 
104  bool OffsetStepUp(void);
105 
112  bool OffsetStepDown(void);
113 
120  void SetValues(float p, float d);
121 
134  void UseDefaultPlot(const gui::LayoutPosition *position);
135 
136 private:
144  void UpdateFrom(const core::io_data *data);
145 
146  PidThrust_impl *pimpl_;
147 };
148 } // end namespace filter
149 } // end namespace flair
150 #endif // PIDTHRUST_H
Abstract class for data types.
Definition: io_data.h:94
Base class for control law input must be created by reimplemented class. output is created by this cl...
Definition: ControlLaw.h:36
namespace of the flair Framework
Definition: Ahrs.h:19
void SetOffset(float value)
Set offset to a specified value.
Class defining a Pid for Thrust. This Pid as an extra offset for compensating gravity.
Definition: PidThrust.h:33
bool OffsetStepUp(void)
Step up the offset according to specified value in ground station.
~PidThrust()
Destructor.
Base class for control law.
void SetValues(float p, float d)
Set input values.
void ResetI(void)
Reset integral to 0.
bool OffsetStepDown(void)
Step down the offset according to specified value in ground station.
float GetOffset(void) const
Get offset.
PidThrust(const gui::LayoutPosition *position, std::string name)
Constructor.
float GetIntegral(void) const
Get intergral part.
void Reset(void)
Reset the control law equivalent to: ResetI(); SetDefaultOffset(); SetValues(0,0);.
void SetDefaultOffset(void)
Set offset to specified value in ground station.
Class to define a position in a layout on the ground station.
Definition: LayoutPosition.h:28
void UseDefaultPlot(const gui::LayoutPosition *position)
Use default plot.