aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-11-18 04:06:29 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-11-18 04:06:29 +0100
commit6d2083d4b700ef2edc5f4e38d4ecd9df8912a615 (patch)
tree8530ed113aaf741a81a77c59d0511f776bbd1284
parent40509399e2563798f260863df23ceef89d528c5a (diff)
parent4f2fcae5ad028b76ac1d41a279857df85f20c376 (diff)
downloaddabmod-6d2083d4b700ef2edc5f4e38d4ecd9df8912a615.tar.gz
dabmod-6d2083d4b700ef2edc5f4e38d4ecd9df8912a615.tar.bz2
dabmod-6d2083d4b700ef2edc5f4e38d4ecd9df8912a615.zip
Merge branch 'next' into outputRefactoring
-rw-r--r--ChangeLog11
-rw-r--r--README.md11
-rw-r--r--TODO11
-rw-r--r--configure.ac2
-rw-r--r--doc/example.ini1
-rw-r--r--src/FIRFilter.h1
-rw-r--r--src/TII.cpp24
-rw-r--r--src/TimestampDecoder.h3
8 files changed, 39 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index f2e0c6c..5b6e52a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,17 @@
This file contains information about the changes done to
ODR-DabMod in this repository
+2017-11-18: Matthias P. Braendli <matthias@mpb.li>
+ (v1.1.0):
+ Fix TII insertion power level.
+ Fix bug in parsing timestamps appearing in rare conditions.
+ Add Crest Factor Reduction prototype.
+ Cleanup console output of flowgraph statistics.
+ Add prototype for Digital Predistortion.
+ Enable some additional compiler warnings.
+ Add some useful UHD statistics to RC.
+ Add configure option to disable march=native.
+
2017-06-05: Matthias P. Braendli <matthias@mpb.li>
(v1.0.1):
Move GainControl into a separate thread to make better use
diff --git a/README.md b/README.md
index d3929ee..4711028 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,17 @@
OVERVIEW
========
ODR-DabMod is a *DAB (Digital Audio Broadcasting)* modulator compliant
-to ETSI EN 300 401. It is the continuation of the work started by which was
-developed by the Communications Research Center Canada on CRC-DabMod, and
-is now pursued in the
+to ETSI EN 300 401. It is the continuation of the work started by
+the Communications Research Center Canada, and is now pursued in the
[Opendigitalradio project](http://opendigitalradio.org).
-ODR-DabMod is part of the ODR-mmbTools tool set. More information about the
+ODR-DabMod is part of the ODR-mmbTools tool-set. More information about the
ODR-mmbTools is available in the *guide*, available on the
[Opendigitalradio mmbTools page](http://www.opendigitalradio.org/mmbtools).
-Short list of features:
+Features
+--------
- Reads ETI and EDI, outputs compliant COFDM I/Q
- Supports native DAB sample rate and can also resample to other rates
@@ -25,6 +25,7 @@ Short list of features:
- Timestamping support required for SFN
- GPSDO monitoring (both Ettus and [ODR LEA-M8F board](http://www.opendigitalradio.org/lea-m8f-gpsdo))
- A FIR filter for improved spectrum mask
+- TII insertion
- Logging: log to file, to syslog
- ETI sources: ETI-over-TCP, file (Raw, Framed and Streamed) and ZeroMQ
- A Telnet and ZeroMQ remote-control that can be used to change
diff --git a/TODO b/TODO
index 343dad1..c175926 100644
--- a/TODO
+++ b/TODO
@@ -42,16 +42,6 @@ Tests, both with B200 and LimeSDR:
- DPD server
-TII implementation incomplete
------------------------------
-The current TII implementation supports two TII variants:
-one according to spec, and the one that was implemented in early modulators
-that ended up being used a lot even if not compatible with the spec.
-
-However, when enabled, some receivers are not able to lock on the signal.
-Is the power of the TII too strong? Synchronisation wrong?
-
-
Finalise EDI input
------------------
The EDI input, based on work started in http://git.mpb.li/git/odr-edilib/
@@ -66,7 +56,6 @@ is not complete:
Resampler improvements
----------------------
-
* Assess quality of window currently used.
* Evaluate usefulness of other windows.
* Distribute energy of Fs bin equally to both negative and positive
diff --git a/configure.ac b/configure.ac
index 0c07732..6b58d3f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@
# along with ODR-DabMod. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.59)
-AC_INIT([ODR-DabMod], [1.0.1], [matthias.braendli@mpb.li])
+AC_INIT([ODR-DabMod], [1.1.0], [matthias.braendli@mpb.li])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
diff --git a/doc/example.ini b/doc/example.ini
index 21f15ea..e0a1fc8 100644
--- a/doc/example.ini
+++ b/doc/example.ini
@@ -316,7 +316,6 @@ offset=0.002
; modulatoroffset from a file has been removed.
[tii]
-; (experimental)
; If these options are set, TII transmission is enabled.
; DAB modes I and II are supported, and must be set explicitly in
; this file. Reading DAB mode from ETI is not supported.
diff --git a/src/FIRFilter.h b/src/FIRFilter.h
index fb6b4d6..a63bfb9 100644
--- a/src/FIRFilter.h
+++ b/src/FIRFilter.h
@@ -53,6 +53,7 @@ class FIRFilter : public PipelinedModCodec, public RemoteControllable
{
public:
FIRFilter(const std::string& taps_file);
+ virtual ~FIRFilter() = default;
const char* name() { return "FIRFilter"; }
diff --git a/src/TII.cpp b/src/TII.cpp
index 8a8bd86..4710ed4 100644
--- a/src/TII.cpp
+++ b/src/TII.cpp
@@ -197,16 +197,30 @@ int TII::process(Buffer* dataIn, Buffer* dataOut)
complexf* in = reinterpret_cast<complexf*>(dataIn->getData());
complexf* out = reinterpret_cast<complexf*>(dataOut->getData());
+ if ((m_enabled_carriers.size() % 2) != 0) {
+ throw std::logic_error("odd number of enabled carriers");
+ }
+
+ /* Normalise the TII carrier power according to ETSI TR 101 496-3
+ * Clause 5.4.2.2 Paragraph 7:
+ *
+ * > The ratio of carriers in a TII symbol to a normal DAB symbol
+ * > is 1:48 for all Modes, so that the signal power in a TII symbol is
+ * > 16 dB below the signal power of the other symbols.
+ *
+ * We need to normalise to the square root of 48 because we touch I and
+ * Q separately.
+ */
+ const float normalise_factor = 0.14433756729740644112f; // = 1/sqrt(48)
+
for (size_t i = 0; i < m_enabled_carriers.size(); i+=2) {
- //BAD implementation:
- // setting exactly the same phase of the signal for lower adjacent
- // frequency
+ // See header file for an explanation of the old variant
if (m_enabled_carriers[i]) {
- out[i] = m_conf.old_variant ? in[i+1] : in[i];
+ out[i] = normalise_factor * (m_conf.old_variant ? in[i+1] : in[i]);
}
if (m_enabled_carriers[i+1]) {
- out[i+1] = in[i+1];
+ out[i+1] = normalise_factor * in[i+1];
}
}
}
diff --git a/src/TimestampDecoder.h b/src/TimestampDecoder.h
index 1ef493e..2272fe0 100644
--- a/src/TimestampDecoder.h
+++ b/src/TimestampDecoder.h
@@ -69,7 +69,7 @@ struct frame_timestamp
this->timestamp_sec += lrintf(offset_secs);
this->timestamp_pps += lrintf(offset_pps * 16384000.0);
- while (this->timestamp_pps > 16384000)
+ while (this->timestamp_pps >= 16384000)
{
this->timestamp_pps -= 16384000;
this->timestamp_sec += 1;
@@ -228,4 +228,3 @@ class TimestampDecoder : public RemoteControllable
};
-