QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSRtk.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QObject>
4#include <QtCore/QString>
5
6#include "GPSProvider.h"
7#include "satellite_info.h"
8#include "sensor_gps.h"
9
10class GPSRTKFactGroup;
11class FactGroup;
12
13class GPSRtk : public QObject
14{
15 Q_OBJECT
16
17public:
18 explicit GPSRtk(QObject* parent = nullptr);
19 ~GPSRtk();
20
21 void connectGPS(const QString& device, QStringView gps_type);
22 void disconnectGPS();
23 bool connected() const;
25
27 {
28 uint8_t inView = 0;
29 int used = 0;
30 };
31
34
35private slots:
36 void _satelliteInfoUpdate(const satellite_info_s& msg);
37 void _sensorGpsUpdate(const sensor_gps_s& msg);
38 void _onGPSConnect();
39 void _onGPSDisconnect();
40 void _onGPSConnectionError(GPSConnectionError error);
41 void _onGPSSurveyInStatus(const GPSSurveyInStatus& status);
42
43private:
44 GPSProvider* _gpsProvider = nullptr;
45 GPSRTKFactGroup* _gpsRtkFactGroup = nullptr;
46
47 std::atomic_bool _requestGpsStop = false;
48
49 static constexpr uint32_t kGPSThreadDisconnectTimeout = 2000;
50};
GPSConnectionError
Definition GPSProvider.h:16
Error error
Used to group Facts together into an object hierarachy.
Definition FactGroup.h:16
void disconnectGPS()
Definition GPSRtk.cc:140
static SatelliteCounts countSatellites(const satellite_info_s &msg)
Clamp count to the array bound and tally used-in-solution satellites.
Definition GPSRtk.cc:165
~GPSRtk()
Definition GPSRtk.cc:40
void connectGPS(const QString &device, QStringView gps_type)
Definition GPSRtk.cc:87
FactGroup * gpsRtkFactGroup()
Definition GPSRtk.cc:160
bool connected() const
Definition GPSRtk.cc:155
Survey-in progress, translated from the px4 SurveyInStatus.
Definition GPSDriver.h:32