mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-10 04:37:37 +01:00
added OQPSK mode to the meteor demodulator
This commit is contained in:
parent
5acdab0d22
commit
1c081cad78
@ -57,9 +57,12 @@ public:
|
|||||||
if (config.conf[name].contains("brokenModulation")) {
|
if (config.conf[name].contains("brokenModulation")) {
|
||||||
brokenModulation = config.conf[name]["brokenModulation"];
|
brokenModulation = config.conf[name]["brokenModulation"];
|
||||||
}
|
}
|
||||||
|
if (config.conf[name].contains("oqpsk")) {
|
||||||
|
oqpsk = config.conf[name]["oqpsk"];
|
||||||
|
}
|
||||||
config.release();
|
config.release();
|
||||||
|
|
||||||
vfo = sigpath::vfoManager.createVFO(name, ImGui::WaterfallVFO::REF_CENTER, 0, 150000, INPUT_SAMPLE_RATE, 150000, 150000, true);
|
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, 1e-6, 0.01);
|
||||||
split.init(&demod.out);
|
split.init(&demod.out);
|
||||||
split.bindStream(&symSinkStream);
|
split.bindStream(&symSinkStream);
|
||||||
@ -151,6 +154,13 @@ private:
|
|||||||
config.release(true);
|
config.release(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui::Checkbox(CONCAT("OQPSK##oqpsk", _this->name), &_this->oqpsk)) {
|
||||||
|
_this->demod.setOQPSK(_this->oqpsk);
|
||||||
|
config.acquire();
|
||||||
|
config.conf[_this->name]["oqpsk"] = _this->oqpsk;
|
||||||
|
config.release(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (!_this->folderSelect.pathIsValid() && _this->enabled) { style::beginDisabled(); }
|
if (!_this->folderSelect.pathIsValid() && _this->enabled) { style::beginDisabled(); }
|
||||||
|
|
||||||
if (_this->recording) {
|
if (_this->recording) {
|
||||||
@ -245,7 +255,7 @@ private:
|
|||||||
uint64_t dataWritten = 0;
|
uint64_t dataWritten = 0;
|
||||||
std::ofstream recFile;
|
std::ofstream recFile;
|
||||||
bool brokenModulation = false;
|
bool brokenModulation = false;
|
||||||
|
bool oqpsk = false;
|
||||||
int8_t* writeBuffer;
|
int8_t* writeBuffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -129,6 +129,12 @@ namespace dsp::demod {
|
|||||||
costas.setBrokenModulation(enabled);
|
costas.setBrokenModulation(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setOQPSK(bool enabled) {
|
||||||
|
assert(base_type::_block_init);
|
||||||
|
std::lock_guard<std::recursive_mutex> lck(base_type::ctrlMtx);
|
||||||
|
oqpsk = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
void reset() {
|
void reset() {
|
||||||
assert(base_type::_block_init);
|
assert(base_type::_block_init);
|
||||||
std::lock_guard<std::recursive_mutex> lck(base_type::ctrlMtx);
|
std::lock_guard<std::recursive_mutex> lck(base_type::ctrlMtx);
|
||||||
@ -144,6 +150,18 @@ namespace dsp::demod {
|
|||||||
rrc.process(count, in, out);
|
rrc.process(count, in, out);
|
||||||
agc.process(count, out, out);
|
agc.process(count, out, out);
|
||||||
costas.process(count, out, out);
|
costas.process(count, out, out);
|
||||||
|
|
||||||
|
if (oqpsk) {
|
||||||
|
// Single sample delay + deinterleave
|
||||||
|
for (int i = 0; i < count; i++) {
|
||||||
|
float tmp = out[i].im;
|
||||||
|
out[i].im = lastI;
|
||||||
|
lastI = tmp;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: Additional 1/24th sample delay
|
||||||
|
}
|
||||||
|
|
||||||
return recov.process(count, out, out);
|
return recov.process(count, out, out);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,6 +184,8 @@ namespace dsp::demod {
|
|||||||
double _samplerate;
|
double _samplerate;
|
||||||
int _rrcTapCount;
|
int _rrcTapCount;
|
||||||
double _rrcBeta;
|
double _rrcBeta;
|
||||||
|
float lastI = 0.0f;
|
||||||
|
bool oqpsk = false;
|
||||||
|
|
||||||
tap<float> rrcTaps;
|
tap<float> rrcTaps;
|
||||||
filter::FIR<complex_t, float> rrc;
|
filter::FIR<complex_t, float> rrc;
|
||||||
|
Loading…
Reference in New Issue
Block a user