summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <ikj1234i@yahoo.com>2017-12-22 18:16:18 -0500
committerMax <ikj1234i@yahoo.com>2017-12-22 18:16:18 -0500
commit1b1c8842c156482714386295c2d5123215f14156 (patch)
treea8276161f5ab8ad6642769e84c7c335e03f8641e
parent90fbe465187d3abc77a35ed7d0db6d11a6a452f9 (diff)
add get_freq_error()
-rw-r--r--op25/gr-op25_repeater/include/op25_repeater/gardner_costas_cc.h1
-rw-r--r--op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc5
-rw-r--r--op25/gr-op25_repeater/lib/gardner_costas_cc_impl.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/op25/gr-op25_repeater/include/op25_repeater/gardner_costas_cc.h b/op25/gr-op25_repeater/include/op25_repeater/gardner_costas_cc.h
index 261ca11..c7e9089 100644
--- a/op25/gr-op25_repeater/include/op25_repeater/gardner_costas_cc.h
+++ b/op25/gr-op25_repeater/include/op25_repeater/gardner_costas_cc.h
@@ -48,6 +48,7 @@ namespace gr {
*/
static sptr make(float samples_per_symbol, float gain_mu, float gain_omega, float alpha, float beta, float max_freq, float min_freq);
virtual void set_omega(float omega) {}
+ virtual float get_freq_error(void) {}
};
} // namespace op25_repeater
diff --git a/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc b/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc
index 766652d..94ad643 100644
--- a/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc
+++ b/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.cc
@@ -146,6 +146,9 @@ void gardner_costas_cc_impl::set_omega (float omega) {
memset(d_dl, 0, NUM_COMPLEX * sizeof(gr_complex));
}
+float gardner_costas_cc_impl::get_freq_error (void) {
+ return (d_freq);
+}
void
gardner_costas_cc_impl::forecast(int noutput_items, gr_vector_int &ninput_items_required)
@@ -261,7 +264,7 @@ gardner_costas_cc_impl::general_work (int noutput_items,
float error_real = (d_last_sample.real() - interp_samp.real()) * interp_samp_mid.real();
float error_imag = (d_last_sample.imag() - interp_samp.imag()) * interp_samp_mid.imag();
gr_complex diffdec = interp_samp * conj(d_last_sample);
- (void)slicer(std::arg(diffdec));
+ // cpu reduction (void)slicer(std::arg(diffdec));
d_last_sample = interp_samp; // save for next time
#if 1
float symbol_error = error_real + error_imag; // Gardner loop error
diff --git a/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.h b/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.h
index 7fc8eb7..e39beb1 100644
--- a/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.h
+++ b/op25/gr-op25_repeater/lib/gardner_costas_cc_impl.h
@@ -67,6 +67,7 @@ namespace gr {
//! Sets value of omega and its min and max values
void set_omega (float omega);
+ float get_freq_error(void);
protected:
bool input_sample0(gr_complex, gr_complex& outp);