Flair
Framework Libre Air
SimulatedGps.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 SimulatedGPS_H
14 #define SimulatedGPS_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 SimulatedGps : public core::Thread, public NmeaGps {
36 public:
49  SimulatedGps(std::string name,
50  NmeaGps::NMEAFlags_t NMEAFlags, uint32_t modelId,uint32_t deviceId,uint8_t priority);
51 
56  ~SimulatedGps();
57 
58 private:
66  void UpdateFrom(const core::io_data *data){};
67 
74  void Run(void);
75 
76  typedef struct {
77  float e;
78  float n;
79  float u;
80  float ve;
81  float vn;
82  } gps_states_t;
83 
84  std::string ShMemName(uint32_t modelId,uint32_t deviceId);
85 
86  core::SharedMem *shmem;
87  gui::SpinBox *dataRate,*fixQuality,*numberOfSatellites;
88  gui::DoubleSpinBox *latitudeRef,*longitudeRef,*altitudeRef,*magneticDeclination;
89 };
90 } // end namespace sensor
91 } // end namespace flair
92 #endif // SIMULATEDGPS_H
Abstract class for data types.
Definition: io_data.h:94
namespace of the flair Framework
Definition: Ahrs.h:19
Class displaying a QSpinBox on the ground station.
Definition: SpinBox.h:28
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
Class for a simulation GPS.
Definition: SimulatedGps.h:35
SimulatedGps(std::string name, NmeaGps::NMEAFlags_t NMEAFlags, uint32_t modelId, uint32_t deviceId, uint8_t priority)
Constructor.