-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GPS: Move FactGroup from Vehicle to GPS
- Loading branch information
Showing
12 changed files
with
121 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/**************************************************************************** | ||
* | ||
* (c) 2009-2024 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> | ||
* | ||
* QGroundControl is licensed according to the terms in the file | ||
* COPYING.md in the root of the source code directory. | ||
* | ||
****************************************************************************/ | ||
|
||
#include "GPSRTKFactGroup.h" | ||
#include "QGCLoggingCategory.h" | ||
|
||
QGC_LOGGING_CATEGORY(GPSRTKFactGroupLog, "qgc.gps.gpsrtkfactgroup") | ||
|
||
GPSRTKFactGroup::GPSRTKFactGroup(QObject *parent) | ||
: FactGroup(1000, ":/json/Vehicle/GPSRTKFact.json", parent) | ||
, _connected(new Fact(0, _connectedFactName, FactMetaData::valueTypeBool, this)) | ||
, _currentDuration(new Fact(0, _currentDurationFactName, FactMetaData::valueTypeDouble, this)) | ||
, _currentAccuracy(new Fact(0, _currentAccuracyFactName, FactMetaData::valueTypeDouble, this)) | ||
, _currentLatitude(new Fact(0, _currentLatitudeFactName, FactMetaData::valueTypeDouble, this)) | ||
, _currentLongitude(new Fact(0, _currentLongitudeFactName, FactMetaData::valueTypeDouble, this)) | ||
, _currentAltitude(new Fact(0, _currentAltitudeFactName, FactMetaData::valueTypeFloat, this)) | ||
, _valid(new Fact(0, _validFactName, FactMetaData::valueTypeBool, this)) | ||
, _active(new Fact(0, _activeFactName, FactMetaData::valueTypeBool, this)) | ||
, _numSatellites(new Fact(0, _numSatellitesFactName, FactMetaData::valueTypeInt32, this)) | ||
{ | ||
// qCDebug(GPSRTKFactGroupLog) << Q_FUNC_INFO << this; | ||
|
||
_addFact(_connected, _connectedFactName); | ||
_addFact(_currentDuration, _currentDurationFactName); | ||
_addFact(_currentAccuracy, _currentAccuracyFactName); | ||
_addFact(_currentLatitude, _currentLatitudeFactName); | ||
_addFact(_currentLongitude, _currentLongitudeFactName); | ||
_addFact(_currentAltitude, _currentAltitudeFactName); | ||
_addFact(_valid, _validFactName); | ||
_addFact(_active, _activeFactName); | ||
_addFact(_numSatellites, _numSatellitesFactName); | ||
} | ||
|
||
GPSRTKFactGroup::~GPSRTKFactGroup() | ||
{ | ||
// qCDebug(GPSRTKFactGroupLog) << Q_FUNC_INFO << this; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/**************************************************************************** | ||
* | ||
* (c) 2009-2024 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> | ||
* | ||
* QGroundControl is licensed according to the terms in the file | ||
* COPYING.md in the root of the source code directory. | ||
* | ||
****************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <QtCore/QLoggingCategory> | ||
|
||
#include "FactGroup.h" | ||
|
||
Q_DECLARE_LOGGING_CATEGORY(GPSRTKFactGroupLog) | ||
|
||
class GPSRTKFactGroup : public FactGroup | ||
{ | ||
Q_OBJECT | ||
Q_PROPERTY(Fact *connected READ connected CONSTANT) | ||
Q_PROPERTY(Fact *currentDuration READ currentDuration CONSTANT) | ||
Q_PROPERTY(Fact *currentAccuracy READ currentAccuracy CONSTANT) | ||
Q_PROPERTY(Fact *currentLatitude READ currentLatitude CONSTANT) | ||
Q_PROPERTY(Fact *currentLongitude READ currentLongitude CONSTANT) | ||
Q_PROPERTY(Fact *currentAltitude READ currentAltitude CONSTANT) | ||
Q_PROPERTY(Fact *valid READ valid CONSTANT) | ||
Q_PROPERTY(Fact *active READ active CONSTANT) | ||
Q_PROPERTY(Fact *numSatellites READ numSatellites CONSTANT) | ||
|
||
public: | ||
explicit GPSRTKFactGroup(QObject* parent = nullptr); | ||
~GPSRTKFactGroup(); | ||
|
||
Fact *connected() const { return _connected; } | ||
Fact *currentDuration() const { return _currentDuration; } | ||
Fact *currentAccuracy() const { return _currentAccuracy; } | ||
Fact *currentLatitude() const { return _currentLatitude; } | ||
Fact *currentLongitude() const { return _currentLongitude; } | ||
Fact *currentAltitude() const { return _currentAltitude; } | ||
Fact *valid() const { return _valid; } | ||
Fact *active() const { return _active; } | ||
Fact *numSatellites() const { return _numSatellites; } | ||
|
||
private: | ||
const QString _connectedFactName = QStringLiteral("connected"); | ||
const QString _currentAccuracyFactName = QStringLiteral("currentAccuracy"); | ||
const QString _currentDurationFactName = QStringLiteral("currentDuration"); | ||
const QString _currentLatitudeFactName = QStringLiteral("currentLatitude"); | ||
const QString _currentLongitudeFactName = QStringLiteral("currentLongitude"); | ||
const QString _currentAltitudeFactName = QStringLiteral("currentAltitude"); | ||
const QString _validFactName = QStringLiteral("valid"); | ||
const QString _activeFactName = QStringLiteral("active"); | ||
const QString _numSatellitesFactName = QStringLiteral("numSatellites"); | ||
|
||
Fact *_connected = nullptr; ///< is an RTK gps connected? | ||
Fact *_currentDuration = nullptr; ///< survey-in status in [s] | ||
Fact *_currentAccuracy = nullptr; ///< survey-in accuracy in [mm] | ||
Fact *_currentLatitude = nullptr; ///< survey-in latitude | ||
Fact *_currentLongitude = nullptr; ///< survey-in latitude | ||
Fact *_currentAltitude = nullptr; ///< survey-in latitude | ||
Fact *_valid = nullptr; ///< survey-in complete? | ||
Fact *_active = nullptr; ///< survey-in active? | ||
Fact *_numSatellites = nullptr; ///< number of satellites | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.