aboutsummaryrefslogtreecommitdiffstats
path: root/AlignSample.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-02-12 16:59:45 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-02-12 16:59:45 +0100
commit2f5770d4abfbc97966724a942717199047c79d10 (patch)
treeb819cecc02dac4b619ec9bb4cd720481c99462d9 /AlignSample.cpp
parentf907c18d8efb14c1f2138ef7699cb7b5b86200b8 (diff)
downloadodr-dpd-2f5770d4abfbc97966724a942717199047c79d10.tar.gz
odr-dpd-2f5770d4abfbc97966724a942717199047c79d10.tar.bz2
odr-dpd-2f5770d4abfbc97966724a942717199047c79d10.zip
Run subsample alignment procedure
Diffstat (limited to 'AlignSample.cpp')
-rw-r--r--AlignSample.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/AlignSample.cpp b/AlignSample.cpp
index dd29f64..7de4459 100644
--- a/AlignSample.cpp
+++ b/AlignSample.cpp
@@ -214,7 +214,7 @@ void AlignSample::delay_rx_samples(size_t delay)
static std::vector<double> gen_omega(size_t length)
{
- if (not length % 2 == 0) {
+ if ((length % 2) == 1) {
throw std::runtime_error("Needs an even length array.");
}
size_t halflength = length/2;
@@ -314,6 +314,8 @@ std::pair<vec_cf, vec_cf> AlignSample::get_samples(
std::copy(m_txsamples.begin(),
m_txsamples.begin() + len,
std::back_inserter(rval.second));
+
+ rval.first = align_subsample(rval.first, rval.second);
}
return rval;