diff --git a/CHANGELOG b/CHANGELOG index 258f559995b511ba6870f8853ab92e5cd342b303..1e0d608e522cb63ceb4200872369168cfecdbc2f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,7 +8,7 @@ TODO:: LAST DONE: CHANGES: -- ver. 0.20.021 - <b>2022.04.04</b> Added: +- ver. 0.20.022 - <b>2022.04.04</b> Added: - DSP::u::SymbolMapper - experimental support for QAM for even bits_per_symbol (Gray ordering) - ver. 0.20.020 - <b>2022.04.04</b> Fixed: - DSP::u::SymbolMapper - fixed support for phase rotation of DSP::e::ModulationType::ASK constelation diff --git a/src/cpp/DSP_modules2.cpp b/src/cpp/DSP_modules2.cpp index 41702b7895b053042b030f8588e132d565817404..668b9c5d31fcbc09ae0c31f04edce554816db747 100644 --- a/src/cpp/DSP_modules2.cpp +++ b/src/cpp/DSP_modules2.cpp @@ -1837,7 +1837,7 @@ unsigned int getConstellation( case DSP::e::ModulationType::QAM: { // to convert number into gray, take the number and perform XOR after shifting the number 1 bit to the right. // x_gray = x ^ (x >> 1); - DSP::Float component_offset = (sqrt(DSP::Float(M))-1); + DSP::Float component_offset = (sqrt(DSP::Float(M))-1)/2; if ((bits_per_symbol % 2) == 0) { unsigned int mask = 0x00; for (unsigned int ind = 0; ind < bits_per_symbol/2; ind++) { diff --git a/src/include/DSP_lib.h b/src/include/DSP_lib.h index 34d78944aa39bf4b309a79f59e7a569118cf84c0..9d1bcf8e05601e637baa379ef556c6382c42a068 100644 --- a/src/include/DSP_lib.h +++ b/src/include/DSP_lib.h @@ -11,7 +11,7 @@ #define DSP_VER_MAJOR 0 #define DSP_VER_MINOR 20 -#define DSP_VER_BUILD 21 // !!! without zeroes before, else this will be treated as octal number +#define DSP_VER_BUILD 22 // !!! without zeroes before, else this will be treated as octal number #define DSP_VER_YEAR 2023 #define DSP_VER DSP_VER_MAJOR.DSP_VER_MINOR.DSP_VER_BUILD