summaryrefslogtreecommitdiff
path: root/gr-noaa
diff options
context:
space:
mode:
authorJosh Blum2011-09-26 12:04:27 -0700
committerJosh Blum2011-09-26 12:04:27 -0700
commit1ff42298b8c5216587ecddcd3a3571def2e5fa21 (patch)
treef06d584ae6196e39829c17b5a9f6d728a03adfd1 /gr-noaa
parent4aa4411f2a3f184760ff5f534eec015f557f80c9 (diff)
parent18201a678610a608a4c952122ce6dc9430e8e2d1 (diff)
downloadgnuradio-1ff42298b8c5216587ecddcd3a3571def2e5fa21.tar.gz
gnuradio-1ff42298b8c5216587ecddcd3a3571def2e5fa21.tar.bz2
gnuradio-1ff42298b8c5216587ecddcd3a3571def2e5fa21.zip
Merge branch 'next' of http://gnuradio.org/git/gnuradio into next
Diffstat (limited to 'gr-noaa')
-rw-r--r--gr-noaa/lib/noaa_hrpt_pll_cf.cc9
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;