From b97d4ae651ab57b5d8e72ea8668d682b27bdf1ab Mon Sep 17 00:00:00 2001 From: Ben Reynwar Date: Wed, 19 Dec 2012 10:45:51 -0700 Subject: atsc: Minor changes to atsc. --- gr-atsc/src/lib/atsci_sssr.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gr-atsc/src/lib/atsci_sssr.cc') diff --git a/gr-atsc/src/lib/atsci_sssr.cc b/gr-atsc/src/lib/atsci_sssr.cc index 48c0c51fb..7a9791467 100644 --- a/gr-atsc/src/lib/atsci_sssr.cc +++ b/gr-atsc/src/lib/atsci_sssr.cc @@ -29,6 +29,7 @@ #include #include #include +#include /* * ---------------------------------------------------------------- @@ -142,7 +143,9 @@ 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 = 1; int corr_out = d_correlator.update (bit); int weight = sipp (corr_out); int corr_value = d_integrator.update (weight, d_counter); @@ -153,6 +156,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; -- cgit From 22cbfd0138751fdb035a2076100f7c4753c6d7d9 Mon Sep 17 00:00:00 2001 From: Ben Reynwar Date: Wed, 19 Dec 2012 11:14:59 -0700 Subject: atsc: Fixed bug I made in last commit. --- gr-atsc/src/lib/atsci_sssr.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gr-atsc/src/lib/atsci_sssr.cc') diff --git a/gr-atsc/src/lib/atsci_sssr.cc b/gr-atsc/src/lib/atsci_sssr.cc index 7a9791467..efd9ffbbd 100644 --- a/gr-atsc/src/lib/atsci_sssr.cc +++ b/gr-atsc/src/lib/atsci_sssr.cc @@ -145,6 +145,8 @@ atsci_sssr::update (sssr::sample_t sample_in, // input 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); -- cgit From 0195bb84d59bfefd2875d8e76efda36449c5f568 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Fri, 11 Jan 2013 11:17:17 -0800 Subject: atsc: commented out debug code --- gr-atsc/src/lib/atsci_sssr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gr-atsc/src/lib/atsci_sssr.cc') diff --git a/gr-atsc/src/lib/atsci_sssr.cc b/gr-atsc/src/lib/atsci_sssr.cc index efd9ffbbd..56a0c6a00 100644 --- a/gr-atsc/src/lib/atsci_sssr.cc +++ b/gr-atsc/src/lib/atsci_sssr.cc @@ -158,7 +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; + //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; -- cgit