diff --git a/decoder_modules/meteor_demodulator/src/main.cpp b/decoder_modules/meteor_demodulator/src/main.cpp index 05373fcf..bad29d50 100644 --- a/decoder_modules/meteor_demodulator/src/main.cpp +++ b/decoder_modules/meteor_demodulator/src/main.cpp @@ -63,7 +63,7 @@ public: config.release(); vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, 0, INPUT_SAMPLE_RATE, INPUT_SAMPLE_RATE, INPUT_SAMPLE_RATE, INPUT_SAMPLE_RATE, true); - demod.init(vfo->output, 72000.0f, INPUT_SAMPLE_RATE, 33, 0.6f, 0.1f, 0.005f, brokenModulation, 1e-6, 0.01); + demod.init(vfo->output, 72000.0f, INPUT_SAMPLE_RATE, 33, 0.6f, 0.1f, 0.005f, brokenModulation, oqpsk, 1e-6, 0.01); split.init(&demod.out); split.bindStream(&symSinkStream); split.bindStream(&sinkStream); @@ -102,6 +102,7 @@ public: double bw = gui::waterfall.getBandwidth(); vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, std::clamp(0, -bw / 2.0, bw / 2.0), 150000, INPUT_SAMPLE_RATE, 150000, 150000, true); + demod.setBrokenModulation(brokenModulation); demod.setInput(vfo->output); demod.start(); diff --git a/decoder_modules/meteor_demodulator/src/meteor_demod.h b/decoder_modules/meteor_demodulator/src/meteor_demod.h index 35ebbc94..4e7ea5de 100644 --- a/decoder_modules/meteor_demodulator/src/meteor_demod.h +++ b/decoder_modules/meteor_demodulator/src/meteor_demod.h @@ -11,8 +11,8 @@ namespace dsp::demod { public: Meteor() {} - Meteor(stream* in, double symbolrate, double samplerate, int rrcTapCount, double rrcBeta, double agcRate, double costasBandwidth, bool brokenModulation, double omegaGain, double muGain, double omegaRelLimit = 0.01) { - init(in, symbolrate, samplerate, rrcTapCount, rrcBeta, agcRate, costasBandwidth, brokenModulation, omegaGain, muGain); + Meteor(stream* in, double symbolrate, double samplerate, int rrcTapCount, double rrcBeta, double agcRate, double costasBandwidth, bool brokenModulation, bool oqpsk, double omegaGain, double muGain, double omegaRelLimit = 0.01) { + init(in, symbolrate, samplerate, rrcTapCount, rrcBeta, agcRate, costasBandwidth, brokenModulation, oqpsk, omegaGain, muGain); } ~Meteor() { @@ -21,11 +21,12 @@ namespace dsp::demod { taps::free(rrcTaps); } - void init(stream* in, double symbolrate, double samplerate, int rrcTapCount, double rrcBeta, double agcRate, double costasBandwidth, bool brokenModulation, double omegaGain, double muGain, double omegaRelLimit = 0.01) { + void init(stream* in, double symbolrate, double samplerate, int rrcTapCount, double rrcBeta, double agcRate, double costasBandwidth, bool brokenModulation, bool oqpsk, double omegaGain, double muGain, double omegaRelLimit = 0.01) { _symbolrate = symbolrate; _samplerate = samplerate; _rrcTapCount = rrcTapCount; _rrcBeta = rrcBeta; + _oqpsk = oqpsk; rrcTaps = taps::rootRaisedCosine(_rrcTapCount, _rrcBeta, _symbolrate, _samplerate); rrc.init(NULL, rrcTaps); @@ -132,7 +133,7 @@ namespace dsp::demod { void setOQPSK(bool enabled) { assert(base_type::_block_init); std::lock_guard lck(base_type::ctrlMtx); - oqpsk = enabled; + _oqpsk = enabled; } void reset() { @@ -151,7 +152,7 @@ namespace dsp::demod { agc.process(count, out, out); costas.process(count, out, out); - if (oqpsk) { + if (_oqpsk) { // Single sample delay + deinterleave for (int i = 0; i < count; i++) { float tmp = out[i].im; @@ -185,7 +186,7 @@ namespace dsp::demod { int _rrcTapCount; double _rrcBeta; float lastI = 0.0f; - bool oqpsk = false; + bool _oqpsk = false; tap rrcTaps; filter::FIR rrc;