SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
#include <afsquelch.h>
Public Member Functions | |
AFSquelch () | |
virtual | ~AFSquelch () |
void | setCoefficients (unsigned int N, unsigned int nbAvg, unsigned int sampleRate, unsigned int samplesAttack, unsigned int samplesDecay, const double *tones) |
center frequency of tones tested More... | |
void | setThreshold (double _threshold) |
bool | analyze (double sample) |
bool | evaluate () |
const double * | getToneSet () const |
bool | open () const |
void | reset () |
Protected Member Functions | |
void | feedback (double sample) |
void | feedForward () |
Private Attributes | |
unsigned int | m_nbAvg |
number of power samples taken for moving average More... | |
unsigned int | m_N |
unsigned int | m_sampleRate |
unsigned int | m_samplesProcessed |
unsigned int | m_samplesAvgProcessed |
unsigned int | m_maxPowerIndex |
unsigned int | m_nTones |
unsigned int | m_samplesAttack |
unsigned int | m_attackCount |
unsigned int | m_samplesDecay |
unsigned int | m_decayCount |
unsigned int | m_squelchCount |
bool | m_isOpen |
double | m_threshold |
double * | m_k |
double * | m_coef |
double * | m_toneSet |
double * | m_u0 |
double * | m_u1 |
double * | m_power |
std::vector< MovingAverage< double > > | m_movingAverages |
AFSquelch: AF squelch class based on the Modified Goertzel algorithm.
Definition at line 28 of file afsquelch.h.
AFSquelch::AFSquelch | ( | ) |
Definition at line 24 of file afsquelch.cpp.
References cos(), m_coef, m_k, m_movingAverages, m_N, m_nbAvg, m_nTones, M_PI, m_power, m_sampleRate, m_toneSet, m_u0, and m_u1.
|
virtual |
bool AFSquelch::analyze | ( | double | sample | ) |
Definition at line 116 of file afsquelch.cpp.
References feedback(), feedForward(), m_N, m_nbAvg, m_samplesAvgProcessed, and m_samplesProcessed.
Referenced by NFMDemod::processOneSample().
bool AFSquelch::evaluate | ( | ) |
Definition at line 188 of file afsquelch.cpp.
References m_isOpen, m_movingAverages, m_nTones, m_samplesAttack, m_samplesDecay, m_squelchCount, and m_threshold.
Referenced by feedForward(), and NFMDemod::processOneSample().
|
protected |
|
protected |
Definition at line 158 of file afsquelch.cpp.
References evaluate(), m_coef, m_movingAverages, m_nTones, m_power, m_u0, and m_u1.
Referenced by analyze().
|
inline |
Definition at line 52 of file afsquelch.h.
|
inline |
Definition at line 57 of file afsquelch.h.
void AFSquelch::reset | ( | ) |
Definition at line 172 of file afsquelch.cpp.
References m_isOpen, m_maxPowerIndex, m_movingAverages, m_nTones, m_power, m_samplesProcessed, m_u0, and m_u1.
Referenced by NFMDemod::applySettings(), and setThreshold().
void AFSquelch::setCoefficients | ( | unsigned int | N, |
unsigned int | nbAvg, | ||
unsigned int | sampleRate, | ||
unsigned int | samplesAttack, | ||
unsigned int | samplesDecay, | ||
const double * | tones | ||
) |
center frequency of tones tested
N | the algorithm "block" size |
nbAvg | averaging size |
sampleRate | input signal sample rate |
samplesAttack | number of results before squelch opens |
samplesDecay | number of results keeping squelch open |
Definition at line 71 of file afsquelch.cpp.
References cos(), m_attackCount, m_coef, m_decayCount, m_isOpen, m_k, m_maxPowerIndex, m_movingAverages, m_N, m_nbAvg, m_nTones, M_PI, m_power, m_sampleRate, m_samplesAttack, m_samplesAvgProcessed, m_samplesDecay, m_samplesProcessed, m_squelchCount, m_threshold, m_toneSet, m_u0, and m_u1.
Referenced by NFMDemod::applyAudioSampleRate(), and NFMDemod::NFMDemod().
void AFSquelch::setThreshold | ( | double | _threshold | ) |
Definition at line 271 of file afsquelch.cpp.
References m_threshold, and reset().
Referenced by NFMDemod::applySettings().
|
private |
Definition at line 76 of file afsquelch.h.
Referenced by setCoefficients().
|
private |
Definition at line 83 of file afsquelch.h.
Referenced by AFSquelch(), feedback(), feedForward(), setCoefficients(), and ~AFSquelch().
|
private |
Definition at line 78 of file afsquelch.h.
Referenced by setCoefficients().
|
private |
Definition at line 80 of file afsquelch.h.
Referenced by evaluate(), reset(), and setCoefficients().
|
private |
Definition at line 82 of file afsquelch.h.
Referenced by AFSquelch(), setCoefficients(), and ~AFSquelch().
|
private |
Definition at line 73 of file afsquelch.h.
Referenced by reset(), and setCoefficients().
|
private |
Definition at line 88 of file afsquelch.h.
Referenced by AFSquelch(), evaluate(), feedForward(), reset(), and setCoefficients().
|
private |
Definition at line 69 of file afsquelch.h.
Referenced by AFSquelch(), analyze(), and setCoefficients().
|
private |
number of power samples taken for moving average
Definition at line 68 of file afsquelch.h.
Referenced by AFSquelch(), analyze(), and setCoefficients().
|
private |
Definition at line 74 of file afsquelch.h.
Referenced by AFSquelch(), evaluate(), feedback(), feedForward(), reset(), and setCoefficients().
|
private |
Definition at line 87 of file afsquelch.h.
Referenced by AFSquelch(), feedForward(), reset(), setCoefficients(), and ~AFSquelch().
|
private |
Definition at line 70 of file afsquelch.h.
Referenced by AFSquelch(), and setCoefficients().
|
private |
Definition at line 75 of file afsquelch.h.
Referenced by evaluate(), and setCoefficients().
|
private |
Definition at line 72 of file afsquelch.h.
Referenced by analyze(), and setCoefficients().
|
private |
Definition at line 77 of file afsquelch.h.
Referenced by evaluate(), and setCoefficients().
|
private |
Definition at line 71 of file afsquelch.h.
Referenced by analyze(), reset(), and setCoefficients().
|
private |
Definition at line 79 of file afsquelch.h.
Referenced by evaluate(), and setCoefficients().
|
private |
Definition at line 81 of file afsquelch.h.
Referenced by evaluate(), setCoefficients(), and setThreshold().
|
private |
Definition at line 84 of file afsquelch.h.
Referenced by AFSquelch(), setCoefficients(), and ~AFSquelch().
|
private |
Definition at line 85 of file afsquelch.h.
Referenced by AFSquelch(), feedback(), feedForward(), reset(), setCoefficients(), and ~AFSquelch().
|
private |
Definition at line 86 of file afsquelch.h.
Referenced by AFSquelch(), feedback(), feedForward(), reset(), setCoefficients(), and ~AFSquelch().