2017-10-01 17:22:06 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
2023-11-18 06:02:48 -05:00
|
|
|
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
|
|
|
// written by Christian Daniel //
|
|
|
|
// Copyright (C) 2015-2019, 2022-2023 Edouard Griffiths, F4EXB <f4exb06@gmail.com> //
|
|
|
|
// Copyright (C) 2021 Jon Beniston, M7RCE <jon@beniston.com> //
|
2017-10-01 17:22:06 -04:00
|
|
|
// //
|
|
|
|
// 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 //
|
2019-04-11 00:39:30 -04:00
|
|
|
// (at your option) any later version. //
|
2017-10-01 17:22:06 -04:00
|
|
|
// //
|
|
|
|
// 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_DEMODSSB_SSBDEMODSETTINGS_H_
|
|
|
|
#define PLUGINS_CHANNELRX_DEMODSSB_SSBDEMODSETTINGS_H_
|
|
|
|
|
|
|
|
#include <QByteArray>
|
2023-11-05 04:33:27 -05:00
|
|
|
#include <QString>
|
2017-10-01 17:22:06 -04:00
|
|
|
|
2022-05-18 04:45:53 -04:00
|
|
|
#include "dsp/fftwindow.h"
|
|
|
|
|
2017-10-01 17:22:06 -04:00
|
|
|
class Serializable;
|
|
|
|
|
2022-05-18 13:20:39 -04:00
|
|
|
struct SSBDemodFilterSettings
|
2017-10-01 17:22:06 -04:00
|
|
|
{
|
2022-05-18 13:20:39 -04:00
|
|
|
int m_spanLog2;
|
2017-10-01 17:22:06 -04:00
|
|
|
Real m_rfBandwidth;
|
|
|
|
Real m_lowCutoff;
|
2022-05-18 13:20:39 -04:00
|
|
|
FFTWindow::Function m_fftWindow;
|
2023-11-05 07:23:31 -05:00
|
|
|
bool m_dnr;
|
|
|
|
int m_dnrScheme;
|
|
|
|
float m_dnrAboveAvgFactor;
|
|
|
|
float m_dnrSigmaFactor;
|
|
|
|
int m_dnrNbPeaks;
|
|
|
|
float m_dnrAlpha;
|
2022-05-18 13:20:39 -04:00
|
|
|
|
|
|
|
SSBDemodFilterSettings() :
|
|
|
|
m_spanLog2(3),
|
|
|
|
m_rfBandwidth(3000),
|
|
|
|
m_lowCutoff(300),
|
|
|
|
m_fftWindow(FFTWindow::Blackman)
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SSBDemodSettings
|
|
|
|
{
|
|
|
|
qint32 m_inputFrequencyOffset;
|
|
|
|
// Real m_rfBandwidth;
|
|
|
|
// Real m_lowCutoff;
|
2017-10-01 17:22:06 -04:00
|
|
|
Real m_volume;
|
2022-05-18 13:20:39 -04:00
|
|
|
// int m_spanLog2;
|
2017-10-01 17:22:06 -04:00
|
|
|
bool m_audioBinaural;
|
|
|
|
bool m_audioFlipChannels;
|
|
|
|
bool m_dsb;
|
|
|
|
bool m_audioMute;
|
|
|
|
bool m_agc;
|
|
|
|
bool m_agcClamping;
|
|
|
|
int m_agcTimeLog2;
|
|
|
|
int m_agcPowerThreshold;
|
|
|
|
int m_agcThresholdGate;
|
2023-11-05 04:33:27 -05:00
|
|
|
bool m_dnr;
|
|
|
|
int m_dnrScheme;
|
|
|
|
float m_dnrAboveAvgFactor;
|
|
|
|
float m_dnrSigmaFactor;
|
|
|
|
int m_dnrNbPeaks;
|
|
|
|
float m_dnrAlpha;
|
2017-10-01 17:22:06 -04:00
|
|
|
quint32 m_rgbColor;
|
2017-11-19 12:18:17 -05:00
|
|
|
QString m_title;
|
2018-03-27 05:17:11 -04:00
|
|
|
QString m_audioDeviceName;
|
2019-09-22 19:25:17 -04:00
|
|
|
int m_streamIndex; //!< MIMO channel. Not relevant when connected to SI (single Rx).
|
2018-12-23 18:51:29 -05:00
|
|
|
bool m_useReverseAPI;
|
|
|
|
QString m_reverseAPIAddress;
|
|
|
|
uint16_t m_reverseAPIPort;
|
|
|
|
uint16_t m_reverseAPIDeviceIndex;
|
|
|
|
uint16_t m_reverseAPIChannelIndex;
|
2022-04-12 10:20:45 -04:00
|
|
|
int m_workspaceIndex;
|
|
|
|
QByteArray m_geometryBytes;
|
2022-04-12 12:27:27 -04:00
|
|
|
bool m_hidden;
|
2022-05-18 13:20:39 -04:00
|
|
|
// FFTWindow::Function m_fftWindow;
|
|
|
|
std::vector<SSBDemodFilterSettings> m_filterBank;
|
|
|
|
unsigned int m_filterIndex;
|
2017-10-01 17:22:06 -04:00
|
|
|
|
|
|
|
Serializable *m_channelMarker;
|
|
|
|
Serializable *m_spectrumGUI;
|
2022-01-08 23:27:12 -05:00
|
|
|
Serializable *m_rollupState;
|
2017-10-01 17:22:06 -04:00
|
|
|
|
|
|
|
SSBDemodSettings();
|
|
|
|
void resetToDefaults();
|
|
|
|
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
|
|
|
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
|
2022-01-08 23:27:12 -05:00
|
|
|
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
|
2017-10-01 17:22:06 -04:00
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& data);
|
2018-02-09 02:42:28 -05:00
|
|
|
|
|
|
|
static const int m_minPowerThresholdDB;
|
|
|
|
static const float m_mminPowerThresholdDBf;
|
2017-10-01 17:22:06 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* PLUGINS_CHANNELRX_DEMODSSB_SSBDEMODSETTINGS_H_ */
|