[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[7] | 5 | // created: 2012/08/29
|
---|
| 6 | // filename: JoyReference_impl.h
|
---|
| 7 | //
|
---|
| 8 | // author: Guillaume Sanahuja
|
---|
| 9 | // Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 10 | //
|
---|
| 11 | // version: $Id: $
|
---|
| 12 | //
|
---|
| 13 | // purpose: generation de consignes a partir joystick
|
---|
| 14 | //
|
---|
| 15 | //
|
---|
| 16 | /*********************************************************************/
|
---|
| 17 |
|
---|
| 18 | #ifndef JOYREFERENCE_IMPL_H
|
---|
| 19 | #define JOYREFERENCE_IMPL_H
|
---|
| 20 |
|
---|
| 21 | #include <stdint.h>
|
---|
| 22 | #include <Object.h>
|
---|
| 23 | #include <Quaternion.h>
|
---|
| 24 |
|
---|
| 25 | namespace flair {
|
---|
[15] | 26 | namespace core {
|
---|
[214] | 27 | class Matrix;
|
---|
[15] | 28 | class io_data;
|
---|
| 29 | class AhrsData;
|
---|
[7] | 30 | }
|
---|
[15] | 31 | namespace gui {
|
---|
| 32 | class LayoutPosition;
|
---|
| 33 | class GroupBox;
|
---|
| 34 | class DoubleSpinBox;
|
---|
| 35 | class SpinBox;
|
---|
| 36 | class Label;
|
---|
| 37 | class PushButton;
|
---|
| 38 | }
|
---|
| 39 | namespace filter {
|
---|
| 40 | class JoyReference;
|
---|
| 41 | }
|
---|
| 42 | }
|
---|
[7] | 43 |
|
---|
| 44 | class JoyReference_impl {
|
---|
| 45 |
|
---|
[15] | 46 | public:
|
---|
| 47 | JoyReference_impl(flair::filter::JoyReference *self,
|
---|
| 48 | const flair::gui::LayoutPosition *position,
|
---|
| 49 | std::string name);
|
---|
| 50 | ~JoyReference_impl();
|
---|
| 51 | void SetRollAxis(float value);
|
---|
| 52 | void SetPitchAxis(float value);
|
---|
| 53 | void SetYawAxis(float value);
|
---|
| 54 | void SetAltitudeAxis(float value);
|
---|
| 55 | float ZRef(void) const;
|
---|
| 56 | float dZRef(void) const;
|
---|
| 57 | float RollTrim(void) const;
|
---|
| 58 | float PitchTrim(void) const;
|
---|
| 59 | void SetYawRef(float value);
|
---|
| 60 | void SetZRef(float value);
|
---|
| 61 | void RollTrimUp(void);
|
---|
| 62 | void RollTrimDown(void);
|
---|
| 63 | void PitchTrimUp(void);
|
---|
| 64 | void PitchTrimDown(void);
|
---|
| 65 | void Update(flair::core::Time time);
|
---|
| 66 | void UpdateFrom(const flair::core::io_data *data);
|
---|
[214] | 67 | flair::core::Matrix *output;
|
---|
[15] | 68 | flair::core::AhrsData *ahrsData;
|
---|
[7] | 69 |
|
---|
[15] | 70 | private:
|
---|
[214] | 71 | flair::core::Matrix *input;
|
---|
[7] | 72 |
|
---|
[15] | 73 | flair::gui::GroupBox *reglages_groupbox;
|
---|
| 74 | flair::gui::DoubleSpinBox *deb_roll, *deb_pitch, *deb_wz, *deb_dz;
|
---|
| 75 | flair::gui::DoubleSpinBox *trim;
|
---|
| 76 | flair::gui::Label *label_roll, *label_pitch;
|
---|
| 77 | flair::gui::PushButton *button_roll, *button_pitch;
|
---|
[7] | 78 |
|
---|
[15] | 79 | float z_ref;
|
---|
| 80 | flair::core::Quaternion q_z = flair::core::Quaternion(1, 0, 0, 0);
|
---|
| 81 | float trim_roll, trim_pitch;
|
---|
| 82 | flair::core::Time previous_time;
|
---|
[7] | 83 |
|
---|
[15] | 84 | flair::filter::JoyReference *self;
|
---|
[7] | 85 | };
|
---|
| 86 |
|
---|
| 87 | #endif // JOYREFERENCE_IMPL_H
|
---|