- closed the Gardner Loop
git-svn-id: http://moon:8086/svn/software/trunk/libsrc/cpp@985 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
@@ -78,8 +78,8 @@ void wavSave(const char *pName, WAVEHEADER const &format, CVec &iq)
|
||||
|
||||
}
|
||||
|
||||
const radio_float_t STR_GAIN_LEAD_AQU = (radio_float_t)4.00E-4; // 2E-3
|
||||
const radio_float_t STR_GAIN_LAG_AQU = (radio_float_t)0.50E-6; // 5E-7
|
||||
const radio_float_t STR_GAIN_LEAD_AQU = (radio_float_t)1.00E-2; // 2E-3
|
||||
const radio_float_t STR_GAIN_LAG_AQU = (radio_float_t)1.00E-7; // 5E-7
|
||||
const radio_float_t STR_GAIN_LEAD_TRK = (radio_float_t)4.00E-6; // 8E-4
|
||||
const radio_float_t STR_GAIN_LAG_TRK = (radio_float_t)1.00E-9; // 1E-6
|
||||
|
||||
@@ -100,6 +100,10 @@ class TimingGeneratorGardner : public Interpolation::TimingGenerator
|
||||
LeadLagSetCoeff(&str_loopfilter_coeff, STR_GAIN_LEAD_AQU, STR_GAIN_LAG_AQU);
|
||||
}
|
||||
|
||||
void setOmega(radio_float_t omega)
|
||||
{
|
||||
LeadLagInit(&loop_filter_str, omega);
|
||||
}
|
||||
virtual ~TimingGeneratorGardner() = default;
|
||||
|
||||
void process(ComplexScalar const &iq)
|
||||
@@ -110,10 +114,9 @@ class TimingGeneratorGardner : public Interpolation::TimingGenerator
|
||||
// Symbol timing recovery
|
||||
vd = STRGardnerProcess(&m_SymbolTimingRevovery, toCpx(iq));
|
||||
vc = LeadLagProcess(&loop_filter_str, &str_loopfilter_coeff, vd);
|
||||
cout << "Vd = " << vd << ", Vc = " << vc << endl;
|
||||
cout << "Vd = " << vd << ", Vc = " << vc << ", mu = " << m_mu << endl;
|
||||
|
||||
setOmega(vc);
|
||||
update();
|
||||
update(vc);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -130,8 +133,9 @@ void test()
|
||||
|
||||
// Setup IQ data
|
||||
WAVEHEADER header;
|
||||
CVec iq_in = wavLoad("m2_12k_12k_i_q_short.wav", header);
|
||||
// CVec iq_in = wavLoad("sine_220.wav", header);
|
||||
// CVec iq_in = wavLoad("m2_12k_12k_i_q_short.wav", header);
|
||||
// CVec iq_in = wavLoad("sine_12k_ef_1_percent.wav", header);
|
||||
CVec iq_in = wavLoad("sine_12k.wav", header);
|
||||
CVec iq_out;
|
||||
iq_out.reserve(8*iq_in.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user