source: flair-dev/trunk/include/FlairSensorActuator/SimuGps.h@ 35

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

doc

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