diff options
author | Johnathan Corgan | 2011-09-24 11:31:29 -0700 |
---|---|---|
committer | Johnathan Corgan | 2011-09-24 11:31:29 -0700 |
commit | 5249ba01cded451215d46bd35b924f5b923d617a (patch) | |
tree | 545e9f3c50ccd43b2f0f4cea7bb30e1821a7f56b /gr-noaa | |
parent | 1371c92be1ed0a4b371915168eecacd00fc3538c (diff) | |
parent | 1ad2ce69ea04aa3a3837ecacc7089452bb937973 (diff) | |
download | gnuradio-5249ba01cded451215d46bd35b924f5b923d617a.tar.gz gnuradio-5249ba01cded451215d46bd35b924f5b923d617a.tar.bz2 gnuradio-5249ba01cded451215d46bd35b924f5b923d617a.zip |
Merge branch 'maint'
Diffstat (limited to 'gr-noaa')
-rw-r--r-- | gr-noaa/lib/noaa_hrpt_pll_cf.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gr-noaa/lib/noaa_hrpt_pll_cf.cc b/gr-noaa/lib/noaa_hrpt_pll_cf.cc index 08ab1d15f..ba2ce98d5 100644 --- a/gr-noaa/lib/noaa_hrpt_pll_cf.cc +++ b/gr-noaa/lib/noaa_hrpt_pll_cf.cc @@ -67,15 +67,16 @@ noaa_hrpt_pll_cf::work(int noutput_items, for (int i = 0; i < noutput_items; i++) { + // Generate and mix out carrier + float re, im; + gr_sincosf(d_phase, &im, &re); + out[i] = (in[i]*gr_complex(re, -im)).imag(); + // Adjust PLL phase/frequency float error = phase_wrap(gr_fast_atan2f(in[i].imag(), in[i].real()) - d_phase); d_freq = gr_branchless_clip(d_freq + error*d_beta, d_max_offset); d_phase = phase_wrap(d_phase + error*d_alpha + d_freq); - // Generate and mix out carrier - float re, im; - gr_sincosf(d_phase, &im, &re); - out[i] = (in[i]*gr_complex(re, -im)).imag(); } return noutput_items; |