mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
dft: dump phase, freq, amp of channel 1 outside signal calc loop
This commit is contained in:
parent
b26625184f
commit
4a8ce2097f
1 changed files with 13 additions and 4 deletions
|
@ -384,6 +384,7 @@ public:
|
|||
maxF = estimate.x;
|
||||
maxA = estimate.y;
|
||||
}
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (dftCalcCnt > 1) {
|
||||
|
@ -398,13 +399,21 @@ public:
|
|||
smp->data[i * 4 + 2].f = atan2(dftResults[i][maxPos].imag(), dftResults[i][maxPos].real()); /* Phase */
|
||||
smp->data[i * 4 + 3].f = 0; /* RoCof */
|
||||
|
||||
if (phasorPhase)
|
||||
phasorPhase->writeData(1, &(smp->data[i * 4 + 2].f));
|
||||
if (phasorAmplitude)
|
||||
phasorAmplitude->writeData(1, &(smp->data[i * 4 + 1].f));
|
||||
}
|
||||
}
|
||||
|
||||
//the following is a debug output and currently only for channel 0
|
||||
if (windowSize < smpMemPos){
|
||||
if (phasorFreq)
|
||||
phasorFreq->writeData(1, &(smp->data[0 * 4 + 0].f));
|
||||
|
||||
if (phasorPhase)
|
||||
phasorPhase->writeData(1, &(smp->data[0 * 4 + 2].f));
|
||||
|
||||
if (phasorAmplitude)
|
||||
phasorAmplitude->writeData(1, &(smp->data[0 * 4 + 1].f));
|
||||
}
|
||||
|
||||
smp->length = windowSize < smpMemPos ? signalIndex.size() * 4 : 0;
|
||||
|
||||
dftCalcCount++;
|
||||
|
|
Loading…
Add table
Reference in a new issue