ADS-B Demodulator updates.
Add OpenSky Network aircraft database support, for information about
aircraft model, owner, registration.
Add airline logos and country & military flags for display in the table.
Add OurAirports airport database support, to allow airports and ATC
frequencies to be displayed on the map.
Allow ATC frequency to be tuned by clicking on the map.
Add support for displaying flight paths on the map.
Allow columns in table to be rearranged and hidden.
Allow rows in table to be sorted by clicking on header.
Allow switching units from ft, kn, ft/min to m, kph, m/s
Allow aircraft timeout to be set by the user.
Allow font used for the table to be set by the user.
Add optional display of demodulator statistics.
Support multithreading in demodulator to reduce FIFO overflows.
Add support for demodulating all Mode-S frames and feeding them.
Add support for feeding in Beast hex format.
Allow option of correlating against full preamble or partial preamble.
Supporting highlighting of an aircraft in the table by selecting it on
the map.
Use difference of zeros and ones correlation, rather than absolute
threshold, to better account for varying conditions and make the
threshold easier to set.
Enable anti-aliasing for text on the map.
Improve CRC performance by 5x-10x.
Add HttpDownloadManager class to support downloading of files from the
web to disk.
2020-11-06 07:18:55 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2020 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 <QFontDialog>
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
#include "adsbdemoddisplaydialog.h"
|
|
|
|
|
2020-11-10 09:27:42 -05:00
|
|
|
ADSBDemodDisplayDialog::ADSBDemodDisplayDialog(
|
|
|
|
int removeTimeout, float airportRange, ADSBDemodSettings::AirportType airportMinimumSize,
|
|
|
|
bool displayHeliports, bool siUnits, QString fontName, int fontSize, bool displayDemodStats,
|
2021-11-12 11:51:23 -05:00
|
|
|
bool autoResizeTableColumns, const QString& apiKey, QStringList airspaces, float airspaceRange,
|
|
|
|
ADSBDemodSettings::MapType mapType, bool displayNavAids, bool displayPhotos, QWidget* parent) :
|
ADS-B Demodulator updates.
Add OpenSky Network aircraft database support, for information about
aircraft model, owner, registration.
Add airline logos and country & military flags for display in the table.
Add OurAirports airport database support, to allow airports and ATC
frequencies to be displayed on the map.
Allow ATC frequency to be tuned by clicking on the map.
Add support for displaying flight paths on the map.
Allow columns in table to be rearranged and hidden.
Allow rows in table to be sorted by clicking on header.
Allow switching units from ft, kn, ft/min to m, kph, m/s
Allow aircraft timeout to be set by the user.
Allow font used for the table to be set by the user.
Add optional display of demodulator statistics.
Support multithreading in demodulator to reduce FIFO overflows.
Add support for demodulating all Mode-S frames and feeding them.
Add support for feeding in Beast hex format.
Allow option of correlating against full preamble or partial preamble.
Supporting highlighting of an aircraft in the table by selecting it on
the map.
Use difference of zeros and ones correlation, rather than absolute
threshold, to better account for varying conditions and make the
threshold easier to set.
Enable anti-aliasing for text on the map.
Improve CRC performance by 5x-10x.
Add HttpDownloadManager class to support downloading of files from the
web to disk.
2020-11-06 07:18:55 -05:00
|
|
|
QDialog(parent),
|
|
|
|
m_fontName(fontName),
|
2020-11-13 23:51:19 -05:00
|
|
|
m_fontSize(fontSize),
|
|
|
|
ui(new Ui::ADSBDemodDisplayDialog)
|
ADS-B Demodulator updates.
Add OpenSky Network aircraft database support, for information about
aircraft model, owner, registration.
Add airline logos and country & military flags for display in the table.
Add OurAirports airport database support, to allow airports and ATC
frequencies to be displayed on the map.
Allow ATC frequency to be tuned by clicking on the map.
Add support for displaying flight paths on the map.
Allow columns in table to be rearranged and hidden.
Allow rows in table to be sorted by clicking on header.
Allow switching units from ft, kn, ft/min to m, kph, m/s
Allow aircraft timeout to be set by the user.
Allow font used for the table to be set by the user.
Add optional display of demodulator statistics.
Support multithreading in demodulator to reduce FIFO overflows.
Add support for demodulating all Mode-S frames and feeding them.
Add support for feeding in Beast hex format.
Allow option of correlating against full preamble or partial preamble.
Supporting highlighting of an aircraft in the table by selecting it on
the map.
Use difference of zeros and ones correlation, rather than absolute
threshold, to better account for varying conditions and make the
threshold easier to set.
Enable anti-aliasing for text on the map.
Improve CRC performance by 5x-10x.
Add HttpDownloadManager class to support downloading of files from the
web to disk.
2020-11-06 07:18:55 -05:00
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
|
|
|
ui->timeout->setValue(removeTimeout);
|
|
|
|
ui->airportRange->setValue(airportRange);
|
|
|
|
ui->airportSize->setCurrentIndex((int)airportMinimumSize);
|
|
|
|
ui->heliports->setChecked(displayHeliports);
|
|
|
|
ui->units->setCurrentIndex((int)siUnits);
|
|
|
|
ui->displayStats->setChecked(displayDemodStats);
|
2020-11-10 09:27:42 -05:00
|
|
|
ui->autoResizeTableColumns->setChecked(autoResizeTableColumns);
|
2021-10-29 07:54:10 -04:00
|
|
|
ui->apiKey->setText(apiKey);
|
2021-11-12 11:51:23 -05:00
|
|
|
for (const auto& airspace: airspaces)
|
|
|
|
{
|
|
|
|
QList<QListWidgetItem *> items = ui->airspaces->findItems(airspace, Qt::MatchExactly);
|
|
|
|
for (const auto& item: items) {
|
|
|
|
item->setCheckState(Qt::Checked);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ui->airspaceRange->setValue(airspaceRange);
|
|
|
|
ui->mapType->setCurrentIndex((int)mapType);
|
|
|
|
ui->navAids->setChecked(displayNavAids);
|
|
|
|
ui->photos->setChecked(displayPhotos);
|
ADS-B Demodulator updates.
Add OpenSky Network aircraft database support, for information about
aircraft model, owner, registration.
Add airline logos and country & military flags for display in the table.
Add OurAirports airport database support, to allow airports and ATC
frequencies to be displayed on the map.
Allow ATC frequency to be tuned by clicking on the map.
Add support for displaying flight paths on the map.
Allow columns in table to be rearranged and hidden.
Allow rows in table to be sorted by clicking on header.
Allow switching units from ft, kn, ft/min to m, kph, m/s
Allow aircraft timeout to be set by the user.
Allow font used for the table to be set by the user.
Add optional display of demodulator statistics.
Support multithreading in demodulator to reduce FIFO overflows.
Add support for demodulating all Mode-S frames and feeding them.
Add support for feeding in Beast hex format.
Allow option of correlating against full preamble or partial preamble.
Supporting highlighting of an aircraft in the table by selecting it on
the map.
Use difference of zeros and ones correlation, rather than absolute
threshold, to better account for varying conditions and make the
threshold easier to set.
Enable anti-aliasing for text on the map.
Improve CRC performance by 5x-10x.
Add HttpDownloadManager class to support downloading of files from the
web to disk.
2020-11-06 07:18:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
ADSBDemodDisplayDialog::~ADSBDemodDisplayDialog()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ADSBDemodDisplayDialog::accept()
|
|
|
|
{
|
|
|
|
m_removeTimeout = ui->timeout->value();
|
|
|
|
m_airportRange = ui->airportRange->value();
|
|
|
|
m_airportMinimumSize = (ADSBDemodSettings::AirportType)ui->airportSize->currentIndex();
|
|
|
|
m_displayHeliports = ui->heliports->isChecked();
|
|
|
|
m_siUnits = ui->units->currentIndex() == 0 ? false : true;
|
|
|
|
m_displayDemodStats = ui->displayStats->isChecked();
|
2020-11-10 09:27:42 -05:00
|
|
|
m_autoResizeTableColumns = ui->autoResizeTableColumns->isChecked();
|
2021-10-29 07:54:10 -04:00
|
|
|
m_apiKey = ui->apiKey->text();
|
2021-11-12 11:51:23 -05:00
|
|
|
m_airspaces = QStringList();
|
|
|
|
for (int i = 0; i < ui->airspaces->count(); i++)
|
|
|
|
{
|
|
|
|
QListWidgetItem *item = ui->airspaces->item(i);
|
|
|
|
if (item->checkState() == Qt::Checked) {
|
|
|
|
m_airspaces.append(item->text());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_airspaceRange = ui->airspaceRange->value();
|
|
|
|
m_mapType = (ADSBDemodSettings::MapType)ui->mapType->currentIndex();
|
|
|
|
m_displayNavAids = ui->navAids->isChecked();
|
|
|
|
m_displayPhotos = ui->photos->isChecked();
|
ADS-B Demodulator updates.
Add OpenSky Network aircraft database support, for information about
aircraft model, owner, registration.
Add airline logos and country & military flags for display in the table.
Add OurAirports airport database support, to allow airports and ATC
frequencies to be displayed on the map.
Allow ATC frequency to be tuned by clicking on the map.
Add support for displaying flight paths on the map.
Allow columns in table to be rearranged and hidden.
Allow rows in table to be sorted by clicking on header.
Allow switching units from ft, kn, ft/min to m, kph, m/s
Allow aircraft timeout to be set by the user.
Allow font used for the table to be set by the user.
Add optional display of demodulator statistics.
Support multithreading in demodulator to reduce FIFO overflows.
Add support for demodulating all Mode-S frames and feeding them.
Add support for feeding in Beast hex format.
Allow option of correlating against full preamble or partial preamble.
Supporting highlighting of an aircraft in the table by selecting it on
the map.
Use difference of zeros and ones correlation, rather than absolute
threshold, to better account for varying conditions and make the
threshold easier to set.
Enable anti-aliasing for text on the map.
Improve CRC performance by 5x-10x.
Add HttpDownloadManager class to support downloading of files from the
web to disk.
2020-11-06 07:18:55 -05:00
|
|
|
QDialog::accept();
|
|
|
|
}
|
|
|
|
|
2020-11-14 05:13:32 -05:00
|
|
|
void ADSBDemodDisplayDialog::on_font_clicked()
|
ADS-B Demodulator updates.
Add OpenSky Network aircraft database support, for information about
aircraft model, owner, registration.
Add airline logos and country & military flags for display in the table.
Add OurAirports airport database support, to allow airports and ATC
frequencies to be displayed on the map.
Allow ATC frequency to be tuned by clicking on the map.
Add support for displaying flight paths on the map.
Allow columns in table to be rearranged and hidden.
Allow rows in table to be sorted by clicking on header.
Allow switching units from ft, kn, ft/min to m, kph, m/s
Allow aircraft timeout to be set by the user.
Allow font used for the table to be set by the user.
Add optional display of demodulator statistics.
Support multithreading in demodulator to reduce FIFO overflows.
Add support for demodulating all Mode-S frames and feeding them.
Add support for feeding in Beast hex format.
Allow option of correlating against full preamble or partial preamble.
Supporting highlighting of an aircraft in the table by selecting it on
the map.
Use difference of zeros and ones correlation, rather than absolute
threshold, to better account for varying conditions and make the
threshold easier to set.
Enable anti-aliasing for text on the map.
Improve CRC performance by 5x-10x.
Add HttpDownloadManager class to support downloading of files from the
web to disk.
2020-11-06 07:18:55 -05:00
|
|
|
{
|
|
|
|
bool ok;
|
|
|
|
QFont font = QFontDialog::getFont(&ok, QFont(m_fontName, m_fontSize), this);
|
|
|
|
if (ok)
|
|
|
|
{
|
|
|
|
qDebug() << font;
|
|
|
|
m_fontName = font.family();
|
|
|
|
m_fontSize = font.pointSize();
|
|
|
|
}
|
|
|
|
}
|