From: n4hy Date: Thu, 14 Dec 2006 18:03:00 +0000 (+0000) Subject: These routines have been modified to use fast atan2 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=8046aa32043bf58ef0a6657b2fba8fe357a294af;p=debian%2Fgnuradio These routines have been modified to use fast atan2 git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4084 221aa14e-8319-0410-a670-987f0aec2ac5 --- 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 f090a3e0..8f27e3a0 100644 --- a/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc +++ b/gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc @@ -29,6 +29,7 @@ #include #include #include +#include #define M_TWOPI (2*M_PI) @@ -63,7 +64,7 @@ float gr_pll_freqdet_cf::phase_detector(gr_complex sample,float ref_phase) { float sample_phase; - sample_phase = atan2(sample.imag(),sample.real()); + sample_phase = gr_fast_atan2f(sample.imag(),sample.real()); return mod_2pi(sample_phase-ref_phase); } 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 3208c584..e39f8dd4 100644 --- a/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc +++ b/gnuradio-core/src/lib/general/gr_pll_refout_cc.cc @@ -30,6 +30,7 @@ #include #include #include +#include #define M_TWOPI (2*M_PI) @@ -64,7 +65,7 @@ float gr_pll_refout_cc::phase_detector(gr_complex sample,float ref_phase) { float sample_phase; - sample_phase = atan2(sample.imag(),sample.real()); + sample_phase = gr_fast_atan2f(sample.imag(),sample.real()); return mod_2pi(sample_phase-ref_phase); }