diff options
author | Tom | 2009-10-07 18:31:50 -0700 |
---|---|---|
committer | Tom | 2009-10-07 18:31:50 -0700 |
commit | 521f3e514a7e8a887ba7a35b81d255e85fbcabc1 (patch) | |
tree | 38921c93c73283b29985f53a59ba64abf6e0a580 /gnuradio-core/src | |
parent | eeea619b80578665fd470f850c390d4aa6782336 (diff) | |
download | gnuradio-521f3e514a7e8a887ba7a35b81d255e85fbcabc1.tar.gz gnuradio-521f3e514a7e8a887ba7a35b81d255e85fbcabc1.tar.bz2 gnuradio-521f3e514a7e8a887ba7a35b81d255e85fbcabc1.zip |
Working sync for QPSK
Diffstat (limited to 'gnuradio-core/src')
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc | 9 |
1 files changed, 6 insertions, 3 deletions
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; |