mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-12 21:42:51 +01:00
bugfix
This commit is contained in:
parent
1c081cad78
commit
8d05c1e181
@ -63,7 +63,7 @@ public:
|
|||||||
config.release();
|
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);
|
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.init(&demod.out);
|
||||||
split.bindStream(&symSinkStream);
|
split.bindStream(&symSinkStream);
|
||||||
split.bindStream(&sinkStream);
|
split.bindStream(&sinkStream);
|
||||||
@ -102,6 +102,7 @@ public:
|
|||||||
double bw = gui::waterfall.getBandwidth();
|
double bw = gui::waterfall.getBandwidth();
|
||||||
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);
|
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);
|
||||||
|
|
||||||
|
demod.setBrokenModulation(brokenModulation);
|
||||||
demod.setInput(vfo->output);
|
demod.setInput(vfo->output);
|
||||||
|
|
||||||
demod.start();
|
demod.start();
|
||||||
|
@ -11,8 +11,8 @@ namespace dsp::demod {
|
|||||||
public:
|
public:
|
||||||
Meteor() {}
|
Meteor() {}
|
||||||
|
|
||||||
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) {
|
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) {
|
||||||
init(in, symbolrate, samplerate, rrcTapCount, rrcBeta, agcRate, costasBandwidth, brokenModulation, omegaGain, muGain);
|
init(in, symbolrate, samplerate, rrcTapCount, rrcBeta, agcRate, costasBandwidth, brokenModulation, oqpsk, omegaGain, muGain);
|
||||||
}
|
}
|
||||||
|
|
||||||
~Meteor() {
|
~Meteor() {
|
||||||
@ -21,11 +21,12 @@ namespace dsp::demod {
|
|||||||
taps::free(rrcTaps);
|
taps::free(rrcTaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
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) {
|
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) {
|
||||||
_symbolrate = symbolrate;
|
_symbolrate = symbolrate;
|
||||||
_samplerate = samplerate;
|
_samplerate = samplerate;
|
||||||
_rrcTapCount = rrcTapCount;
|
_rrcTapCount = rrcTapCount;
|
||||||
_rrcBeta = rrcBeta;
|
_rrcBeta = rrcBeta;
|
||||||
|
_oqpsk = oqpsk;
|
||||||
|
|
||||||
rrcTaps = taps::rootRaisedCosine<float>(_rrcTapCount, _rrcBeta, _symbolrate, _samplerate);
|
rrcTaps = taps::rootRaisedCosine<float>(_rrcTapCount, _rrcBeta, _symbolrate, _samplerate);
|
||||||
rrc.init(NULL, rrcTaps);
|
rrc.init(NULL, rrcTaps);
|
||||||
@ -132,7 +133,7 @@ namespace dsp::demod {
|
|||||||
void setOQPSK(bool enabled) {
|
void setOQPSK(bool enabled) {
|
||||||
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);
|
||||||
oqpsk = enabled;
|
_oqpsk = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset() {
|
void reset() {
|
||||||
@ -151,7 +152,7 @@ namespace dsp::demod {
|
|||||||
agc.process(count, out, out);
|
agc.process(count, out, out);
|
||||||
costas.process(count, out, out);
|
costas.process(count, out, out);
|
||||||
|
|
||||||
if (oqpsk) {
|
if (_oqpsk) {
|
||||||
// Single sample delay + deinterleave
|
// Single sample delay + deinterleave
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
float tmp = out[i].im;
|
float tmp = out[i].im;
|
||||||
@ -185,7 +186,7 @@ namespace dsp::demod {
|
|||||||
int _rrcTapCount;
|
int _rrcTapCount;
|
||||||
double _rrcBeta;
|
double _rrcBeta;
|
||||||
float lastI = 0.0f;
|
float lastI = 0.0f;
|
||||||
bool oqpsk = false;
|
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