Flair
Framework Libre Air
JoyReference.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 JOYREFERENCE_H
14 #define JOYREFERENCE_H
15 
16 #include <IODevice.h>
17 #include <stdint.h>
18 
19 namespace flair {
20 namespace core {
21 class Quaternion;
22 class AhrsData;
23 }
24 namespace gui {
25 class LayoutPosition;
26 }
27 }
28 
29 class JoyReference_impl;
30 
31 namespace flair {
32 namespace filter {
37 class JoyReference : public core::IODevice {
38 public:
52  JoyReference(const gui::LayoutPosition *position, std::string name);
53 
58  ~JoyReference();
59 
65  void SetRollAxis(float value);
66 
72  void SetPitchAxis(float value);
73 
79  void SetYawAxis(float value);
80 
86  void SetAltitudeAxis(float value);
87 
94 
100  float ZRef(void) const;
101 
107  float DzRef(void) const;
108 
114  float RollTrim(void) const;
115 
121  float PitchTrim(void) const;
122 
132  void SetYawRef(float value);
133 
143  void SetYawRef(core::Quaternion const &value);
144 
154  void SetZRef(float value);
155 
161  void RollTrimUp(void);
162 
168  void RollTrimDown(void);
169 
175  void PitchTrimUp(void);
176 
182  void PitchTrimDown(void);
183 
191  void Update(core::Time time);
192 
193 private:
201  void UpdateFrom(const core::io_data *data);
202 
203  class JoyReference_impl *pimpl_;
204 };
205 } // end namespace sensor
206 } // end namespace flair
207 
208 #endif // JOYREFERENCE_H
void SetPitchAxis(float value)
Set pitch axis value.
Abstract class for data types.
Definition: io_data.h:94
void SetAltitudeAxis(float value)
Set thrust axis value.
JoyReference(const gui::LayoutPosition *position, std::string name)
Constructor.
Abstract class for input/ouput system.
Definition: IODevice.h:45
namespace of the flair Framework
Definition: Ahrs.h:19
unsigned long long Time
Time definition, in ns.
Definition: Object.h:55
void SetZRef(float value)
Set z reference.
void PitchTrimDown(void)
Trim down pitch.
void Update(core::Time time)
Update references.
Class defining AHRS datas.
Definition: AhrsData.h:30
float ZRef(void) const
Get z reference.
void SetYawRef(float value)
Set yaw reference.
float PitchTrim(void) const
Get pitch trim.
Abstract class for input/ouput system.
core::AhrsData * GetReferenceOrientation(void) const
Get orientation reference.
void PitchTrimUp(void)
Trim up pitch.
Class creating references from a joystick.
Definition: JoyReference.h:37
float RollTrim(void) const
Get roll trim.
float DzRef(void) const
Get z derivative reference.
Class to define a position in a layout on the ground station.
Definition: LayoutPosition.h:28
void RollTrimUp(void)
Trim up roll.
void SetYawAxis(float value)
Set yaw axis value.
void SetRollAxis(float value)
Set roll axis value.
Class defining a quaternion.
Definition: Quaternion.h:26
void RollTrimDown(void)
Trim down roll.