diff options
author | Tom <trondeau@vt.edu> | 2009-10-06 19:31:45 -0700 |
---|---|---|
committer | Tom <trondeau@vt.edu> | 2009-10-06 19:31:45 -0700 |
commit | 45286cd769e42c325b7c65a2f0a96757e2e97b97 (patch) | |
tree | a83f88ff46640e3c99ca34573a214aa58aedf555 /gnuradio-core/src/lib | |
parent | dd7adee2762b62adf80c3e4fa87d42557a7a78d2 (diff) |
Adding accessor functions for both alpha and beta.
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc | 3 | ||||
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h | 9 | ||||
-rw-r--r-- | gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i | 3 |
3 files changed, 10 insertions, 5 deletions
diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc index 60ce5d2b3e..62282fd6af 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc @@ -60,7 +60,8 @@ gr_pfb_clock_sync_ccf::gr_pfb_clock_sync_ccf (float sps, float gain, // The accumulator keeps track of overflow to increment the stride correctly. // set it here to the fractional difference based on the initial phaes // assert(init_phase <= 2*M_PI); - set_gain(gain); + set_alpha(gain); + set_beta(0.25*gain*gain); d_k = d_nfilters / 2; d_rate = 0; d_start_count = 0; diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h index b8e0f83b68..5a60619319 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h @@ -98,10 +98,13 @@ public: void print_taps(); void print_diff_taps(); - void set_gain(float gain) + void set_alpha(float alpha) { - d_alpha = gain; - d_beta = 0.25*d_alpha*d_alpha; + d_alpha = alpha; + } + void set_beta(float beta) + { + d_beta = beta; } int general_work (int noutput_items, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i index 9defbc7cd0..7859154791 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.i @@ -46,5 +46,6 @@ class gr_pfb_clock_sync_ccf : public gr_block std::vector<float> diff_channel_taps(int channel); void print_taps(); void print_diff_taps(); - void set_gain(float gain); + void set_alpha(float alpha); + void set_beta(float beta); }; |