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 <phasediscri.h>
Public Member Functions | |
void | reset () |
void | setFMScaling (Real fmScaling) |
Real | phaseDiscriminator (const Complex &sample) |
Real | phaseDiscriminatorDelta (const Complex &sample, double &magsq, Real &fmDev) |
Real | phaseDiscriminator2 (const Complex &sample) |
Real | phaseDiscriminator3 (const Complex &sample, long double &magsq, Real &fltVal) |
Private Member Functions | |
float | atan2_approximation1 (float y, float x) |
float | atan2_approximation2 (float y, float x) |
Private Attributes | |
Complex | m_m1Sample |
Complex | m_m2Sample |
Real | m_fmScaling |
Real | m_fltPreviousI |
Real | m_fltPreviousQ |
Real | m_fltPreviousI2 |
Real | m_fltPreviousQ2 |
Real | m_prevArg |
Definition at line 27 of file phasediscri.h.
|
inlineprivate |
|
inlineprivate |
Definition at line 173 of file phasediscri.h.
References PI_FLOAT, and PIBY2_FLOAT.
Referenced by phaseDiscriminatorDelta().
Standard discriminator using atan2. On modern processors this is as efficient as the non atan2 one. This is better for high fidelity.
Definition at line 51 of file phasediscri.h.
References m_fmScaling, m_m1Sample, and M_PI.
Referenced by DSDDemod::feed(), UDPSink::feed(), and BFMDemod::feed().
Alternative without atan at the expense of a slight distorsion on very wideband signals http://www.embedded.com/design/configurable-systems/4212086/DSP-Tricks–Frequency-demodulation-algorithms- in addition it needs scaling by instantaneous magnitude squared and volume (0..10) adjustment factor
Definition at line 86 of file phasediscri.h.
References m_fmScaling, m_m1Sample, and m_m2Sample.
|
inline |
Second alternative
Definition at line 103 of file phasediscri.h.
References m_fltPreviousI, m_fltPreviousI2, m_fltPreviousQ, m_fltPreviousQ2, m_fmScaling, and sqrt().
|
inline |
Discriminator with phase detection using atan2 and frequency by derivation. This yields a precise deviation to sample rate ratio: Sample rate => +/-1.0
Definition at line 62 of file phasediscri.h.
References atan2_approximation2(), m_fmScaling, M_PI, and m_prevArg.
Referenced by ATVDemod::demod(), WFMDemod::feed(), and NFMDemod::processOneSample().
|
inline |
Reset stored values
Definition at line 33 of file phasediscri.h.
References m_m1Sample, and m_m2Sample.
Referenced by WFMDemod::start(), DSDDemod::start(), UDPSink::start(), NFMDemod::start(), and BFMDemod::start().
|
inline |
Scaling factor so that resulting excursion maps to [-1,+1]
Definition at line 42 of file phasediscri.h.
References m_fmScaling.
Referenced by WFMDemod::applyChannelSettings(), BFMDemod::applyChannelSettings(), WFMDemod::applySettings(), UDPSink::applySettings(), NFMDemod::applySettings(), DSDDemod::applySettings(), BFMDemod::applySettings(), ATVDemod::applySettings(), ATVDemod::ATVDemod(), BFMDemod::BFMDemod(), UDPSink::UDPSink(), and WFMDemod::WFMDemod().
|
private |
Definition at line 136 of file phasediscri.h.
Referenced by phaseDiscriminator3().
|
private |
Definition at line 138 of file phasediscri.h.
Referenced by phaseDiscriminator3().
|
private |
Definition at line 137 of file phasediscri.h.
Referenced by phaseDiscriminator3().
|
private |
Definition at line 139 of file phasediscri.h.
Referenced by phaseDiscriminator3().
|
private |
Definition at line 135 of file phasediscri.h.
Referenced by phaseDiscriminator(), phaseDiscriminator2(), phaseDiscriminator3(), phaseDiscriminatorDelta(), and setFMScaling().
|
private |
Definition at line 133 of file phasediscri.h.
Referenced by phaseDiscriminator(), phaseDiscriminator2(), and reset().
|
private |
Definition at line 134 of file phasediscri.h.
Referenced by phaseDiscriminator2(), and reset().
|
private |
Definition at line 140 of file phasediscri.h.
Referenced by phaseDiscriminatorDelta().