| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  | ///////////////////////////////////////////////////////////////////////////////////
 | 
					
						
							| 
									
										
										
										
											2023-11-18 12:02:48 +01: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 23:22:06 +02: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 06:39:30 +02:00
										 |  |  | // (at your option) any later version.                                           //
 | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02: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 10:33:27 +01:00
										 |  |  | #include <QString>
 | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-18 10:45:53 +02:00
										 |  |  | #include "dsp/fftwindow.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  | class Serializable; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-05-18 19:20:39 +02:00
										 |  |  | struct SSBDemodFilterSettings | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2022-05-18 19:20:39 +02:00
										 |  |  |     int  m_spanLog2; | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  |     Real m_rfBandwidth; | 
					
						
							|  |  |  |     Real m_lowCutoff; | 
					
						
							| 
									
										
										
										
											2022-05-18 19:20:39 +02:00
										 |  |  |     FFTWindow::Function m_fftWindow; | 
					
						
							| 
									
										
										
										
											2023-11-05 13:23:31 +01:00
										 |  |  |     bool m_dnr; | 
					
						
							|  |  |  |     int  m_dnrScheme; | 
					
						
							|  |  |  |     float m_dnrAboveAvgFactor; | 
					
						
							|  |  |  |     float m_dnrSigmaFactor; | 
					
						
							|  |  |  |     int  m_dnrNbPeaks; | 
					
						
							|  |  |  |     float m_dnrAlpha; | 
					
						
							| 
									
										
										
										
											2022-05-18 19:20:39 +02: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 23:22:06 +02:00
										 |  |  |     Real m_volume; | 
					
						
							| 
									
										
										
										
											2022-05-18 19:20:39 +02:00
										 |  |  |     // int  m_spanLog2;
 | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02: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 10:33:27 +01:00
										 |  |  |     bool m_dnr; | 
					
						
							|  |  |  |     int  m_dnrScheme; | 
					
						
							|  |  |  |     float m_dnrAboveAvgFactor; | 
					
						
							|  |  |  |     float m_dnrSigmaFactor; | 
					
						
							|  |  |  |     int  m_dnrNbPeaks; | 
					
						
							|  |  |  |     float m_dnrAlpha; | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  |     quint32 m_rgbColor; | 
					
						
							| 
									
										
										
										
											2017-11-19 18:18:17 +01:00
										 |  |  |     QString m_title; | 
					
						
							| 
									
										
										
										
											2018-03-27 11:17:11 +02:00
										 |  |  |     QString m_audioDeviceName; | 
					
						
							| 
									
										
										
										
											2019-09-23 01:25:17 +02:00
										 |  |  |     int m_streamIndex; //!< MIMO channel. Not relevant when connected to SI (single Rx).
 | 
					
						
							| 
									
										
										
										
											2018-12-24 00:51:29 +01:00
										 |  |  |     bool m_useReverseAPI; | 
					
						
							|  |  |  |     QString m_reverseAPIAddress; | 
					
						
							|  |  |  |     uint16_t m_reverseAPIPort; | 
					
						
							|  |  |  |     uint16_t m_reverseAPIDeviceIndex; | 
					
						
							|  |  |  |     uint16_t m_reverseAPIChannelIndex; | 
					
						
							| 
									
										
										
										
											2022-04-12 16:20:45 +02:00
										 |  |  |     int m_workspaceIndex; | 
					
						
							|  |  |  |     QByteArray m_geometryBytes; | 
					
						
							| 
									
										
										
										
											2022-04-12 18:27:27 +02:00
										 |  |  |     bool m_hidden; | 
					
						
							| 
									
										
										
										
											2022-05-18 19:20:39 +02:00
										 |  |  |     // FFTWindow::Function m_fftWindow;
 | 
					
						
							|  |  |  |     std::vector<SSBDemodFilterSettings> m_filterBank; | 
					
						
							|  |  |  |     unsigned int m_filterIndex; | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     Serializable *m_channelMarker; | 
					
						
							|  |  |  |     Serializable *m_spectrumGUI; | 
					
						
							| 
									
										
										
										
											2022-01-09 05:27:12 +01:00
										 |  |  |     Serializable *m_rollupState; | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     SSBDemodSettings(); | 
					
						
							|  |  |  |     void resetToDefaults(); | 
					
						
							|  |  |  |     void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; } | 
					
						
							|  |  |  |     void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; } | 
					
						
							| 
									
										
										
										
											2022-01-09 05:27:12 +01:00
										 |  |  |     void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; } | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  |     QByteArray serialize() const; | 
					
						
							|  |  |  |     bool deserialize(const QByteArray& data); | 
					
						
							| 
									
										
										
										
											2018-02-09 08:42:28 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |     static const int m_minPowerThresholdDB; | 
					
						
							|  |  |  |     static const float m_mminPowerThresholdDBf; | 
					
						
							| 
									
										
										
										
											2017-10-01 23:22:06 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif /* PLUGINS_CHANNELRX_DEMODSSB_SSBDEMODSETTINGS_H_ */
 |