Merged changes from svn repository trunk.
[debian/gnuradio] / gnuradio-core / src / lib / general / gr_pll_carriertracking_cc.cc
index f40709b82244913c7482d2a9fb79a574d982303a..5f0e9a6921290d14b16573a0d6e396e29cb7ef07 100644 (file)
@@ -6,7 +6,7 @@
  * 
  * GNU Radio is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
  * any later version.
  * 
  * GNU Radio is distributed in the hope that it will be useful,
@@ -28,6 +28,7 @@
 #include <gr_io_signature.h>
 #include <gr_sincos.h>
 #include <math.h>
+#include <gr_math.h>
 
 #define M_TWOPI (2*M_PI)
 
@@ -63,7 +64,8 @@ float
 gr_pll_carriertracking_cc::phase_detector(gr_complex sample,float ref_phase)
 {
   float sample_phase;
-  sample_phase = atan2(sample.imag(),sample.real());
+  //  sample_phase = atan2(sample.imag(),sample.real());
+  sample_phase = gr_fast_atan2f(sample.imag(),sample.real());
   return mod_2pi(sample_phase-ref_phase);
 }