source: flair-src/trunk/lib/FlairSensorActuator/src/SimuImu.h@ 102

Last change on this file since 102 was 55, checked in by Sanahuja Guillaume, 8 years ago

simu gps

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 {
20 namespace core {
21 class SharedMem;
22 class AhrsData;
23 }
24 namespace gui {
25 class 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
96 gui::SpinBox *dataRate;
97 core::SharedMem *shmem;
98 core::AhrsData *ahrsData;
99};
100} // end namespace sensor
101} // end namespace flair
102#endif // SIMUIMU_H
Note: See TracBrowser for help on using the repository browser.