[425] | 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 NEDPosition.h
|
---|
| 7 | * \brief Class for a NED position sensor
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS
|
---|
| 9 | * 7253
|
---|
| 10 | * \date 2021/05/20
|
---|
| 11 | * \version 4.0
|
---|
| 12 | */
|
---|
| 13 |
|
---|
| 14 | #ifndef NEDPOSITION_H
|
---|
| 15 | #define NEDPOSITION_H
|
---|
| 16 |
|
---|
| 17 | #include <IODevice.h>
|
---|
| 18 | #include <VrpnClient.h>
|
---|
| 19 | #include <Vector3D.h>
|
---|
| 20 | #include <stdint.h>
|
---|
| 21 |
|
---|
| 22 | namespace flair {
|
---|
| 23 | namespace core {
|
---|
| 24 | class Matrix;
|
---|
| 25 | }
|
---|
| 26 | namespace gui {
|
---|
| 27 | class TabWidget;
|
---|
| 28 | class Tab;
|
---|
| 29 | class DataPlot1D;
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | class NEDPosition_impl;
|
---|
| 34 |
|
---|
| 35 | namespace flair {
|
---|
| 36 | namespace sensor {
|
---|
| 37 |
|
---|
| 38 | /*! \class NEDPosition
|
---|
| 39 | *
|
---|
| 40 | * \brief Class for a NED position sensor.
|
---|
| 41 | */
|
---|
| 42 | class NEDPosition : public core::IODevice {
|
---|
| 43 |
|
---|
| 44 |
|
---|
| 45 | public:
|
---|
| 46 | /*!
|
---|
| 47 | * \brief Constructor
|
---|
| 48 | *
|
---|
| 49 | * Construct a NEDPosition.
|
---|
| 50 | *
|
---|
| 51 | * \param name
|
---|
| 52 | */
|
---|
| 53 | NEDPosition(std::string name);
|
---|
| 54 |
|
---|
| 55 | /*!
|
---|
| 56 | * \brief Destructor
|
---|
| 57 | *
|
---|
| 58 | */
|
---|
| 59 | ~NEDPosition(void);
|
---|
| 60 |
|
---|
| 61 | /*!
|
---|
| 62 | * \brief Plot tab
|
---|
| 63 | *
|
---|
| 64 | * \return plot Tab
|
---|
| 65 | */
|
---|
| 66 | gui::Tab *GetPlotTab(void) const;
|
---|
| 67 |
|
---|
| 68 | /*!
|
---|
| 69 | * \brief Get Position
|
---|
| 70 | *
|
---|
| 71 | * \param point output datas
|
---|
| 72 | */
|
---|
| 73 | void GetPosition(core::Vector3Df &point) const;
|
---|
| 74 |
|
---|
| 75 | /*!
|
---|
| 76 | * \brief Get Position
|
---|
| 77 | *
|
---|
| 78 | * \param point output datas
|
---|
| 79 | */
|
---|
| 80 | void GetVelocity(core::Vector3Df &point) const;
|
---|
| 81 |
|
---|
| 82 | /*!
|
---|
| 83 | * \brief Output matrix
|
---|
| 84 | *
|
---|
| 85 | * Matrix is of type float and as follows: \n
|
---|
| 86 | * (0,0) x \n
|
---|
| 87 | * (1,0) y \n
|
---|
| 88 | * (2,0) z \n
|
---|
| 89 | * (3,0) vx \n
|
---|
| 90 | * (4,0) vy \n
|
---|
| 91 | * (5,0) vz \n
|
---|
| 92 | *
|
---|
| 93 | * \return Output matrix
|
---|
| 94 | */
|
---|
| 95 | core::Matrix *Output(void) const;
|
---|
| 96 |
|
---|
| 97 | /*!
|
---|
| 98 | * \brief x plot
|
---|
| 99 | *
|
---|
| 100 | * \return x plot
|
---|
| 101 | */
|
---|
| 102 | gui::DataPlot1D *xPlot(void) const;
|
---|
| 103 |
|
---|
| 104 | /*!
|
---|
| 105 | * \brief y plot
|
---|
| 106 | *
|
---|
| 107 | * \return y plot
|
---|
| 108 | */
|
---|
| 109 | gui::DataPlot1D *yPlot(void) const;
|
---|
| 110 |
|
---|
| 111 | /*!
|
---|
| 112 | * \brief z plot
|
---|
| 113 | *
|
---|
| 114 | * \return z plot
|
---|
| 115 | */
|
---|
| 116 | gui::DataPlot1D *zPlot(void) const;
|
---|
| 117 |
|
---|
| 118 | /*!
|
---|
| 119 | * \brief vx plot
|
---|
| 120 | *
|
---|
| 121 | * \return vx plot
|
---|
| 122 | */
|
---|
| 123 | gui::DataPlot1D *vxPlot(void) const;
|
---|
| 124 |
|
---|
| 125 | /*!
|
---|
| 126 | * \brief vy plot
|
---|
| 127 | *
|
---|
| 128 | * \return vy plot
|
---|
| 129 | */
|
---|
| 130 | gui::DataPlot1D *vyPlot(void) const;
|
---|
| 131 |
|
---|
| 132 | /*!
|
---|
| 133 | * \brief vz plot
|
---|
| 134 | *
|
---|
| 135 | * \return vz plot
|
---|
| 136 | */
|
---|
| 137 | gui::DataPlot1D *vzPlot(void) const;
|
---|
| 138 |
|
---|
| 139 | protected:
|
---|
| 140 | /*!
|
---|
| 141 | * \brief Set datas and call process update
|
---|
| 142 | *
|
---|
| 143 | * \param position position
|
---|
| 144 | * \param velocity velocity
|
---|
| 145 | * \param time time
|
---|
| 146 | */
|
---|
| 147 | void SetDatas(const core::Vector3Df &position,const core::Vector3Df &velocity,const core::Time time);
|
---|
| 148 |
|
---|
| 149 |
|
---|
| 150 | private:
|
---|
| 151 | /*!
|
---|
| 152 | * \brief Update using provided datas
|
---|
| 153 | *
|
---|
| 154 | * Reimplemented from IODevice.
|
---|
| 155 | *
|
---|
| 156 | * \param data data from the parent to process
|
---|
| 157 | */
|
---|
| 158 | void UpdateFrom(const core::io_data *data){};
|
---|
| 159 |
|
---|
| 160 | class NEDPosition_impl *pimpl_;
|
---|
| 161 | };
|
---|
| 162 | } // end namespace sensor
|
---|
| 163 | } // end namespace flair
|
---|
| 164 | #endif // NEDPOSITION_H
|
---|