1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-27 02:09:14 -05:00
sdrangel/plugins/channelrx/demodadsb/adsbdemodsinkworker.h
Jon Beniston 97f55be6e9 ADS-B Demod Updates
Add support for animated 3D models.
Downloaded zipped airplane database as 1/4 of the size.
Add table context menu.
Add airline and country images to text bubbles on maps.
Fix calculation of ground speed when on surface.
Fix position calculation when aircraft transistions from surface to air.
Fix altitude calculation when Q-bit is set.
Speed up processing of large log files.
Add new airline logos.
2022-02-04 16:57:45 +00:00

85 lines
3.0 KiB
C++

///////////////////////////////////////////////////////////////////////////////////
// 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/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_ADSBDEMODSINKWORKER_H
#define INCLUDE_ADSBDEMODSINKWORKER_H
#include <QObject>
#include <QThread>
#include "dsp/dsptypes.h"
#include "util/crc.h"
#include "util/messagequeue.h"
#include "adsbdemodstats.h"
class ADSBDemodSink;
struct ADSBDemodSettings;
struct ADSBDemodStats;
class ADSBDemodSinkWorker : public QThread {
Q_OBJECT
public:
class MsgConfigureADSBDemodSinkWorker : public Message {
MESSAGE_CLASS_DECLARATION
public:
const ADSBDemodSettings& getSettings() const { return m_settings; }
bool getForce() const { return m_force; }
static MsgConfigureADSBDemodSinkWorker* create(const ADSBDemodSettings& settings, bool force)
{
return new MsgConfigureADSBDemodSinkWorker(settings, force);
}
private:
ADSBDemodSettings m_settings;
bool m_force;
MsgConfigureADSBDemodSinkWorker(const ADSBDemodSettings& settings, bool force) :
Message(),
m_settings(settings),
m_force(force)
{ }
};
ADSBDemodSinkWorker(ADSBDemodSink *sink) :
m_sink(sink),
m_demodStats(),
m_correlationThresholdLinear(0.02f),
m_crc()
{
}
void run() override;
MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
private:
void handleInputMessages();
MessageQueue m_inputMessageQueue;
ADSBDemodSettings m_settings;
ADSBDemodSink *m_sink;
ADSBDemodStats m_demodStats;
Real m_correlationThresholdLinear;
Real m_correlationScale;
crcadsb m_crc; //!< Have as member to avoid recomputing LUT
QDateTime rxDateTime(int firstIdx, int readBuffer) const;
};
#endif // INCLUDE_ADSBDEMODSINKWORKER_H