mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2026-04-20 23:22:43 +00:00
More DSP cleanup + Remove FastFFT option because it should never be used
This commit is contained in:
@@ -43,7 +43,7 @@ namespace dsp::demod {
|
||||
pilotFirTaps = taps::bandPass<complex_t>(18750.0, 19250.0, 3000.0, _samplerate, true);
|
||||
pilotFir.init(NULL, pilotFirTaps);
|
||||
rtoc.init(NULL);
|
||||
pilotPLL.init(NULL, 25000.0 / _samplerate, 0.0, math::freqToOmega(19000.0, _samplerate), math::freqToOmega(18750.0, _samplerate), math::freqToOmega(19250.0, _samplerate));
|
||||
pilotPLL.init(NULL, 25000.0 / _samplerate, 0.0, math::hzToRads(19000.0, _samplerate), math::hzToRads(18750.0, _samplerate), math::hzToRads(19250.0, _samplerate));
|
||||
lprDelay.init(NULL, ((pilotFirTaps.size - 1) / 2) + 1);
|
||||
lmrDelay.init(NULL, ((pilotFirTaps.size - 1) / 2) + 1);
|
||||
audioFirTaps = taps::lowPass(15000.0, 4000.0, _samplerate);
|
||||
@@ -82,8 +82,8 @@ namespace dsp::demod {
|
||||
pilotFirTaps = taps::bandPass<complex_t>(18750.0, 19250.0, 3000.0, samplerate, true);
|
||||
pilotFir.setTaps(pilotFirTaps);
|
||||
|
||||
pilotPLL.setFrequencyLimits(math::freqToOmega(18750.0, _samplerate), math::freqToOmega(19250.0, _samplerate));
|
||||
pilotPLL.setInitialFreq(math::freqToOmega(19000.0, _samplerate));
|
||||
pilotPLL.setFrequencyLimits(math::hzToRads(18750.0, _samplerate), math::hzToRads(19250.0, _samplerate));
|
||||
pilotPLL.setInitialFreq(math::hzToRads(19000.0, _samplerate));
|
||||
lprDelay.setDelay(((pilotFirTaps.size - 1) / 2) + 1);
|
||||
lmrDelay.setDelay(((pilotFirTaps.size - 1) / 2) + 1);
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#include "../processor.h"
|
||||
#include "../math/fast_atan2.h"
|
||||
#include "../math/freq_to_omega.h"
|
||||
#include "../math/norm_phase_diff.h"
|
||||
#include "../math/hz_to_rads.h"
|
||||
#include "../math/normalize_phase.h"
|
||||
|
||||
namespace dsp::demod {
|
||||
class Quadrature : public Processor<complex_t, float> {
|
||||
@@ -21,7 +21,7 @@ namespace dsp::demod {
|
||||
}
|
||||
|
||||
virtual void init(stream<complex_t>* in, double deviation, double samplerate) {
|
||||
init(in, math::freqToOmega(deviation, samplerate));
|
||||
init(in, math::hzToRads(deviation, samplerate));
|
||||
}
|
||||
|
||||
void setDeviation(double deviation) {
|
||||
@@ -33,13 +33,13 @@ namespace dsp::demod {
|
||||
void setDeviation(double deviation, double samplerate) {
|
||||
assert(base_type::_block_init);
|
||||
std::lock_guard<std::recursive_mutex> lck(base_type::ctrlMtx);
|
||||
_invDeviation = 1.0 / math::freqToOmega(deviation, samplerate);
|
||||
_invDeviation = 1.0 / math::hzToRads(deviation, samplerate);
|
||||
}
|
||||
|
||||
inline int process(int count, complex_t* in, float* out) {
|
||||
for (int i = 0; i < count; i++) {
|
||||
float cphase = in[i].phase();
|
||||
out[i] = math::normPhaseDiff(cphase - phase) * _invDeviation;
|
||||
out[i] = math::normalizePhase(cphase - phase) * _invDeviation;
|
||||
phase = cphase;
|
||||
}
|
||||
return count;
|
||||
|
||||
Reference in New Issue
Block a user