diff options
author | Johnathan Corgan <jcorgan@corganenterprises.com> | 2011-09-24 11:29:15 -0700 |
---|---|---|
committer | Johnathan Corgan <jcorgan@corganenterprises.com> | 2011-09-24 11:29:15 -0700 |
commit | 1ad2ce69ea04aa3a3837ecacc7089452bb937973 (patch) | |
tree | 36847dcd4f30bdb8c19740e0908ce5fe9f7b4d8f /gr-noaa/lib | |
parent | 9479dac98e305441fbbb0121836c98d8106369dc (diff) |
gr-noaa: fix PLL to generate output, then update errormaint-3.4.0
Diffstat (limited to 'gr-noaa/lib')
-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 08ab1d15ff..ba2ce98d55 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; |