summaryrefslogtreecommitdiff
path: root/gr-digital/lib/digital_costas_loop_cc.h
diff options
context:
space:
mode:
authorJosh Blum2011-08-17 11:56:33 -0700
committerJosh Blum2011-08-17 11:56:33 -0700
commite6ed4fa7bb0d253adbf0cf2ae4da7c301b3c971f (patch)
tree09f43f64f581af7b5159debaf7489365b0a1259d /gr-digital/lib/digital_costas_loop_cc.h
parent40a9071074b2ec0f6daf74e50e131b89b9f66226 (diff)
parented564be6c78a3e22b3c98862834192f8b20bc551 (diff)
downloadgnuradio-e6ed4fa7bb0d253adbf0cf2ae4da7c301b3c971f.tar.gz
gnuradio-e6ed4fa7bb0d253adbf0cf2ae4da7c301b3c971f.tar.bz2
gnuradio-e6ed4fa7bb0d253adbf0cf2ae4da7c301b3c971f.zip
Merge branch 'digital' of https://github.com/trondeau/gnuradio into digital
Conflicts: gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h gnuradio-core/src/lib/general/gr_fll_band_edge_cc.h gnuradio-core/src/lib/general/gr_pll_refout_cc.h gr-digital/lib/digital_constellation_receiver_cb.cc gr-digital/lib/digital_constellation_receiver_cb.h gr-digital/lib/digital_costas_loop_cc.h
Diffstat (limited to 'gr-digital/lib/digital_costas_loop_cc.h')
-rw-r--r--gr-digital/lib/digital_costas_loop_cc.h49
1 files changed, 8 insertions, 41 deletions
diff --git a/gr-digital/lib/digital_costas_loop_cc.h b/gr-digital/lib/digital_costas_loop_cc.h
index 099fca3be..c78726341 100644
--- a/gr-digital/lib/digital_costas_loop_cc.h
+++ b/gr-digital/lib/digital_costas_loop_cc.h
@@ -24,8 +24,8 @@
#ifndef INCLUDED_DIGITAL_COSTAS_LOOP_CC_H
#define INCLUDED_DIGITAL_COSTAS_LOOP_CC_H
-#include <digital_api.h>
#include <gr_sync_block.h>
+#include <gri_control_loop.h>
#include <stdexcept>
#include <fstream>
@@ -54,13 +54,15 @@
* \param min_freq the minimum frequency deviation (radians/sample) the loop can handle
* \param order the loop order, either 2 or 4
*/
+
+#include <digital_api.h>
+
class digital_costas_loop_cc;
typedef boost::shared_ptr<digital_costas_loop_cc> digital_costas_loop_cc_sptr;
DIGITAL_API digital_costas_loop_cc_sptr
-digital_make_costas_loop_cc (float damping, float nat_freq,
- int order
+digital_make_costas_loop_cc (float loop_bw, int order
) throw (std::invalid_argument);
@@ -74,34 +76,17 @@ digital_make_costas_loop_cc (float damping, float nat_freq,
*
* \p order must be 2 or 4.
*/
-class DIGITAL_API digital_costas_loop_cc : public gr_sync_block
+class DIGITAL_API digital_costas_loop_cc : public gr_sync_block, public gri_control_loop
{
friend DIGITAL_API digital_costas_loop_cc_sptr
- digital_make_costas_loop_cc (float damping, float nat_freq,
- int order
+ digital_make_costas_loop_cc (float loop_bw, int order
) throw (std::invalid_argument);
- float d_alpha, d_beta, d_max_freq, d_min_freq, d_phase, d_freq;
- float d_nat_freq, d_damping;
int d_order;
- digital_costas_loop_cc (float damping, float nat_freq,
- int order
+ digital_costas_loop_cc (float loop_bw, int order
) throw (std::invalid_argument);
-
- /*! \brief update the system gains from omega and eta
- *
- * This function updates the system gains based on the natural
- * frequency (omega) and damping factor (eta) of the system.
- * These two factors can be set separately through their own
- * set functions.
- *
- * These equations are summarized nicely in this paper from Berkeley:
- * http://www.complextoreal.com/chapters/pll.pdf
- */
- void update_gains();
-
/*! \brief the phase detector circuit for 8th-order PSK loops
* \param sample complex sample
* \return the phase error
@@ -125,27 +110,9 @@ class DIGITAL_API digital_costas_loop_cc : public gr_sync_block
public:
- void set_natural_freq(float w);
- void set_damping_factor(float eta);
-
- /*! \brief get the first order gain
- *
- */
- float alpha() const { return d_alpha; }
-
- /*! \brief get the second order gain
- *
- */
- float beta() const { return d_beta; }
-
int work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
-
- /*! \brief returns the current NCO frequency in radians/sample
- *
- */
- float freq() const { return d_freq; }
};
#endif