Skip to content

Commit 8d05c1e

Browse files
bugfix
1 parent 1c081ca commit 8d05c1e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

decoder_modules/meteor_demodulator/src/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class MeteorDemodulatorModule : public ModuleManager::Instance {
6363
config.release();
6464

6565
vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, 0, INPUT_SAMPLE_RATE, INPUT_SAMPLE_RATE, INPUT_SAMPLE_RATE, INPUT_SAMPLE_RATE, true);
66-
demod.init(vfo->output, 72000.0f, INPUT_SAMPLE_RATE, 33, 0.6f, 0.1f, 0.005f, brokenModulation, 1e-6, 0.01);
66+
demod.init(vfo->output, 72000.0f, INPUT_SAMPLE_RATE, 33, 0.6f, 0.1f, 0.005f, brokenModulation, oqpsk, 1e-6, 0.01);
6767
split.init(&demod.out);
6868
split.bindStream(&symSinkStream);
6969
split.bindStream(&sinkStream);
@@ -102,6 +102,7 @@ class MeteorDemodulatorModule : public ModuleManager::Instance {
102102
double bw = gui::waterfall.getBandwidth();
103103
vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, std::clamp<double>(0, -bw / 2.0, bw / 2.0), 150000, INPUT_SAMPLE_RATE, 150000, 150000, true);
104104

105+
demod.setBrokenModulation(brokenModulation);
105106
demod.setInput(vfo->output);
106107

107108
demod.start();

decoder_modules/meteor_demodulator/src/meteor_demod.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace dsp::demod {
1111
public:
1212
Meteor() {}
1313

14-
Meteor(stream<complex_t>* in, double symbolrate, double samplerate, int rrcTapCount, double rrcBeta, double agcRate, double costasBandwidth, bool brokenModulation, double omegaGain, double muGain, double omegaRelLimit = 0.01) {
15-
init(in, symbolrate, samplerate, rrcTapCount, rrcBeta, agcRate, costasBandwidth, brokenModulation, omegaGain, muGain);
14+
Meteor(stream<complex_t>* 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) {
15+
init(in, symbolrate, samplerate, rrcTapCount, rrcBeta, agcRate, costasBandwidth, brokenModulation, oqpsk, omegaGain, muGain);
1616
}
1717

1818
~Meteor() {
@@ -21,11 +21,12 @@ namespace dsp::demod {
2121
taps::free(rrcTaps);
2222
}
2323

24-
void init(stream<complex_t>* in, double symbolrate, double samplerate, int rrcTapCount, double rrcBeta, double agcRate, double costasBandwidth, bool brokenModulation, double omegaGain, double muGain, double omegaRelLimit = 0.01) {
24+
void init(stream<complex_t>* 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) {
2525
_symbolrate = symbolrate;
2626
_samplerate = samplerate;
2727
_rrcTapCount = rrcTapCount;
2828
_rrcBeta = rrcBeta;
29+
_oqpsk = oqpsk;
2930

3031
rrcTaps = taps::rootRaisedCosine<float>(_rrcTapCount, _rrcBeta, _symbolrate, _samplerate);
3132
rrc.init(NULL, rrcTaps);
@@ -132,7 +133,7 @@ namespace dsp::demod {
132133
void setOQPSK(bool enabled) {
133134
assert(base_type::_block_init);
134135
std::lock_guard<std::recursive_mutex> lck(base_type::ctrlMtx);
135-
oqpsk = enabled;
136+
_oqpsk = enabled;
136137
}
137138

138139
void reset() {
@@ -151,7 +152,7 @@ namespace dsp::demod {
151152
agc.process(count, out, out);
152153
costas.process(count, out, out);
153154

154-
if (oqpsk) {
155+
if (_oqpsk) {
155156
// Single sample delay + deinterleave
156157
for (int i = 0; i < count; i++) {
157158
float tmp = out[i].im;
@@ -185,7 +186,7 @@ namespace dsp::demod {
185186
int _rrcTapCount;
186187
double _rrcBeta;
187188
float lastI = 0.0f;
188-
bool oqpsk = false;
189+
bool _oqpsk = false;
189190

190191
tap<float> rrcTaps;
191192
filter::FIR<complex_t, float> rrc;

0 commit comments

Comments
 (0)