1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

dft: cleanup of dft calculation

This commit is contained in:
Manuel Pitz 2021-07-01 18:29:22 +02:00
parent 82ad0374f4
commit 28e3487252

View file

@ -470,27 +470,22 @@ public:
double tmpSmpWindow[windowSize];
for (unsigned i = 0; i< windowSize; i++)
tmpSmpWindow[i] = ringBuffer[(i + ringBufferPos) % windowSize];
tmpSmpWindow[i] = ringBuffer[(i + ringBufferPos) % windowSize] * filterWindowCoefficents[i];;
#ifdef DFT_MEM_DUMP
if (dumperEnable)
origSigSync.writeDataBinary(windowSize, tmpSmpWindow);
#endif
for (unsigned i = 0; i < windowSize; i++)
/*for (unsigned i = 0; i < windowSize; i++)
tmpSmpWindow[i] *= filterWindowCoefficents[i];
#ifdef DFT_MEM_DUMP
if (dumperEnable)
windowdSigSync.writeDataBinary(windowSize, tmpSmpWindow);
#endif
*/
for (unsigned i = 0; i < freqCount; i++) {
results[i] = 0;
for (unsigned j = 0; j < windowSize * windowMultiplier; j++) {
if (padding == PaddingType::ZERO) {
if (j < (windowSize))
if (j < windowSize)
results[i] += tmpSmpWindow[j] * matrix[i][j];
else
results[i] += 0;