diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2023-04-26 14:37:57 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2023-04-26 14:37:57 +0200 |
commit | c7961c2e8688d6db2a87b5079c60a04b8fe37e74 (patch) | |
tree | e094baae46052daca324168740a5344d82dd0aae | |
parent | 0958aa73aab5d71c73771cf989c66d3b8d7bb6b8 (diff) | |
download | dabmod-c7961c2e8688d6db2a87b5079c60a04b8fe37e74.tar.gz dabmod-c7961c2e8688d6db2a87b5079c60a04b8fe37e74.tar.bz2 dabmod-c7961c2e8688d6db2a87b5079c60a04b8fe37e74.zip |
Normalise TII to 1/sqrt(48)
-rw-r--r-- | src/TII.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/TII.cpp b/src/TII.cpp index b329cdb..2d7429f 100644 --- a/src/TII.cpp +++ b/src/TII.cpp @@ -189,6 +189,8 @@ int TII::process(Buffer* dataIn, Buffer* dataOut) complexf* in = reinterpret_cast<complexf*>(dataIn->getData()); complexf* out = reinterpret_cast<complexf*>(dataOut->getData()); + constexpr float normalisation = 0.144337f; // 1/sqrt(48); + /* Normalise the TII carrier power according to ETSI TR 101 496-3 * Clause 5.4.2.2 Paragraph 7: * @@ -196,8 +198,7 @@ int TII::process(Buffer* dataIn, Buffer* dataOut) * > 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. * - * This is because we only enable 32 out of 1536 carriers, not because - * every carrier is lower power. + * Divide by sqrt(48) because I and Q are separately normalised. */ for (size_t i = 0; i < m_Acp.size(); i++) { /* See header file for an explanation of the old variant. @@ -218,8 +219,8 @@ int TII::process(Buffer* dataIn, Buffer* dataOut) * and fuse the two conditionals together: */ if (m_Acp[i]) { - out[i] = in[i]; - out[i+1] = (m_conf.old_variant ? in[i+1] : in[i]); + out[i] = in[i] * normalisation; + out[i+1] = (m_conf.old_variant ? in[i+1] : in[i]) * normalisation; } } } |