summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-23 07:59:14 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-12-23 07:59:14 +0100
commit215e8143e3feefd69a76d0b6eaf36ed42a7a904f (patch)
treec7da20ffcab5ba945364e4e4d99f0239e0dfc052 /src
parentbbda6c46e5c322a32c2267da32b0150669174c12 (diff)
downloaddabmod-215e8143e3feefd69a76d0b6eaf36ed42a7a904f.tar.gz
dabmod-215e8143e3feefd69a76d0b6eaf36ed42a7a904f.tar.bz2
dabmod-215e8143e3feefd69a76d0b6eaf36ed42a7a904f.zip
Add OFDM windowing to config file
Diffstat (limited to 'src')
-rw-r--r--src/ConfigParser.cpp6
-rw-r--r--src/ConfigParser.h2
-rw-r--r--src/DabModulator.cpp3
3 files changed, 9 insertions, 2 deletions
diff --git a/src/ConfigParser.cpp b/src/ConfigParser.cpp
index 1cc94c0..2c93a57 100644
--- a/src/ConfigParser.cpp
+++ b/src/ConfigParser.cpp
@@ -159,8 +159,12 @@ static void parse_configfile(
mod_settings.dabMode = pt.get("modulator.mode", mod_settings.dabMode);
mod_settings.clockRate = pt.get("modulator.dac_clk_rate", (size_t)0);
- mod_settings.digitalgain = pt.get("modulator.digital_gain", mod_settings.digitalgain);
+ mod_settings.digitalgain = pt.get("modulator.digital_gain",
+ mod_settings.digitalgain);
+
mod_settings.outputRate = pt.get("modulator.rate", mod_settings.outputRate);
+ mod_settings.ofdmWindowOverlap = pt.get("modulator.ofdmwindowing",
+ mod_settings.ofdmWindowOverlap);
// FIR Filter parameters:
if (pt.get("firfilter.enabled", 0) == 1) {
diff --git a/src/ConfigParser.h b/src/ConfigParser.h
index a8d7837..0be3558 100644
--- a/src/ConfigParser.h
+++ b/src/ConfigParser.h
@@ -82,6 +82,8 @@ struct mod_settings_t {
float cfrClip = 1.0f;
float cfrErrorClip = 1.0f;
+ // Settings for the OFDM windowing
+ unsigned ofdmWindowOverlap = 0;
#if defined(HAVE_OUTPUT_UHD)
OutputUHDConfig outputuhd_conf;
diff --git a/src/DabModulator.cpp b/src/DabModulator.cpp
index cded280..0818f4f 100644
--- a/src/DabModulator.cpp
+++ b/src/DabModulator.cpp
@@ -201,7 +201,8 @@ int DabModulator::process(Buffer* dataOut)
rcs.enrol(cifGain.get());
auto cifGuard = make_shared<GuardIntervalInserter>(
- myNbSymbols, mySpacing, myNullSize, mySymSize);
+ myNbSymbols, mySpacing, myNullSize, mySymSize,
+ m_settings.ofdmWindowOverlap);
rcs.enrol(cifGuard.get());
shared_ptr<FIRFilter> cifFilter;