26#include "traffic/TrafficDataSource_AbstractSocket.h"
27#include "traffic/TrafficDataSource_OgnParser.h"
29using namespace Qt::Literals::StringLiterals;
85 [[nodiscard]] QString
dataFormat()
const override {
return u
"APRS-IS"_s; }
91 [[nodiscard]] QString
host()
const
103 [[nodiscard]] QString
icon()
const override {
return u
"/icons/material/ic_wifi.svg"_s; }
114 return tr(
"Open Glider Network-Connection");
121 [[nodiscard]] quint16
port()
const
150 void sendPosition(
const QGeoCoordinate& coordinate,
double course,
double speed,
double altitude);
162 QTextStream m_textStream;
166 Traffic::Ogn::OgnMessage m_ognMessage;
172 Traffic::AircraftType m_aircraftType = {Traffic::AircraftType::Aircraft};
178 void periodicUpdate();
181 void sendKeepAlive();
184 void verifyConnection();
TrafficDataSource_AbstractSocket(bool isCanonical, QObject *parent)
Default constructor.
void connectToTrafficReceiver() override
Start attempt to connect to traffic receiver.
QString dataFormat() const override
Getter function for the property with the same name.
void sendPosition(const QGeoCoordinate &coordinate, double course, double speed, double altitude)
Send position report to APRS-IS server.
void disconnectFromTrafficReceiver() override
Disconnect from traffic receiver.
quint16 port() const
Getter function for the property with the same name.
TrafficDataSource_Ogn(bool isCanonical, QString hostName, quint16 port, QObject *parent=nullptr)
Default constructor.
QString host() const
Getter function for the property with the same name.
QString icon() const override
Getter function for the property with the same name.
auto sourceName() const -> QString override
Getter function for the property with the same name.
Convenience class for distance computations.
static Q_INVOKABLE constexpr Units::Distance fromKM(double distanceInKM)
Constructs a distance.