source: flair-src/branches/mavlink/lib/FlairSensorActuator/src/SimuImu.h@ 112

Last change on this file since 112 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 1.8 KB
Line 
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 SimuImu.h
7 * \brief Class for a simulation Imu
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/02/07
10 * \version 4.0
11 */
12
13#ifndef SIMUIMU_H
14#define SIMUIMU_H
15
16#include <Imu.h>
17#include <Thread.h>
18
19namespace flair {
20namespace core {
21class SharedMem;
22class AhrsData;
23}
24namespace gui {
25class SpinBox;
26}
27}
28
29namespace flair {
30namespace sensor {
31/*! \class SimuImu
32*
33* \brief Class for a simulation Imu
34*/
35class SimuImu : public Imu, public core::Thread {
36public:
37 /*!
38 * \brief Constructor
39 *
40 * Construct a SimuImu. Control part.
41 *
42 * \param parent parent
43 * \param name name
44 * \param dev_id device id
45 * \param priority priority of the Thread
46 */
47 SimuImu(const core::FrameworkManager *parent, std::string name,
48 uint32_t dev_id, uint8_t priority);
49
50 /*!
51 * \brief Constructor
52 *
53 * Construct a SimuImu. Simulation part.\n
54 * The Thread of this class should not be run.
55 *
56 * \param parent parent
57 * \param name name
58 * \param dev_id device id
59 */
60 SimuImu(const core::IODevice *parent, std::string name, uint32_t dev_id);
61
62 /*!
63 * \brief Destructor
64 *
65 */
66 ~SimuImu();
67
68private:
69 /*!
70 * \brief Run function
71 *
72 * Reimplemented from Thread.
73 *
74 */
75 void Run(void);
76
77 /*!
78 * \brief Update using provided datas
79 *
80 * Reimplemented from IODevice.
81 *
82 * \param data data from the parent to process
83 */
84 void UpdateFrom(const core::io_data *data);
85
86 typedef struct {
87 float q0;
88 float q1;
89 float q2;
90 float q3;
91 float wx;
92 float wy;
93 float wz;
94 } imu_states_t;
95 gui::SpinBox *data_rate;
96 core::SharedMem *shmem;
97 core::AhrsData *ahrsData;
98};
99} // end namespace sensor
100} // end namespace flair
101#endif // SIMUIMU_H
Note: See TracBrowser for help on using the repository browser.