diff options
author | Johnathan Corgan | 2013-01-11 11:18:07 -0800 |
---|---|---|
committer | Johnathan Corgan | 2013-01-11 11:18:07 -0800 |
commit | ca407436f4d42aee0511181e2c2e6eecdccfa7d7 (patch) | |
tree | fa8bc68cbe0e5338a73f4fbf1be1b4af83d53e8e /gr-atsc/src/lib/atsci_sssr.cc | |
parent | 3abf4a11534d0db96e32830f629c8e34a8098798 (diff) | |
parent | 0195bb84d59bfefd2875d8e76efda36449c5f568 (diff) | |
download | gnuradio-ca407436f4d42aee0511181e2c2e6eecdccfa7d7.tar.gz gnuradio-ca407436f4d42aee0511181e2c2e6eecdccfa7d7.tar.bz2 gnuradio-ca407436f4d42aee0511181e2c2e6eecdccfa7d7.zip |
Merge branch 'atsc'
Diffstat (limited to 'gr-atsc/src/lib/atsci_sssr.cc')
-rw-r--r-- | gr-atsc/src/lib/atsci_sssr.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gr-atsc/src/lib/atsci_sssr.cc b/gr-atsc/src/lib/atsci_sssr.cc index 48c0c51fb..56a0c6a00 100644 --- a/gr-atsc/src/lib/atsci_sssr.cc +++ b/gr-atsc/src/lib/atsci_sssr.cc @@ -29,6 +29,7 @@ #include <gr_math.h> #include <stdio.h> #include <boost/math/special_functions/sign.hpp> +#include <iostream> /* * ---------------------------------------------------------------- @@ -142,7 +143,11 @@ atsci_sssr::update (sssr::sample_t sample_in, // input double qo = d_quad_filter.update (sample_in); d_quad_output[d_counter] = qo; - int bit = boost::math::signbit (sample_in) ^ 1; // slice on sign: + => 1, - => 0 + int bit = boost::math::signbit (sample_in); + if (bit != 0) + bit = 0; + else + bit = 1; int corr_out = d_correlator.update (bit); int weight = sipp (corr_out); int corr_value = d_integrator.update (weight, d_counter); @@ -153,6 +158,7 @@ atsci_sssr::update (sssr::sample_t sample_in, // input int best_correlation_value; best_correlation_index = d_integrator.find_max (&best_correlation_value); d_seg_locked = best_correlation_value >= MIN_SEG_LOCK_CORRELATION_VALUE; + //std::cout << "best = " << best_correlation_value << " min is " << MIN_SEG_LOCK_CORRELATION_VALUE << std::endl; d_timing_adjust = d_quad_output[best_correlation_index]; d_symbol_index = SYMBOL_INDEX_OFFSET - 1 - best_correlation_index; |