These routines have been modified to use fast atan2
authorn4hy <n4hy@221aa14e-8319-0410-a670-987f0aec2ac5>
Thu, 14 Dec 2006 18:03:00 +0000 (18:03 +0000)
committern4hy <n4hy@221aa14e-8319-0410-a670-987f0aec2ac5>
Thu, 14 Dec 2006 18:03:00 +0000 (18:03 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4084 221aa14e-8319-0410-a670-987f0aec2ac5

gnuradio-core/src/lib/general/gr_pll_freqdet_cf.cc
gnuradio-core/src/lib/general/gr_pll_refout_cc.cc

index f090a3e00a400e86aebff11d6b39a7887723b0a1..8f27e3a00783a575c0a1f7c4727163baa8740191 100644 (file)
@@ -29,6 +29,7 @@
 #include <gr_pll_freqdet_cf.h>
 #include <gr_io_signature.h>
 #include <math.h>
+#include <gr_math.h>
 
 #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);
 }
 
index 3208c5841425f3a8187830f66e79e12a24191894..e39f8dd4adaf226f2210542d62417ec1f7fc8e80 100644 (file)
@@ -30,6 +30,7 @@
 #include <gr_io_signature.h>
 #include <gr_sincos.h>
 #include <math.h>
+#include <gr_math.h>
 
 #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);
 }