Commit ce44f998 authored by Florian's avatar Florian

set all jamming frequency values to the same level, change to complexInverse...

set all jamming frequency values to the same level, change to complexInverse fft instead of multiplying by -1 and complexforward fft
parent 0c17f9d5
......@@ -229,14 +229,24 @@ public class NoiseGenerator {
complexSignal[(int)l] = 0.0f; //set all frequencies between the higher frequency of one band to the lower frequency of the next band to 0 mirrored to the doubled winLenSamples size
}
}
for (int k = 0; k < whiteNoiseBands.length-2; k++) {
for (double l = cutoffFreqDownIdx[k]; l <= cutoffFreqUpIdx[k]; l++) {
complexSignal[(int)l] = 10000.0f; //set all frequencies between the higher frequency of one band to the lower frequency of the next band to 0
}
int helpSamples = winLenSamples * 2;
for (double l = helpSamples-cutoffFreqUpIdx[k]; l <= helpSamples-cutoffFreqDownIdx[k]; l++) {
complexSignal[(int)l] = 10000.0f; //set all frequencies between the higher frequency of one band to the lower frequency of the next band to 0 mirrored to the doubled winLenSamples size
}
}
}
for (int i = 0; i < complexSignal.length - 1; i++) {
/*for (int i = 0; i < complexSignal.length - 1; i++) {
complexSignal[i] = complexSignal[i] * (-1); //invert all algebraic signs
}
mFFT.complexForward(complexSignal); //make the fft on the inverted signal
*/
mFFT.complexInverse(complexSignal,false);
return complexSignal; //return the signal with the complex values
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment