Support different map types (Aviation, Street and Satellite) Add display of airspaces and NAVAIDs. Display photo of highlighted aircraft.chirpmodem-v8.0.0
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 826 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 603 KiB After Width: | Height: | Size: 490 KiB |
|
After Width: | Height: | Size: 570 KiB |
|
After Width: | Height: | Size: 24 KiB |
@ -0,0 +1,18 @@
@@ -0,0 +1,18 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "adsbosmtemplateserver.h" |
||||
@ -0,0 +1,155 @@
@@ -0,0 +1,155 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_ADSBOSMTEMPLATE_SERVER_H_ |
||||
#define INCLUDE_ADSBOSMTEMPLATE_SERVER_H_ |
||||
|
||||
#include <QTcpServer> |
||||
#include <QTcpSocket> |
||||
#include <QDebug> |
||||
|
||||
// Redirect OSM maps so we can support Street, Satellite and an Aviation map (CartoDB position)
|
||||
class ADSBOSMTemplateServer : public QTcpServer |
||||
{ |
||||
Q_OBJECT |
||||
private: |
||||
QString m_thunderforestAPIKey; |
||||
QString m_maptilerAPIKey; |
||||
|
||||
public: |
||||
// port - port to listen on / is listening on. Use 0 for any free port.
|
||||
ADSBOSMTemplateServer(const QString &maptilerAPIKey, quint16 &port, QObject* parent = 0) : |
||||
QTcpServer(parent), |
||||
m_maptilerAPIKey(maptilerAPIKey) |
||||
{ |
||||
listen(QHostAddress::Any, port); |
||||
port = serverPort(); |
||||
} |
||||
|
||||
void incomingConnection(qintptr socket) override |
||||
{ |
||||
QTcpSocket* s = new QTcpSocket(this); |
||||
connect(s, SIGNAL(readyRead()), this, SLOT(readClient())); |
||||
connect(s, SIGNAL(disconnected()), this, SLOT(discardClient())); |
||||
s->setSocketDescriptor(socket); |
||||
//addPendingConnection(socket);
|
||||
} |
||||
|
||||
private slots: |
||||
void readClient() |
||||
{ |
||||
QTcpSocket* socket = (QTcpSocket*)sender(); |
||||
if (socket->canReadLine()) |
||||
{ |
||||
QString line = socket->readLine(); |
||||
QStringList tokens = QString(line).split(QRegExp("[ \r\n][ \r\n]*")); |
||||
if (tokens[0] == "GET") |
||||
{ |
||||
bool hires = tokens[1].contains("hires"); |
||||
QString hiresURL = hires ? "@2x" : ""; |
||||
QString xml; |
||||
if ((tokens[1] == "/street") || (tokens[1] == "/street-hires")) |
||||
{ |
||||
xml = QString("\
|
||||
{\
|
||||
\"UrlTemplate\" : \"https://maps.wikimedia.org/osm-intl/%z/%x/%y%1.png\",\
|
||||
\"ImageFormat\" : \"png\",\
|
||||
\"QImageFormat\" : \"Indexed8\",\
|
||||
\"ID\" : \"wmf-intl-%2x\",\
|
||||
\"MaximumZoomLevel\" : 18,\
|
||||
\"MapCopyRight\" : \"<a href='https://wikimediafoundation.org/wiki/Terms_of_Use'>WikiMedia Foundation</a>\",\
|
||||
\"DataCopyRight\" : \"<a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors\"\
|
||||
}").arg(hiresURL).arg(hires ? 1 : 2); |
||||
} |
||||
else if (tokens[1] == "/satellite") |
||||
{ |
||||
xml = QString("\
|
||||
{\
|
||||
\"Enabled\" : true,\
|
||||
\"UrlTemplate\" : \"https://api.maptiler.com/tiles/satellite/%z/%x/%y%1.jpg?key=%2\",\
|
||||
\"ImageFormat\" : \"jpg\",\
|
||||
\"QImageFormat\" : \"RGB888\",\
|
||||
\"ID\" : \"usgs-l7\",\
|
||||
\"MaximumZoomLevel\" : 20,\
|
||||
\"MapCopyRight\" : \"<a href='http://maptiler.com'>Maptiler</a>\",\
|
||||
\"DataCopyRight\" : \"<a href='http://maptiler.com'>Maptiler</a>\"\
|
||||
}").arg(hiresURL).arg(m_maptilerAPIKey); |
||||
} |
||||
else if (tokens[1].contains("transit")) |
||||
{ |
||||
QStringList map({"/night-transit", "/night-transit-hires", "/transit", "/transit-hires"}); |
||||
QStringList mapId({"thf-nighttransit", "thf-nighttransit-hires", "thf-transit", "thf-transit-hires"}); |
||||
QStringList mapUrl({"dark_nolabels", "dark_nolabels", "light_nolabels", "light_nolabels"}); |
||||
|
||||
// Use CartoDB maps without labels for aviation maps
|
||||
int idx = map.indexOf(tokens[1]); |
||||
xml = QString("\
|
||||
{\
|
||||
\"UrlTemplate\" : \"http://1.basemaps.cartocdn.com/%2/%z/%x/%y.png%1\",\
|
||||
\"ImageFormat\" : \"png\",\
|
||||
\"QImageFormat\" : \"Indexed8\",\
|
||||
\"ID\" : \"%3\",\
|
||||
\"MaximumZoomLevel\" : 20,\
|
||||
\"MapCopyRight\" : \"<a href='https://carto.com'>CartoDB</a>\",\
|
||||
\"DataCopyRight\" : \"<a href='https://carto.com'>CartoDB</a>\"\
|
||||
}").arg(hiresURL).arg(mapUrl[idx]).arg(mapId[idx]); |
||||
} |
||||
else |
||||
{ |
||||
QStringList map({"/cycle", "/cycle-hires", "/hiking", "/hiking-hires", "/night-transit", "/night-transit-hires", "/terrain", "/terrain-hires", "/transit", "/transit-hires"}); |
||||
QStringList mapId({"thf-cycle", "thf-cycle-hires", "thf-hike", "thf-hike-hires", "thf-nighttransit", "thf-nighttransit-hires", "thf-landsc", "thf-landsc-hires", "thf-transit", "thf-transit-hires"}); |
||||
QStringList mapUrl({"cycle", "cycle", "outdoors", "outdoors", "transport-dark", "transport-dark", "landscape", "landscape", "transport", "transport"}); |
||||
|
||||
int idx = map.indexOf(tokens[1]); |
||||
if (idx != -1) |
||||
{ |
||||
xml = QString("\
|
||||
{\
|
||||
\"UrlTemplate\" : \"http://a.tile.thunderforest.com/%1/%z/%x/%y%4.png?apikey=%2\",\
|
||||
\"ImageFormat\" : \"png\",\
|
||||
\"QImageFormat\" : \"Indexed8\",\
|
||||
\"ID\" : \"%3\",\
|
||||
\"MaximumZoomLevel\" : 20,\
|
||||
\"MapCopyRight\" : \"<a href='http://www.thunderforest.com/'>Thunderforest</a>\",\
|
||||
\"DataCopyRight\" : \"<a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors\"\
|
||||
}").arg(mapUrl[idx]).arg("3e1f614f78a345459931ba3c898e975e").arg(mapId[idx]).arg(hiresURL); |
||||
} |
||||
} |
||||
QTextStream os(socket); |
||||
os.setAutoDetectUnicode(true); |
||||
os << "HTTP/1.0 200 Ok\r\n" |
||||
"Content-Type: text/html; charset=\"utf-8\"\r\n" |
||||
"\r\n" |
||||
<< xml << "\n"; |
||||
socket->close(); |
||||
|
||||
if (socket->state() == QTcpSocket::UnconnectedState) { |
||||
delete socket; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
void discardClient() |
||||
{ |
||||
QTcpSocket* socket = (QTcpSocket*)sender(); |
||||
socket->deleteLater(); |
||||
} |
||||
|
||||
}; |
||||
|
||||
#endif |
||||
|
After Width: | Height: | Size: 365 B |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 674 B |
|
After Width: | Height: | Size: 652 B |
|
After Width: | Height: | Size: 415 B |
|
After Width: | Height: | Size: 847 B |
@ -0,0 +1,422 @@
@@ -0,0 +1,422 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "openaip.h" |
||||
|
||||
const QStringList OpenAIP::m_countryCodes = { |
||||
"ad", |
||||
"ae", |
||||
"af", |
||||
"ag", |
||||
"ai", |
||||
"al", |
||||
"am", |
||||
"an", |
||||
"ao", |
||||
"aq", |
||||
"ar", |
||||
"as", |
||||
"at", |
||||
"au", |
||||
"aw", |
||||
"ax", |
||||
"az", |
||||
"ba", |
||||
"bb", |
||||
"bd", |
||||
"be", |
||||
"bf", |
||||
"bg", |
||||
"bh", |
||||
"bi", |
||||
"bj", |
||||
"bl", |
||||
"bm", |
||||
"bn", |
||||
"bo", |
||||
"bq", |
||||
"br", |
||||
"bs", |
||||
"bt", |
||||
"bv", |
||||
"bw", |
||||
"by", |
||||
"bz", |
||||
"ca", |
||||
"cc", |
||||
"cd", |
||||
"cf", |
||||
"cg", |
||||
"ch", |
||||
"ci", |
||||
"ck", |
||||
"cl", |
||||
"cm", |
||||
"cn", |
||||
"co", |
||||
"cr", |
||||
"cu", |
||||
"cv", |
||||
"cw", |
||||
"cx", |
||||
"cy", |
||||
"cz", |
||||
"de", |
||||
"dj", |
||||
"dk", |
||||
"dm", |
||||
"do", |
||||
"dz", |
||||
"ec", |
||||
"ee", |
||||
"eg", |
||||
"eh", |
||||
"er", |
||||
"es", |
||||
"et", |
||||
"fi", |
||||
"fj", |
||||
"fk", |
||||
"fm", |
||||
"fo", |
||||
"fr", |
||||
"ga", |
||||
"gb", |
||||
"ge", |
||||
"gf", |
||||
"gg", |
||||
"gh", |
||||
"gi", |
||||
"gl", |
||||
"gm", |
||||
"gn", |
||||
"gp", |
||||
"gq", |
||||
"gr", |
||||
"gs", |
||||
"gt", |
||||
"gu", |
||||
"gw", |
||||
"gy", |
||||
"hk", |
||||
"hm", |
||||
"hn", |
||||
"hr", |
||||
"hu", |
||||
"id", |
||||
"ie", |
||||
"il", |
||||
"im", |
||||
"in", |
||||
"io", |
||||
"iq", |
||||
"ir", |
||||
"is", |
||||
"it", |
||||
"je", |
||||
"jm", |
||||
"jo", |
||||
"jp", |
||||
"ke", |
||||
"kg", |
||||
"kh", |
||||
"ki", |
||||
"km", |
||||
"kn", |
||||
"kp", |
||||
"kr", |
||||
"kw", |
||||
"ky", |
||||
"kz", |
||||
"la", |
||||
"lb", |
||||
"lc", |
||||
"li", |
||||
"lk", |
||||
"lr", |
||||
"ls", |
||||
"lt", |
||||
"lu", |
||||
"lv", |
||||
"ly", |
||||
"ma", |
||||
"mc", |
||||
"md", |
||||
"me", |
||||
"mf", |
||||
"mg", |
||||
"mh", |
||||
"mk", |
||||
"ml", |
||||
"mm", |
||||
"mn", |
||||
"mo", |
||||
"mp", |
||||
"mq", |
||||
"mr", |
||||
"ms", |
||||
"mt", |
||||
"mu", |
||||
"mv", |
||||
"mw", |
||||
"mx", |
||||
"my", |
||||
"mz", |
||||
"na", |
||||
"nc", |
||||
"ne", |
||||
"nf", |
||||
"ng", |
||||
"ni", |
||||
"nl", |
||||
"no", |
||||
"np", |
||||
"nr", |
||||
"nu", |
||||
"nz", |
||||
"om", |
||||
"pa", |
||||
"pe", |
||||
"pf", |
||||
"pg", |
||||
"ph", |
||||
"pk", |
||||
"pl", |
||||
"pm", |
||||
"pn", |
||||
"pr", |
||||
"ps", |
||||
"pt", |
||||
"pw", |
||||
"py", |
||||
"qa", |
||||
"re", |
||||
"ro", |
||||
"rs", |
||||
"ru", |
||||
"rw", |
||||
"sa", |
||||
"sb", |
||||
"sc", |
||||
"sd", |
||||
"se", |
||||
"sg", |
||||
"sh", |
||||
"si", |
||||
"sj", |
||||
"sk", |
||||
"sl", |
||||
"sm", |
||||
"sn", |
||||
"so", |
||||
"sr", |
||||
"ss", |
||||
"st", |
||||
"sv", |
||||
"sx", |
||||
"sy", |
||||
"sz", |
||||
"tc", |
||||
"td", |
||||
"tf", |
||||
"tg", |
||||
"th", |
||||
"tj", |
||||
"tk", |
||||
"tl", |
||||
"tm", |
||||
"tn", |
||||
"to", |
||||
"tr", |
||||
"tt", |
||||
"tv", |
||||
"tw", |
||||
"tz", |
||||
"ua", |
||||
"ug", |
||||
"um", |
||||
"us", |
||||
"uy", |
||||
"uz", |
||||
"va", |
||||
"vc", |
||||
"ve", |
||||
"vg", |
||||
"vi", |
||||
"vn", |
||||
"vu", |
||||
"wf", |
||||
"ws", |
||||
"ye", |
||||
"yt", |
||||
"za", |
||||
"zm", |
||||
"zw" |
||||
}; |
||||
|
||||
OpenAIP::OpenAIP(QObject *parent) : |
||||
QObject(parent) |
||||
{ |
||||
connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &OpenAIP::downloadFinished); |
||||
} |
||||
|
||||
OpenAIP::~OpenAIP() |
||||
{ |
||||
disconnect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &OpenAIP::downloadFinished); |
||||
} |
||||
|
||||
QString OpenAIP::getDataDir() |
||||
{ |
||||
// Get directory to store app data in
|
||||
QStringList locations = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation); |
||||
// First dir is writable
|
||||
return locations[0]; |
||||
} |
||||
|
||||
QString OpenAIP::getAirspaceFilename(int i) |
||||
{ |
||||
return getAirspaceFilename(m_countryCodes[i]); |
||||
} |
||||
|
||||
QString OpenAIP::getAirspaceFilename(const QString& countryCode) |
||||
{ |
||||
return getDataDir() + "/" + countryCode + "_asp.xml"; |
||||
} |
||||
|
||||
QString OpenAIP::getAirspaceURL(int i) |
||||
{ |
||||
if (i < m_countryCodes.size()) { |
||||
return QString(OPENAIP_AIRSPACE_URL).arg(m_countryCodes[i]); |
||||
} else { |
||||
return QString(); |
||||
} |
||||
} |
||||
|
||||
void OpenAIP::downloadAirspaces() |
||||
{ |
||||
m_countryIndex = 0; |
||||
downloadAirspace(); |
||||
} |
||||
|
||||
void OpenAIP::downloadAirspace() |
||||
{ |
||||
QString filename = getAirspaceFilename(m_countryIndex); |
||||
QString urlString = getAirspaceURL(m_countryIndex); |
||||
QUrl dbURL(urlString); |
||||
qDebug() << "OpenAIP::downloadAirspace: Downloading " << urlString; |
||||
emit downloadingURL(urlString); |
||||
m_dlm.download(dbURL, filename); |
||||
} |
||||
|
||||
QString OpenAIP::getNavAidsFilename(int i) |
||||
{ |
||||
return getNavAidsFilename(m_countryCodes[i]); |
||||
} |
||||
|
||||
QString OpenAIP::getNavAidsFilename(const QString& countryCode) |
||||
{ |
||||
return getDataDir() + "/" + countryCode + "_nav.xml"; |
||||
} |
||||
|
||||
QString OpenAIP::getNavAidsURL(int i) |
||||
{ |
||||
if (i < m_countryCodes.size()) { |
||||
return QString(OPENAIP_NAVAIDS_URL).arg(m_countryCodes[i]); |
||||
} else { |
||||
return QString(); |
||||
} |
||||
} |
||||
|
||||
void OpenAIP::downloadNavAids() |
||||
{ |
||||
m_countryIndex = 0; |
||||
downloadNavAid(); |
||||
} |
||||
|
||||
void OpenAIP::downloadNavAid() |
||||
{ |
||||
QString filename = getNavAidsFilename(m_countryIndex); |
||||
QString urlString = getNavAidsURL(m_countryIndex); |
||||
QUrl dbURL(urlString); |
||||
qDebug() << "OpenAIP::downloadNavAid: Downloading " << urlString; |
||||
emit downloadingURL(urlString); |
||||
m_dlm.download(dbURL, filename); |
||||
} |
||||
|
||||
void OpenAIP::downloadFinished(const QString& filename, bool success) |
||||
{ |
||||
// Not all countries have corresponding files, so we should expect some errors
|
||||
if (!success) { |
||||
qDebug() << "OpenAIP::downloadFinished: Failed: " << filename; |
||||
} |
||||
|
||||
if (filename == getNavAidsFilename(m_countryIndex)) |
||||
{ |
||||
m_countryIndex++; |
||||
if (m_countryIndex < m_countryCodes.size()) { |
||||
downloadNavAid(); |
||||
} else { |
||||
emit downloadNavAidsFinished(); |
||||
} |
||||
} |
||||
else if (filename == getAirspaceFilename(m_countryIndex)) |
||||
{ |
||||
m_countryIndex++; |
||||
if (m_countryIndex < m_countryCodes.size()) { |
||||
downloadAirspace(); |
||||
} else { |
||||
emit downloadAirspaceFinished(); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "OpenAIP::downloadFinished: Unexpected filename: " << filename; |
||||
emit downloadError(QString("Unexpected filename: %1").arg(filename)); |
||||
} |
||||
} |
||||
|
||||
// Read airspaces for all countries
|
||||
QList<Airspace *> OpenAIP::readAirspaces() |
||||
{ |
||||
QList<Airspace *> airspaces; |
||||
for (const auto& countryCode : m_countryCodes) { |
||||
airspaces.append(readAirspaces(countryCode)); |
||||
} |
||||
return airspaces; |
||||
} |
||||
|
||||
// Read airspaces for a single country
|
||||
QList<Airspace *> OpenAIP::readAirspaces(const QString& countryCode) |
||||
{ |
||||
return Airspace::readXML(getAirspaceFilename(countryCode)); |
||||
} |
||||
|
||||
// Read NavAids for all countries
|
||||
QList<NavAid *> OpenAIP::readNavAids() |
||||
{ |
||||
QList<NavAid *> navAids; |
||||
for (const auto& countryCode : m_countryCodes) { |
||||
navAids.append(readNavAids(countryCode)); |
||||
} |
||||
return navAids; |
||||
} |
||||
|
||||
// Read NavAids for a single country
|
||||
QList<NavAid *> OpenAIP::readNavAids(const QString& countryCode) |
||||
{ |
||||
return NavAid::readXML(getNavAidsFilename(countryCode)); |
||||
} |
||||
@ -0,0 +1,431 @@
@@ -0,0 +1,431 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_OPENAIP_H |
||||
#define INCLUDE_OPENAIP_H |
||||
|
||||
#include <QString> |
||||
#include <QFile> |
||||
#include <QByteArray> |
||||
#include <QHash> |
||||
#include <QList> |
||||
#include <QDebug> |
||||
#include <QXmlStreamReader> |
||||
#include <QPointF> |
||||
|
||||
#include <stdio.h> |
||||
#include <string.h> |
||||
|
||||
#include "export.h" |
||||
|
||||
#include "util/units.h" |
||||
#include "util/httpdownloadmanager.h" |
||||
|
||||
// Server is moving, use new URL and .xml extension instead of .aip
|
||||
//#define OPENAIP_AIRSPACE_URL "https://www.openaip.net/customer_export_akfshb9237tgwiuvb4tgiwbf/%1_asp.aip"
|
||||
//#define OPENAIP_NAVAIDS_URL "https://www.openaip.net/customer_export_akfshb9237tgwiuvb4tgiwbf/%1_nav.aip"
|
||||
#define OPENAIP_AIRSPACE_URL "https://storage.googleapis.com/29f98e10-a489-4c82-ae5e-489dbcd4912f/%1_asp.xml"
|
||||
#define OPENAIP_NAVAIDS_URL "https://storage.googleapis.com/29f98e10-a489-4c82-ae5e-489dbcd4912f/%1_nav.xml"
|
||||
|
||||
struct SDRBASE_API Airspace { |
||||
|
||||
struct AltLimit { |
||||
QString m_reference; // STD, MSL
|
||||
int m_alt; // Altitude
|
||||
QString m_altUnit; // FL (Flight level) or F (Feet)
|
||||
}; |
||||
|
||||
QString m_category; // A-G, GLIDING, DANGER, PROHIBITED, TMZ
|
||||
int m_id; |
||||
QString m_country; // GB
|
||||
QString m_name; // BIGGIN HILL ATZ 129.405 - TODO: Extract frequency so we can tune to it
|
||||
AltLimit m_top; // Top of airspace
|
||||
AltLimit m_bottom; // Bottom of airspace
|
||||
QVector<QPointF> m_polygon; |
||||
QPointF m_center; // Center of polygon
|
||||
QPointF m_position; // Position for text (not at the center, otherwise it will clash with airport)
|
||||
|
||||
void calculatePosition() |
||||
{ |
||||
qreal minX, maxX; |
||||
qreal minY, maxY; |
||||
if (m_polygon.size() > 0) |
||||
{ |
||||
minX = maxX = m_polygon[0].x(); |
||||
minY = maxY = m_polygon[0].y(); |
||||
for (int i = 1; i < m_polygon.size(); i++) |
||||
{ |
||||
qreal x = m_polygon[i].x(); |
||||
qreal y = m_polygon[i].y(); |
||||
minX = std::min(minX, x); |
||||
maxX = std::max(maxX, x); |
||||
minY = std::min(minY, y); |
||||
maxY = std::max(maxY, y); |
||||
} |
||||
m_center.setX(minX + (maxX - minX) / 2.0); |
||||
m_center.setY(minY + (maxY - minY) * 2.0); |
||||
m_position.setX(minX + (maxX - minX) / 2.0); |
||||
m_position.setY(minY + (maxY - minY) * 3.0 / 4.0); |
||||
} |
||||
} |
||||
|
||||
QString getAlt(const AltLimit *altlimit) const |
||||
{ |
||||
// Format on UK charts
|
||||
if (altlimit->m_alt == 0) { |
||||
return "SFC"; // Surface
|
||||
} if (altlimit->m_altUnit == "FL") { |
||||
return QString("FL%1").arg(altlimit->m_alt); |
||||
} else if (altlimit->m_altUnit == "F") { |
||||
return QString("%1'").arg(altlimit->m_alt); |
||||
} else { |
||||
return QString("%1 %2").arg(altlimit->m_alt).arg(altlimit->m_altUnit); |
||||
} |
||||
} |
||||
|
||||
double heightInMetres(const AltLimit *altlimit) const |
||||
{ |
||||
if (altlimit->m_altUnit == "FL") { |
||||
return Units::feetToMetres(altlimit->m_alt * 100); |
||||
} else if (altlimit->m_altUnit == "F") { |
||||
return Units::feetToMetres(altlimit->m_alt); |
||||
} else { |
||||
return altlimit->m_alt; |
||||
} |
||||
} |
||||
|
||||
double topHeightInMetres() const |
||||
{ |
||||
return heightInMetres(&m_top); |
||||
} |
||||
|
||||
double bottomHeightInMetres() const |
||||
{ |
||||
return heightInMetres(&m_bottom); |
||||
} |
||||
|
||||
// Read OpenAIP XML file
|
||||
static QList<Airspace *> readXML(const QString &filename) |
||||
{ |
||||
QList<Airspace *> airspaces; |
||||
QFile file(filename); |
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) |
||||
{ |
||||
QXmlStreamReader xmlReader(&file); |
||||
|
||||
while(!xmlReader.atEnd() && !xmlReader.hasError()) |
||||
{ |
||||
if (xmlReader.readNextStartElement()) |
||||
{ |
||||
if (xmlReader.name() == "ASP") |
||||
{ |
||||
Airspace *airspace = new Airspace(); |
||||
|
||||
airspace->m_category = xmlReader.attributes().value("CATEGORY").toString(); |
||||
|
||||
while(xmlReader.readNextStartElement()) |
||||
{ |
||||
if (xmlReader.name() == QLatin1String("ID")) |
||||
{ |
||||
airspace->m_id = xmlReader.readElementText().toInt(); |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("COUNTRY")) |
||||
{ |
||||
airspace->m_country = xmlReader.readElementText(); |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("NAME")) |
||||
{ |
||||
airspace->m_name = xmlReader.readElementText(); |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("ALTLIMIT_TOP")) |
||||
{ |
||||
while(xmlReader.readNextStartElement()) |
||||
{ |
||||
airspace->m_top.m_reference = xmlReader.attributes().value("REFERENCE").toString(); |
||||
airspace->m_top.m_altUnit = xmlReader.attributes().value("UNIT").toString(); |
||||
if (xmlReader.name() == QLatin1String("ALT")) |
||||
{ |
||||
airspace->m_top.m_alt = xmlReader.readElementText().toInt(); |
||||
} |
||||
else |
||||
{ |
||||
xmlReader.skipCurrentElement(); |
||||
} |
||||
} |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("ALTLIMIT_BOTTOM")) |
||||
{ |
||||
while(xmlReader.readNextStartElement()) |
||||
{ |
||||
airspace->m_bottom.m_reference = xmlReader.attributes().value("REFERENCE").toString(); |
||||
airspace->m_bottom.m_altUnit = xmlReader.attributes().value("UNIT").toString(); |
||||
if (xmlReader.name() == QLatin1String("ALT")) |
||||
{ |
||||
airspace->m_bottom.m_alt = xmlReader.readElementText().toInt(); |
||||
} |
||||
else |
||||
{ |
||||
xmlReader.skipCurrentElement(); |
||||
} |
||||
} |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("GEOMETRY")) |
||||
{ |
||||
while(xmlReader.readNextStartElement()) |
||||
{ |
||||
if (xmlReader.name() == QLatin1String("POLYGON")) |
||||
{ |
||||
QString pointsString = xmlReader.readElementText(); |
||||
QStringList points = pointsString.split(","); |
||||
for (const auto& ps : points) |
||||
{ |
||||
QStringList split = ps.trimmed().split(" "); |
||||
if (split.size() == 2) |
||||
{ |
||||
QPointF pf(split[0].toDouble(), split[1].toDouble()); |
||||
airspace->m_polygon.append(pf); |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "Airspace::readXML - Unexpected polygon point format: " << ps; |
||||
} |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
xmlReader.skipCurrentElement(); |
||||
} |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
xmlReader.skipCurrentElement(); |
||||
} |
||||
} |
||||
|
||||
airspace->calculatePosition(); |
||||
//qDebug() << "Adding airspace: " << airspace->m_name << " " << airspace->m_category;
|
||||
airspaces.append(airspace); |
||||
} |
||||
} |
||||
} |
||||
|
||||
file.close(); |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "Airspace::readXML: Could not open " << filename << " for reading."; |
||||
} |
||||
return airspaces; |
||||
} |
||||
|
||||
}; |
||||
|
||||
struct SDRBASE_API NavAid { |
||||
|
||||
QString m_ident; // 2 or 3 character ident
|
||||
QString m_type; // NDB, VOR, VOR-DME or VORTAC
|
||||
QString m_name; |
||||
float m_latitude; |
||||
float m_longitude; |
||||
float m_elevation; |
||||
float m_frequencykHz; |
||||
QString m_channel; |
||||
int m_range; // Nautical miles
|
||||
float m_magneticDeclination; |
||||
bool m_alignedTrueNorth; // Is the VOR aligned to true North, rather than magnetic (may be the case at high latitudes)
|
||||
|
||||
int getRangeMetres() const |
||||
{ |
||||
return Units::nauticalMilesToIntegerMetres((float)m_range); |
||||
} |
||||
|
||||
// OpenAIP XML file
|
||||
static QList<NavAid *> readXML(const QString &filename) |
||||
{ |
||||
QList<NavAid *> navAidInfo; |
||||
QFile file(filename); |
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) |
||||
{ |
||||
QXmlStreamReader xmlReader(&file); |
||||
|
||||
while(!xmlReader.atEnd() && !xmlReader.hasError()) |
||||
{ |
||||
if (xmlReader.readNextStartElement()) |
||||
{ |
||||
if (xmlReader.name() == "NAVAID") |
||||
{ |
||||
QStringRef typeRef = xmlReader.attributes().value("TYPE"); |
||||
if ((typeRef == QLatin1String("NDB")) |
||||
|| (typeRef == QLatin1String("DME")) |
||||
|| (typeRef == QLatin1String("VOR")) |
||||
|| (typeRef== QLatin1String("VOR-DME")) |
||||
|| (typeRef == QLatin1String("VORTAC"))) |
||||
{ |
||||
QString type = typeRef.toString(); |
||||
QString name; |
||||
QString id; |
||||
float lat = 0.0f; |
||||
float lon = 0.0f; |
||||
float elevation = 0.0f; |
||||
float frequency = 0.0f; |
||||
QString channel; |
||||
int range = 25; |
||||
float declination = 0.0f; |
||||
bool alignedTrueNorth = false; |
||||
while(xmlReader.readNextStartElement()) |
||||
{ |
||||
if (xmlReader.name() == QLatin1String("NAME")) |
||||
{ |
||||
name = xmlReader.readElementText(); |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("ID")) |
||||
{ |
||||
id = xmlReader.readElementText(); |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("GEOLOCATION")) |
||||
{ |
||||
while(xmlReader.readNextStartElement()) |
||||
{ |
||||
if (xmlReader.name() == QLatin1String("LAT")) { |
||||
lat = xmlReader.readElementText().toFloat(); |
||||
} else if (xmlReader.name() == QLatin1String("LON")) { |
||||
lon = xmlReader.readElementText().toFloat(); |
||||
} else if (xmlReader.name() == QLatin1String("ELEV")) { |
||||
elevation = xmlReader.readElementText().toFloat(); |
||||
} else { |
||||
xmlReader.skipCurrentElement(); |
||||
} |
||||
} |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("RADIO")) |
||||
{ |
||||
while(xmlReader.readNextStartElement()) |
||||
{ |
||||
if (xmlReader.name() == QLatin1String("FREQUENCY")) |
||||
{ |
||||
if (type == "NDB") { |
||||
frequency = xmlReader.readElementText().toFloat(); |
||||
} else { |
||||
frequency = xmlReader.readElementText().toFloat() * 1000.0; |
||||
} |
||||
} else if (xmlReader.name() == QLatin1String("CHANNEL")) { |
||||
channel = xmlReader.readElementText(); |
||||
} else { |
||||
xmlReader.skipCurrentElement(); |
||||
} |
||||
} |
||||
} |
||||
else if (xmlReader.name() == QLatin1String("PARAMS")) |
||||
{ |
||||
while(xmlReader.readNextStartElement()) |
||||
{ |
||||
if (xmlReader.name() == QLatin1String("RANGE")) { |
||||
range = xmlReader.readElementText().toInt(); |
||||
} else if (xmlReader.name() == QLatin1String("DECLINATION")) { |
||||
declination = xmlReader.readElementText().toFloat(); |
||||
} else if (xmlReader.name() == QLatin1String("ALIGNEDTOTRUENORTH")) { |
||||
alignedTrueNorth = xmlReader.readElementText() == "TRUE"; |
||||
} else { |
||||
xmlReader.skipCurrentElement(); |
||||
} |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
xmlReader.skipCurrentElement(); |
||||
} |
||||
} |
||||
NavAid *navAid = new NavAid(); |
||||
navAid->m_ident = id; |
||||
// Check idents conform to our filtering rules
|
||||
if (navAid->m_ident.size() < 2) { |
||||
qDebug() << "NavAid::readXML: Ident less than 2 characters: " << navAid->m_ident; |
||||
} else if (navAid->m_ident.size() > 3) { |
||||
qDebug() << "NavAid::readXML: Ident greater than 3 characters: " << navAid->m_ident; |
||||
} |
||||
navAid->m_type = type; |
||||
navAid->m_name = name; |
||||
navAid->m_frequencykHz = frequency; |
||||
navAid->m_channel = channel; |
||||
navAid->m_latitude = lat; |
||||
navAid->m_longitude = lon; |
||||
navAid->m_elevation = elevation; |
||||
navAid->m_range = range; |
||||
navAid->m_magneticDeclination = declination; |
||||
navAid->m_alignedTrueNorth = alignedTrueNorth; |
||||
navAidInfo.append(navAid); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
file.close(); |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "NavAid::readNavAidsXML: Could not open " << filename << " for reading."; |
||||
} |
||||
return navAidInfo; |
||||
} |
||||
|
||||
}; |
||||
|
||||
class SDRBASE_API OpenAIP : public QObject { |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
OpenAIP(QObject* parent = nullptr); |
||||
~OpenAIP(); |
||||
|
||||
static const QStringList m_countryCodes; |
||||
|
||||
static QList<Airspace *> readAirspaces(); |
||||
static QList<Airspace *> readAirspaces(const QString& countryCode); |
||||
static QList<NavAid *> readNavAids(); |
||||
static QList<NavAid *> readNavAids(const QString& countryCode); |
||||
|
||||
void downloadAirspaces(); |
||||
void downloadNavAids(); |
||||
|
||||
private: |
||||
HttpDownloadManager m_dlm; |
||||
int m_countryIndex; |
||||
|
||||
static QString getDataDir(); |
||||
static QString getAirspaceFilename(int i); |
||||
static QString getAirspaceFilename(const QString& countryCode); |
||||
static QString getAirspaceURL(int i); |
||||
static QString getNavAidsFilename(int i); |
||||
static QString getNavAidsFilename(const QString& countryCode); |
||||
static QString getNavAidsURL(int i); |
||||
|
||||
void downloadAirspace(); |
||||
void downloadNavAid(); |
||||
|
||||
public slots: |
||||
void downloadFinished(const QString& filename, bool success); |
||||
|
||||
signals: |
||||
void downloadingURL(const QString& url); |
||||
void downloadError(const QString& error); |
||||
void downloadAirspaceFinished(); |
||||
void downloadNavAidsFinished(); |
||||
|
||||
}; |
||||
|
||||
#endif // INCLUDE_OPENAIP_H
|
||||
@ -0,0 +1,145 @@
@@ -0,0 +1,145 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "planespotters.h" |
||||
|
||||
#include <QDebug> |
||||
#include <QFile> |
||||
#include <QUrl> |
||||
#include <QUrlQuery> |
||||
#include <QNetworkReply> |
||||
#include <QJsonDocument> |
||||
#include <QJsonObject> |
||||
|
||||
PlaneSpotters::PlaneSpotters() |
||||
{ |
||||
m_networkManager = new QNetworkAccessManager(); |
||||
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleReply(QNetworkReply*))); |
||||
} |
||||
|
||||
PlaneSpotters::~PlaneSpotters() |
||||
{ |
||||
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleReply(QNetworkReply*))); |
||||
delete m_networkManager; |
||||
} |
||||
|
||||
void PlaneSpotters::getAircraftPhoto(const QString& icao) |
||||
{ |
||||
if (m_photos.contains(icao)) |
||||
{ |
||||
emit aircraftPhoto(m_photos[icao]); |
||||
} |
||||
else |
||||
{ |
||||
// Create a new photo hash table entry
|
||||
PlaneSpottersPhoto *photo = new PlaneSpottersPhoto(); |
||||
photo->m_icao = icao; |
||||
m_photos.insert(icao, photo); |
||||
|
||||
// Fetch from network
|
||||
QUrl url(QString("https://api.planespotters.net/pub/photos/hex/%1").arg(icao)); |
||||
QNetworkRequest request(url); |
||||
request.setRawHeader("User-Agent", "SDRangel/1.0"); // Get 403 error without this
|
||||
request.setOriginatingObject(photo); |
||||
m_networkManager->get(request); |
||||
} |
||||
} |
||||
|
||||
void PlaneSpotters::handleReply(QNetworkReply* reply) |
||||
{ |
||||
if (reply) |
||||
{ |
||||
if (!reply->error()) |
||||
{ |
||||
if (reply->url().path().startsWith("/pub/photos/hex")) { |
||||
parseJson((PlaneSpottersPhoto *)reply->request().originatingObject(), reply->readAll()); |
||||
} else { |
||||
parsePhoto((PlaneSpottersPhoto *)reply->request().originatingObject(), reply->readAll()); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "PlaneSpotters::handleReply: error: " << reply->error(); |
||||
} |
||||
reply->deleteLater(); |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "PlaneSpotters::handleReply: reply is null"; |
||||
} |
||||
} |
||||
|
||||
void PlaneSpotters::parsePhoto(PlaneSpottersPhoto *photo, QByteArray bytes) |
||||
{ |
||||
photo->m_pixmap.loadFromData(bytes); |
||||
emit aircraftPhoto(photo); |
||||
} |
||||
|
||||
void PlaneSpotters::parseJson(PlaneSpottersPhoto *photo, QByteArray bytes) |
||||
{ |
||||
QJsonDocument document = QJsonDocument::fromJson(bytes); |
||||
if (document.isObject()) |
||||
{ |
||||
QJsonObject obj = document.object(); |
||||
if (obj.contains(QStringLiteral("photos"))) |
||||
{ |
||||
QJsonArray photos = obj.value(QStringLiteral("photos")).toArray(); |
||||
if (photos.size() > 0) |
||||
{ |
||||
QJsonObject photoObj = photos[0].toObject(); |
||||
|
||||
if (photoObj.contains(QStringLiteral("id"))) { |
||||
photo->m_link = photoObj.value(QStringLiteral("id")).toString(); |
||||
} |
||||
if (photoObj.contains(QStringLiteral("thumbnail"))) |
||||
{ |
||||
QJsonObject thumbnailObj = photoObj.value(QStringLiteral("thumbnail")).toObject(); |
||||
photo->m_thumbnail.m_src = thumbnailObj.value(QStringLiteral("src")).toString(); |
||||
QJsonObject sizeObj = thumbnailObj.value(QStringLiteral("size")).toObject(); |
||||
photo->m_thumbnail.m_width = sizeObj.value(QStringLiteral("width")).toInt(); |
||||
photo->m_thumbnail.m_height = sizeObj.value(QStringLiteral("width")).toInt(); |
||||
} |
||||
if (photoObj.contains(QStringLiteral("link"))) { |
||||
photo->m_link = photoObj.value(QStringLiteral("link")).toString(); |
||||
} |
||||
if (photoObj.contains(QStringLiteral("photographer"))) { |
||||
photo->m_photographer = photoObj.value(QStringLiteral("photographer")).toString(); |
||||
} |
||||
|
||||
if (!photo->m_thumbnail.m_src.isEmpty()) |
||||
{ |
||||
QUrl url(photo->m_thumbnail.m_src); |
||||
QNetworkRequest request(url); |
||||
request.setOriginatingObject(photo); |
||||
m_networkManager->get(request); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "PlaneSpotters::handleReply: data array is empty"; |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "PlaneSpotters::handleReply: Object doesn't contain data: " << obj; |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
qDebug() << "PlaneSpotters::handleReply: Document is not an object: " << document; |
||||
} |
||||
} |
||||
@ -0,0 +1,80 @@
@@ -0,0 +1,80 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 Jon Beniston, M7RCE //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_PLANESPOTTERS_H |
||||
#define INCLUDE_PLANESPOTTERS_H |
||||
|
||||
#include <QtCore> |
||||
#include <QDateTime> |
||||
#include <QPixmap> |
||||
#include <QHash> |
||||
|
||||
#include "export.h" |
||||
|
||||
class QNetworkAccessManager; |
||||
class QNetworkReply; |
||||
|
||||
class SDRBASE_API PlaneSpottersPhoto : public QObject { |
||||
Q_OBJECT |
||||
|
||||
struct Thumbnail { |
||||
QString m_src; |
||||
int m_width; |
||||
int m_height; |
||||
}; |
||||
|
||||
public: |
||||
QString m_icao; |
||||
QString m_id; |
||||
Thumbnail m_thumbnail; |
||||
Thumbnail m_largeThumbnail; |
||||
QString m_link; |
||||
QString m_photographer |
||||
; |
||||
QPixmap m_pixmap; |
||||
}; |
||||
|
||||
// PlaneSpotters API wrapper
|
||||
// Allows downloading of images of aircraft from https://www.planespotters.net/
|
||||
// Note that API terms of use require us not to cache images on disk
|
||||
class SDRBASE_API PlaneSpotters : public QObject |
||||
{ |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
PlaneSpotters(); |
||||
~PlaneSpotters(); |
||||
|
||||
|
||||
void getAircraftPhoto(const QString& icao); |
||||
|
||||
signals: |
||||
void aircraftPhoto(const PlaneSpottersPhoto *photo); // Called when photo is available.
|
||||
|
||||
private: |
||||
void parseJson(PlaneSpottersPhoto *photo, QByteArray bytes); |
||||
void parsePhoto(PlaneSpottersPhoto *photo, QByteArray bytes); |
||||
|
||||
QNetworkAccessManager *m_networkManager; |
||||
QHash<QString, PlaneSpottersPhoto *> m_photos; |
||||
|
||||
public slots: |
||||
void handleReply(QNetworkReply* reply); |
||||
|
||||
}; |
||||
|
||||
#endif /* INCLUDE_PLANESPOTTERS_H */ |
||||