Imported Upstream version 3.2.2
[debian/gnuradio] / gnuradio-core / src / lib / general / gr_clock_recovery_mm_cc.h
index cacd231967ab5805de175b31a801747b26f759e1..04227a14542c8790f56c535f412607e71d4d364b 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <gr_block.h>
 #include <gr_complex.h>
+#include <gr_math.h>
 
 class gri_mmse_fir_interpolator_cc;
 
@@ -38,13 +39,14 @@ gr_make_clock_recovery_mm_cc (float omega, float gain_omega, float mu, float gai
 
 /*!
  * \brief Mueller and Müller (M&M) based clock recovery block with complex input, complex output.
- * \ingroup block
+ * \ingroup sync_blk
  *
  * This implements the Mueller and Müller (M&M) discrete-time error-tracking synchronizer.
- *
- * See "Digital Communication Receivers: Synchronization, Channel
- * Estimation and Signal Processing" by Heinrich Meyr, Marc Moeneclaey, & Stefan Fechtel.
- * ISBN 0-471-50275-8.
+ * The complex version here is based on:
+ * Modified Mueller and Muller clock recovery circuit
+ * Based:
+ *    G. R. Danesfahani, T.G. Jeans, "Optimisation of modified Mueller and Muller 
+ *    algorithm,"  Electronics Letters, Vol. 31, no. 13,  22 June 1995, pp. 1032 - 1033.
  */
 class gr_clock_recovery_mm_cc : public gr_block
 {
@@ -68,6 +70,7 @@ class gr_clock_recovery_mm_cc : public gr_block
     d_omega = omega;
     d_min_omega = omega*(1.0 - d_omega_relative_limit);
     d_max_omega = omega*(1.0 + d_omega_relative_limit);
+    d_omega_mid = 0.5*(d_min_omega+d_max_omega);
   }
 
 protected:
@@ -81,6 +84,7 @@ protected:
   float                                d_min_omega;            // minimum allowed omega
   float                                d_max_omega;            // maximum allowed omeg
   float                                d_omega_relative_limit; // used to compute min and max omega
+  float                         d_omega_mid;
   float                         d_gain_mu;
   gr_complex                    d_last_sample;
   gri_mmse_fir_interpolator_cc         *d_interp;