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 MetaVrpnObject.h
|
---|
7 | * \brief Classe haut niveau intégrant un objet VRPN
|
---|
8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
9 | * \date 2013/04/08
|
---|
10 | * \version 3.4
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef METAVRPNOBJECT_H
|
---|
14 | #define METAVRPNOBJECT_H
|
---|
15 |
|
---|
16 | #include <VrpnObject.h>
|
---|
17 | #include <VrpnClient.h>
|
---|
18 | #include <io_data.h>
|
---|
19 | #include <Vector3D.h>
|
---|
20 |
|
---|
21 | namespace flair {
|
---|
22 | namespace gui {
|
---|
23 | class DataPlot1D;
|
---|
24 | class DataPlot2D;
|
---|
25 | class Tab;
|
---|
26 | }
|
---|
27 | namespace filter {
|
---|
28 | class EulerDerivative;
|
---|
29 | class LowPassFilter;
|
---|
30 | }
|
---|
31 | namespace sensor {
|
---|
32 | class AltitudeSensor;
|
---|
33 | }
|
---|
34 | }
|
---|
35 |
|
---|
36 | namespace flair {
|
---|
37 | namespace meta {
|
---|
38 |
|
---|
39 | /*! \class MetaVrpnObject
|
---|
40 | *
|
---|
41 | * \brief Classe haut niveau intégrant un objet VRPN
|
---|
42 | *
|
---|
43 | * Contient un objet VRPN et une dérivée, d'euler.
|
---|
44 | */
|
---|
45 | class MetaVrpnObject : public sensor::VrpnObject {
|
---|
46 | public:
|
---|
47 | MetaVrpnObject(std::string name,sensor::VrpnClient *client=sensor::GetVrpnClient());
|
---|
48 | MetaVrpnObject(std::string name,uint8_t id,sensor::VrpnClient *client=sensor::GetVrpnClient());
|
---|
49 | ~MetaVrpnObject();
|
---|
50 | gui::DataPlot1D *VxPlot(void) const; // 1,0
|
---|
51 | gui::DataPlot1D *VyPlot(void) const; // 1,1
|
---|
52 | gui::DataPlot1D *VzPlot(void) const; // 1,2
|
---|
53 | gui::DataPlot2D *XyPlot(void) const;
|
---|
54 | void GetSpeed(core::Vector3Df &speed) const;
|
---|
55 | filter::EulerDerivative* GetEulerDerivative(void) const;
|
---|
56 | //get the associated AltitudeSensor
|
---|
57 | //MetaVrpnObject do not derivate from AltitudeSensor because frames are differents
|
---|
58 | //and this could be confusing
|
---|
59 | //MetaVrpnObject is in vrpn frame (earth)
|
---|
60 | //AltitudeSensor is in uav frame
|
---|
61 | sensor::AltitudeSensor *GetAltitudeSensor(void) const;
|
---|
62 |
|
---|
63 | private:
|
---|
64 | void ConstructorCommon(std::string name,sensor::VrpnClient *client);
|
---|
65 | filter::LowPassFilter *pbas;
|
---|
66 | filter::EulerDerivative *euler;
|
---|
67 | gui::DataPlot2D *xy_plot;
|
---|
68 | gui::DataPlot1D *vx_opti_plot, *vy_opti_plot, *vz_opti_plot;
|
---|
69 | gui::Tab *plot_tab;
|
---|
70 | sensor::AltitudeSensor *altitudeSensor;
|
---|
71 | };
|
---|
72 | } // end namespace meta
|
---|
73 | } // end namespace flair
|
---|
74 | #endif // METAVRPNOBJECT_H
|
---|