Flair
Framework Libre Air
SimuGps.h
Go to the documentation of this file.
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}
13 #ifndef SIMUGPS_H
14 #define SIMUGPS_H
15 
16 #include <Thread.h>
17 #include <NmeaGps.h>
18 
19 namespace flair {
20  namespace core {
21  class SharedMem;
22  }
23  namespace gui {
24  class SpinBox;
25  class DoubleSpinBox;
26  }
27 }
28 
29 namespace flair {
30 namespace sensor {
35 class SimuGps : public core::Thread, public NmeaGps {
36 public:
49  SimuGps(std::string name,
50  NmeaGps::NMEAFlags_t NMEAFlags, uint32_t modelId,uint32_t deviceId,uint8_t priority);
51 
63  SimuGps(const core::IODevice *parent, std::string name, uint32_t modelId,uint32_t deviceId);
64 
69  ~SimuGps();
70 
71 private:
79  void UpdateFrom(const core::io_data *data);
80 
87  void Run(void);
88 
89  typedef struct {
90  float e;
91  float n;
92  float u;
93  float ve;
94  float vn;
95  } gps_states_t;
96 
97  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
98 
99  core::SharedMem *shmem;
100  gui::SpinBox *dataRate,*fixQuality,*numberOfSatellites;
101  gui::DoubleSpinBox *latitudeRef,*longitudeRef,*altitudeRef;
102 };
103 } // end namespace sensor
104 } // end namespace flair
105 #endif // SIMUGPS_H
Abstract class for data types.
Definition: io_data.h:94
Abstract class for input/ouput system.
Definition: IODevice.h:45
namespace of the flair Framework
Definition: Ahrs.h:19
~SimuGps()
Destructor.
Class displaying a QSpinBox on the ground station.
Definition: SpinBox.h:28
Class for a simulation GPS.
Definition: SimuGps.h:35
Base class for GPS using NMEA sentances.
Base class for GPS using NMEA sentances.
Definition: NmeaGps.h:45
NMEAFlags_t
NMEA flags.
Definition: NmeaGps.h:51
Abstract class for a thread.
Class defining a shared memory.
Definition: SharedMem.h:32
Abstract class for a thread.
Definition: Thread.h:38
Class displaying a QDoubleSpinBox on the ground station.
Definition: DoubleSpinBox.h:28
SimuGps(std::string name, NmeaGps::NMEAFlags_t NMEAFlags, uint32_t modelId, uint32_t deviceId, uint8_t priority)
Constructor.