5#include "development/mavlink_msg_gnss_integrity.h"
7#include <QtPositioning/QGeoCoordinate>
10 :
FactGroup(1000,
":/json/Vehicle/GPSFact.json", parent)
50 switch (message.msgid) {
51 case MAVLINK_MSG_ID_GPS_RAW_INT:
54 case MAVLINK_MSG_ID_HIGH_LATENCY:
57 case MAVLINK_MSG_ID_HIGH_LATENCY2:
60 case MAVLINK_MSG_ID_GNSS_INTEGRITY:
70 mavlink_gps_raw_int_t gpsRawInt{};
71 mavlink_msg_gps_raw_int_decode(&message, &gpsRawInt);
76 count()->
setRawValue((gpsRawInt.satellites_visible == 255) ? 0 : gpsRawInt.satellites_visible);
77 hdop()->
setRawValue((gpsRawInt.eph == UINT16_MAX) ? qQNaN() : (gpsRawInt.eph / 100.0));
78 vdop()->
setRawValue((gpsRawInt.epv == UINT16_MAX) ? qQNaN() : (gpsRawInt.epv / 100.0));
80 yaw()->
setRawValue((gpsRawInt.yaw == UINT16_MAX) ? qQNaN() : (gpsRawInt.yaw / 100.0));
88 mavlink_high_latency_t highLatency{};
89 mavlink_msg_high_latency_decode(&message, &highLatency);
102 mavlink_msg_high_latency2_decode(&message, &highLatency2);
108 hdop()->
setRawValue((highLatency2.eph == UINT8_MAX) ? qQNaN() : (highLatency2.eph / 10.0));
109 vdop()->
setRawValue((highLatency2.epv == UINT8_MAX) ? qQNaN() : (highLatency2.epv / 10.0));
116 mavlink_gnss_integrity_t gnssIntegrity;
117 mavlink_msg_gnss_integrity_decode(&message, &gnssIntegrity);
struct __mavlink_message mavlink_message_t
Geographic coordinate conversion utilities using GeographicLib.
struct __mavlink_high_latency2_t mavlink_high_latency2_t
Used to group Facts together into an object hierarachy.
void _setTelemetryAvailable(bool telemetryAvailable)
void _addFact(Fact *fact, const QString &name)
void setRawValue(const QVariant &value)
Fact _gnssSignalQualityFact
void _handleHighLatency2(const mavlink_message_t &message)
Fact * authenticationState()
Fact _authenticationStateFact
Fact * postProcessingQuality()
Fact _courseOverGroundFact
void handleMessage(Vehicle *vehicle, const mavlink_message_t &message) override
Allows a FactGroup to parse incoming messages and fill in values.
void _handleHighLatency(const mavlink_message_t &message)
VehicleGPSFactGroup(QObject *parent=nullptr)
Fact * correctionsQuality()
Fact * gnssSignalQuality()
Fact _postProcessingQualityFact
Fact _correctionsQualityFact
void _handleGpsRawInt(const mavlink_message_t &message)
void _handleGnssIntegrity(const mavlink_message_t &message)
void gnssIntegrityReceived()
Fact * courseOverGround()
QString convertGeoToMGRS(const QGeoCoordinate &coord)