From 521f3e514a7e8a887ba7a35b81d255e85fbcabc1 Mon Sep 17 00:00:00 2001 From: Tom Date: Wed, 7 Oct 2009 18:31:50 -0700 Subject: Working sync for QPSK --- gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gnuradio-core') diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc index fe399ffba..7dc5715d9 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc @@ -234,15 +234,18 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items, int nrequired = ninput_items[0] - d_taps_per_filter; int i = 0, count = d_start_count; - float error = 0; + float error; + float error_r, error_i; // produce output as long as we can and there are enough input samples while((i < noutput_items) && (count < nrequired)) { // FIXME: prevent this from asserting - assert(filtnum < d_nfilters); + assert(d_filtnum < d_nfilters); out[i] = d_filters[d_filtnum]->filter(&in[count]); - error = (out[i] * d_diff_filters[d_filtnum]->filter(&in[count])).real(); + error_r = out[i].real() * d_diff_filters[d_filtnum]->filter(&in[count]).real(); + error_i = out[i].imag() * d_diff_filters[d_filtnum]->filter(&in[count]).imag(); + error = error_i + error_r; d_k = d_k + d_alpha*error + d_rate; d_rate = d_rate + d_beta*error; -- cgit