summaryrefslogtreecommitdiff
path: root/gr-digital
diff options
context:
space:
mode:
authorTom Rondeau2011-12-30 10:58:04 -0500
committerTom Rondeau2011-12-30 10:58:04 -0500
commit3d92c79e311f40cb2f3839b5ac68eab76c476408 (patch)
treefc7318c032e074fe86549ece726ebb9a5ca7931f /gr-digital
parent36dda1f11620c6c9db63036d76a67b3be3f711bc (diff)
downloadgnuradio-3d92c79e311f40cb2f3839b5ac68eab76c476408.tar.gz
gnuradio-3d92c79e311f40cb2f3839b5ac68eab76c476408.tar.bz2
gnuradio-3d92c79e311f40cb2f3839b5ac68eab76c476408.zip
digital: SNR estimators just take a complex vector; not full vector of complex vectors.
Diffstat (limited to 'gr-digital')
-rw-r--r--gr-digital/include/digital_impl_mpsk_snr_est.h12
-rw-r--r--gr-digital/lib/digital_impl_mpsk_snr_est.cc22
2 files changed, 12 insertions, 22 deletions
diff --git a/gr-digital/include/digital_impl_mpsk_snr_est.h b/gr-digital/include/digital_impl_mpsk_snr_est.h
index 5a85d100b..cae95da09 100644
--- a/gr-digital/include/digital_impl_mpsk_snr_est.h
+++ b/gr-digital/include/digital_impl_mpsk_snr_est.h
@@ -72,7 +72,7 @@ class DIGITAL_API digital_impl_mpsk_snr_est
//! Update the current registers
virtual int update(int noutput_items,
- gr_vector_const_void_star &input_items);
+ const gr_complex *in);
//! Use the register values to compute a new estimate
virtual double snr();
@@ -104,7 +104,7 @@ class DIGITAL_API digital_impl_mpsk_snr_est_simple :
~digital_impl_mpsk_snr_est_simple() {}
int update(int noutput_items,
- gr_vector_const_void_star &input_items);
+ const gr_complex *in);
double snr();
};
@@ -136,7 +136,7 @@ class DIGITAL_API digital_impl_mpsk_snr_est_skew :
~digital_impl_mpsk_snr_est_skew() {}
int update(int noutput_items,
- gr_vector_const_void_star &input_items);
+ const gr_complex *in);
double snr();
};
@@ -174,7 +174,7 @@ class DIGITAL_API digital_impl_mpsk_snr_est_m2m4 :
~digital_impl_mpsk_snr_est_m2m4() {}
int update(int noutput_items,
- gr_vector_const_void_star &input_items);
+ const gr_complex *in);
double snr();
};
@@ -229,7 +229,7 @@ class DIGITAL_API digital_impl_snr_est_m2m4 :
~digital_impl_snr_est_m2m4() {}
int update(int noutput_items,
- gr_vector_const_void_star &input_items);
+ const gr_complex *in);
double snr();
};
@@ -272,7 +272,7 @@ class DIGITAL_API digital_impl_mpsk_snr_est_svr :
~digital_impl_mpsk_snr_est_svr() {}
int update(int noutput_items,
- gr_vector_const_void_star &input_items);
+ const gr_complex *in);
double snr();
};
diff --git a/gr-digital/lib/digital_impl_mpsk_snr_est.cc b/gr-digital/lib/digital_impl_mpsk_snr_est.cc
index 87ac84e04..38177083f 100644
--- a/gr-digital/lib/digital_impl_mpsk_snr_est.cc
+++ b/gr-digital/lib/digital_impl_mpsk_snr_est.cc
@@ -50,7 +50,7 @@ digital_impl_mpsk_snr_est::alpha() const
int
digital_impl_mpsk_snr_est::update(int noutput_items,
- gr_vector_const_void_star &input_items)
+ const gr_complex *in)
{
throw std::runtime_error("digital_impl_mpsk_snr_est: Unimplemented");
}
@@ -76,10 +76,8 @@ digital_impl_mpsk_snr_est_simple::digital_impl_mpsk_snr_est_simple(
int
digital_impl_mpsk_snr_est_simple::update(
int noutput_items,
- gr_vector_const_void_star &input_items)
+ const gr_complex *in)
{
- const gr_complex *in = (const gr_complex *) input_items[0];
-
for (int i = 0; i < noutput_items; i++){
double y1 = abs(in[i]);
d_y1 = d_alpha*y1 + d_beta*d_y1;
@@ -115,10 +113,8 @@ digital_impl_mpsk_snr_est_skew::digital_impl_mpsk_snr_est_skew(
int
digital_impl_mpsk_snr_est_skew::update(
int noutput_items,
- gr_vector_const_void_star &input_items)
+ const gr_complex *in)
{
- const gr_complex *in = (const gr_complex *) input_items[0];
-
for (int i = 0; i < noutput_items; i++){
double y1 = abs(in[i]);
d_y1 = d_alpha*y1 + d_beta*d_y1;
@@ -161,10 +157,8 @@ digital_impl_mpsk_snr_est_m2m4::digital_impl_mpsk_snr_est_m2m4(
int
digital_impl_mpsk_snr_est_m2m4::update(
int noutput_items,
- gr_vector_const_void_star &input_items)
+ const gr_complex *in)
{
- const gr_complex *in = (const gr_complex *) input_items[0];
-
for (int i = 0; i < noutput_items; i++){
double y1 = abs(in[i])*abs(in[i]);
d_y1 = d_alpha*y1 + d_beta*d_y1;
@@ -200,10 +194,8 @@ digital_impl_snr_est_m2m4::digital_impl_snr_est_m2m4(
int
digital_impl_snr_est_m2m4::update(
int noutput_items,
- gr_vector_const_void_star &input_items)
+ const gr_complex *in)
{
- const gr_complex *in = (const gr_complex *) input_items[0];
-
for (int i = 0; i < noutput_items; i++) {
double y1 = abs(in[i])*abs(in[i]);
d_y1 = d_alpha*y1 + d_beta*d_y1;
@@ -242,10 +234,8 @@ digital_impl_mpsk_snr_est_svr::digital_impl_mpsk_snr_est_svr(
int
digital_impl_mpsk_snr_est_svr::update(
int noutput_items,
- gr_vector_const_void_star &input_items)
+ const gr_complex *in)
{
- const gr_complex *in = (const gr_complex *) input_items[0];
-
for (int i = 0; i < noutput_items; i++){
double x = abs(in[i]);
double x1 = abs(in[i-1]);