26#include "traffic/TrafficDataSource_AbstractSocket.h"
27#include "traffic/TrafficDataSource_OgnParser.h"
29using namespace Qt::Literals::StringLiterals;
93 [[nodiscard]] QString
dataFormat()
const override {
return u
"APRS-IS"_s; }
99 [[nodiscard]] QString
host()
const
111 [[nodiscard]] QString
icon()
const override {
return u
"/icons/material/ic_wifi.svg"_s; }
122 return tr(
"OGN glidernet.org APRS-IS connection");
129 [[nodiscard]] quint16
port()
const
158 void sendPosition(
const QGeoCoordinate& coordinate,
double course,
double speed,
double altitude);
170 QTextStream m_textStream;
174 Traffic::Ogn::OgnMessage m_ognMessage;
180 Traffic::AircraftType m_aircraftType = {Traffic::AircraftType::Aircraft};
186 void periodicUpdate();
189 void sendKeepAlive();
192 void verifyConnection();
Connection to a traffic data receiver.
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.
Traffic::ConnectionInfo connectionInfo() const override
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.
Constructor parameter for OGN connections.