GPSRTKFactGroup.h 2.63 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
/****************************************************************************
 *
 *   (c) 2017 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 "Vehicle.h"

class GPSRTKFactGroup : public FactGroup
{
    Q_OBJECT

public:
20
    GPSRTKFactGroup(QObject* parent = nullptr);
21 22 23 24

    Q_PROPERTY(Fact* connected            READ connected            CONSTANT)
    Q_PROPERTY(Fact* currentDuration      READ currentDuration      CONSTANT)
    Q_PROPERTY(Fact* currentAccuracy      READ currentAccuracy      CONSTANT)
25 26 27
    Q_PROPERTY(Fact* currentLatitude      READ currentLatitude      CONSTANT)
    Q_PROPERTY(Fact* currentLongitude     READ currentLongitude      CONSTANT)
    Q_PROPERTY(Fact* currentAltitude      READ currentAltitude      CONSTANT)
28 29 30 31
    Q_PROPERTY(Fact* valid                READ valid                CONSTANT)
    Q_PROPERTY(Fact* active               READ active               CONSTANT)
    Q_PROPERTY(Fact* numSatellites        READ numSatellites        CONSTANT)

32 33 34 35 36 37 38 39 40
    Fact* connected         (void) { return &_connected; }
    Fact* currentDuration   (void) { return &_currentDuration; }
    Fact* currentAccuracy   (void) { return &_currentAccuracy; }
    Fact* currentLatitude   (void) { return &_currentLatitude; }
    Fact* currentLongitude  (void) { return &_currentLongitude; }
    Fact* currentAltitude   (void) { return &_currentAltitude; }
    Fact* valid             (void) { return &_valid; }
    Fact* active            (void) { return &_active; }
    Fact* numSatellites     (void) { return &_numSatellites; }
41 42 43 44

    static const char* _connectedFactName;
    static const char* _currentDurationFactName;
    static const char* _currentAccuracyFactName;
45 46 47
    static const char* _currentLatitudeFactName;
    static const char* _currentLongitudeFactName;
    static const char* _currentAltitudeFactName;
48 49 50 51 52
    static const char* _validFactName;
    static const char* _activeFactName;
    static const char* _numSatellitesFactName;

private:
53 54 55 56 57 58 59 60 61
    Fact _connected;        ///< is an RTK gps connected?
    Fact _currentDuration;  ///< survey-in status in [s]
    Fact _currentAccuracy;  ///< survey-in accuracy in [mm]
    Fact _currentLatitude;  ///< survey-in latitude
    Fact _currentLongitude; ///< survey-in latitude
    Fact _currentAltitude;  ///< survey-in latitude
    Fact _valid;            ///< survey-in complete?
    Fact _active;           ///< survey-in active?
    Fact _numSatellites;    ///< number of satellites
62
};