more work on debugging the pager decoder

This commit is contained in:
AlexandreRouma
2024-02-02 22:52:19 +01:00
parent 7ab743d05b
commit a08d2a0f85
4 changed files with 91 additions and 18 deletions

View File

@ -23,14 +23,14 @@ public:
// Configure blocks
demod.init(NULL, -4500.0, samplerate);
dcBlock.init(NULL, 0.001);
//dcBlock.init(NULL, 0.001); // NOTE: DC blocking causes issues because no scrambling, think more about it
float taps[] = { 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f, 0.1f };
shape = dsp::taps::fromArray<float>(10, taps);
fir.init(NULL, shape);
recov.init(NULL, samplerate/baudrate, 1e5, 0.1, 0.05);
recov.init(NULL, samplerate/baudrate, 1e-4, 1.0, 0.05);
// Free useless buffers
dcBlock.out.free();
// dcBlock.out.free();
fir.out.free();
recov.out.free();
@ -40,13 +40,17 @@ public:
int process(int count, dsp::complex_t* in, float* softOut, uint8_t* out) {
count = demod.process(count, in, demod.out.readBuf);
count = dcBlock.process(count, demod.out.readBuf, demod.out.readBuf);
//count = dcBlock.process(count, demod.out.readBuf, demod.out.readBuf);
count = fir.process(count, demod.out.readBuf, demod.out.readBuf);
count = recov.process(count, demod.out.readBuf, softOut);
dsp::digital::BinarySlicer::process(count, softOut, out);
return count;
}
void detune() {
recov.setOmega(9.99);
}
int run() {
int count = base_type::_in->read();
if (count < 0) { return -1; }
@ -63,7 +67,7 @@ public:
private:
dsp::demod::Quadrature demod;
dsp::correction::DCBlocker<float> dcBlock;
//dsp::correction::DCBlocker<float> dcBlock;
dsp::tap<float> shape;
dsp::filter::FIR<float, float> fir;
dsp::clock_recovery::MM<float> recov;