2023-01-14 19:22:57 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2017 Edouard Griffiths, F4EXB. //
|
|
|
|
// //
|
|
|
|
// 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 PLUGINS_CHANNELRX_DEMODFT8_FT8DEMODSETTINGS_H_
|
|
|
|
#define PLUGINS_CHANNELRX_DEMODFT8_FT8DEMODSETTINGS_H_
|
|
|
|
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QString>
|
2023-01-22 14:08:32 -05:00
|
|
|
#include <QList>
|
2023-01-14 19:22:57 -05:00
|
|
|
|
|
|
|
#include "dsp/fftwindow.h"
|
|
|
|
|
|
|
|
class Serializable;
|
|
|
|
|
|
|
|
struct FT8DemodFilterSettings
|
|
|
|
{
|
|
|
|
int m_spanLog2;
|
|
|
|
Real m_rfBandwidth;
|
|
|
|
Real m_lowCutoff;
|
|
|
|
FFTWindow::Function m_fftWindow;
|
|
|
|
|
|
|
|
FT8DemodFilterSettings() :
|
2023-01-15 05:56:16 -05:00
|
|
|
m_spanLog2(2),
|
2023-01-14 19:22:57 -05:00
|
|
|
m_rfBandwidth(3000),
|
2023-01-15 05:56:16 -05:00
|
|
|
m_lowCutoff(200),
|
2023-01-14 19:22:57 -05:00
|
|
|
m_fftWindow(FFTWindow::Blackman)
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
2023-01-22 14:08:32 -05:00
|
|
|
struct FT8DemodBandPreset
|
|
|
|
{
|
|
|
|
QString m_name;
|
|
|
|
int m_baseFrequency;
|
|
|
|
int m_channelOffset;
|
|
|
|
};
|
|
|
|
|
2023-01-14 19:22:57 -05:00
|
|
|
struct FT8DemodSettings
|
|
|
|
{
|
2023-01-26 12:16:40 -05:00
|
|
|
enum MessageCol {
|
|
|
|
MESSAGE_COL_UTC,
|
2023-01-28 06:29:58 -05:00
|
|
|
MESSAGE_COL_TYPE,
|
2023-01-26 12:16:40 -05:00
|
|
|
MESSAGE_COL_PASS,
|
|
|
|
MESSAGE_COL_OKBITS,
|
|
|
|
MESSAGE_COL_DT,
|
|
|
|
MESSAGE_COL_DF,
|
|
|
|
MESSAGE_COL_SNR,
|
|
|
|
MESSAGE_COL_CALL1,
|
|
|
|
MESSAGE_COL_CALL2,
|
|
|
|
MESSAGE_COL_LOC,
|
|
|
|
MESSAGE_COL_INFO,
|
|
|
|
};
|
|
|
|
|
2023-01-14 19:22:57 -05:00
|
|
|
qint32 m_inputFrequencyOffset;
|
|
|
|
// Real m_rfBandwidth;
|
|
|
|
// Real m_lowCutoff;
|
|
|
|
Real m_volume;
|
|
|
|
bool m_agc;
|
2023-01-19 17:51:43 -05:00
|
|
|
bool m_recordWav;
|
|
|
|
bool m_logMessages;
|
|
|
|
int m_nbDecoderThreads;
|
|
|
|
float m_decoderTimeBudget;
|
2023-01-28 02:58:50 -05:00
|
|
|
bool m_useOSD;
|
|
|
|
int m_osdDepth;
|
|
|
|
int m_osdLDPCThreshold;
|
2023-01-29 13:27:45 -05:00
|
|
|
bool m_verifyOSD;
|
2023-01-14 19:22:57 -05:00
|
|
|
quint32 m_rgbColor;
|
|
|
|
QString m_title;
|
|
|
|
int m_streamIndex; //!< MIMO channel. Not relevant when connected to SI (single Rx).
|
|
|
|
bool m_useReverseAPI;
|
|
|
|
QString m_reverseAPIAddress;
|
|
|
|
uint16_t m_reverseAPIPort;
|
|
|
|
uint16_t m_reverseAPIDeviceIndex;
|
|
|
|
uint16_t m_reverseAPIChannelIndex;
|
|
|
|
int m_workspaceIndex;
|
|
|
|
QByteArray m_geometryBytes;
|
|
|
|
bool m_hidden;
|
|
|
|
// FFTWindow::Function m_fftWindow;
|
|
|
|
std::vector<FT8DemodFilterSettings> m_filterBank;
|
|
|
|
unsigned int m_filterIndex;
|
2023-01-22 14:08:32 -05:00
|
|
|
QList<FT8DemodBandPreset> m_bandPresets;
|
2023-01-14 19:22:57 -05:00
|
|
|
|
|
|
|
Serializable *m_channelMarker;
|
|
|
|
Serializable *m_spectrumGUI;
|
|
|
|
Serializable *m_rollupState;
|
|
|
|
|
|
|
|
FT8DemodSettings();
|
|
|
|
void resetToDefaults();
|
|
|
|
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
|
|
|
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
|
|
|
|
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
|
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& data);
|
2023-01-22 14:08:32 -05:00
|
|
|
void resetBandPresets();
|
2023-01-14 19:22:57 -05:00
|
|
|
|
2023-01-18 17:00:59 -05:00
|
|
|
static const int m_ft8SampleRate;
|
2023-01-14 19:22:57 -05:00
|
|
|
static const int m_minPowerThresholdDB;
|
|
|
|
static const float m_mminPowerThresholdDBf;
|
|
|
|
};
|
|
|
|
|
2023-01-22 14:08:32 -05:00
|
|
|
QDataStream& operator<<(QDataStream& out, const FT8DemodBandPreset& bandPreset);
|
|
|
|
QDataStream& operator>>(QDataStream& in, FT8DemodBandPreset& bandPreset);
|
2023-01-14 19:22:57 -05:00
|
|
|
|
|
|
|
#endif /* PLUGINS_CHANNELRX_DEMODFT8_FT8DEMODSETTINGS_H_ */
|