diff options
author | Tom Rondeau | 2011-09-23 14:08:12 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-09-23 14:08:12 -0400 |
commit | daf509ec3febdd0d33c11caddb85e3d7d1638be3 (patch) | |
tree | d6e125591d405cb24b9b7ffb7134a36631ebef64 /gnuradio-core/src/lib/general | |
parent | 4059269b4261c891923658a6faa0fa780888449b (diff) | |
parent | b5bcd15e8d269583a02869e8f341155239f9fa18 (diff) | |
download | gnuradio-daf509ec3febdd0d33c11caddb85e3d7d1638be3.tar.gz gnuradio-daf509ec3febdd0d33c11caddb85e3d7d1638be3.tar.bz2 gnuradio-daf509ec3febdd0d33c11caddb85e3d7d1638be3.zip |
Merge branch 'master' into next
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc | 8 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc | 3 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_pll_refout_cc.cc | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc b/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc index 19ab316a1..1668f71f0 100644 --- a/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc +++ b/gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.cc @@ -99,6 +99,9 @@ gr_pll_carriertracking_cc::work (int noutput_items, float t_imag, t_real; for (int i = 0; i < noutput_items; i++){ + gr_sincosf(d_phase,&t_imag,&t_real); + optr[i] = iptr[i] * gr_complex(t_real,-t_imag); + error = phase_detector(iptr[i],d_phase); d_freq = d_freq + d_beta * error; @@ -108,9 +111,8 @@ gr_pll_carriertracking_cc::work (int noutput_items, d_freq = d_max_freq; else if (d_freq < d_min_freq) d_freq = d_min_freq; - gr_sincosf(d_phase,&t_imag,&t_real); - optr[i] = iptr[i] * gr_complex(t_real,-t_imag); - d_locksig = d_locksig * (1.0 - d_alpha) + d_alpha*(iptr[i].real() * t_real + iptr[i].imag() * t_imag); + d_locksig = d_locksig * (1.0 - d_alpha) + + d_alpha*(iptr[i].real() * t_real + iptr[i].imag() * t_imag); if ((d_squelch_enable) && !lock_detector()) optr[i] = 0; diff --git a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc index 1f17f2afc..997ba4042 100644 --- a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc +++ b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc @@ -80,6 +80,8 @@ gr_pll_freqdet_cf::work (int noutput_items, int size = noutput_items; while (size-- > 0) { + *optr++ = d_freq; + error = phase_detector(*iptr++,d_phase); d_freq = d_freq + d_beta * error; @@ -89,7 +91,6 @@ gr_pll_freqdet_cf::work (int noutput_items, d_freq = d_max_freq; else if (d_freq < d_min_freq) d_freq = d_min_freq; - *optr++ = d_freq; } return noutput_items; } diff --git a/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc b/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc index 8a7fbf88b..d01f28e45 100644 --- a/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc +++ b/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc @@ -82,6 +82,9 @@ gr_pll_refout_cc::work (int noutput_items, int size = noutput_items; while (size-- > 0) { + gr_sincosf(d_phase,&t_imag,&t_real); + *optr++ = gr_complex(t_real,t_imag); + error = phase_detector(*iptr++,d_phase); d_freq = d_freq + d_beta * error; @@ -91,8 +94,6 @@ gr_pll_refout_cc::work (int noutput_items, d_freq = d_max_freq; else if (d_freq < d_min_freq) d_freq = d_min_freq; - gr_sincosf(d_phase,&t_imag,&t_real); - *optr++ = gr_complex(t_real,t_imag); } return noutput_items; } |