diff options
-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; } |