1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-06-16 13:32:27 -04:00

Provision for x^-2 samples in nfmdemod

This commit is contained in:
f4exb 2015-05-14 15:15:10 +02:00
parent 3d09951ab5
commit 5f1da35490
2 changed files with 6 additions and 4 deletions

View File

@ -113,8 +113,9 @@ void NFMDemod::feed(SampleVector::const_iterator begin, SampleVector::const_iter
m_lastArgument = argument; m_lastArgument = argument;
*/ */
Complex d = conj(m_lastSample) * ci; Complex d = conj(m_m1Sample) * ci;
m_lastSample = ci; m_m2Sample = m_m1Sample;
m_m1Sample = ci;
Real demod = atan2(d.imag(), d.real()); Real demod = atan2(d.imag(), d.real());
//Real demod = arctan2(d.imag(), d.real()); //Real demod = arctan2(d.imag(), d.real());
/* /*
@ -174,7 +175,7 @@ void NFMDemod::start()
m_interpolatorRegulation = 0.9999; m_interpolatorRegulation = 0.9999;
m_interpolatorDistance = 1.0; m_interpolatorDistance = 1.0;
m_interpolatorDistanceRemain = 0.0; m_interpolatorDistanceRemain = 0.0;
m_lastSample = 0; m_m1Sample = 0;
} }
void NFMDemod::stop() void NFMDemod::stop()

View File

@ -116,7 +116,8 @@ private:
int m_squelchState; int m_squelchState;
Real m_lastArgument; Real m_lastArgument;
Complex m_lastSample; Complex m_m1Sample;
Complex m_m2Sample;
MovingAverage m_movingAverage; MovingAverage m_movingAverage;
AudioVector m_audioBuffer; AudioVector m_audioBuffer;