I am trying to make a panadapter for a software defined radio and I am a little bit stuck and hope someone can help me.
I have an I Q signal from my radio. (Actually I am using an IQ wav file from the internet recorded at 44800 2 channels 16bit).
If I use HDSDR the spectrum looks like this:
The display from my app looks like this:
I am doing something wrong and I do not know exactly what (I am new to this and I am not very sure I completly understand the concept behind...) I will try to describe what I am doing and hope you can help me fix it
- I open the file and start reading from it in a byte buffer (1024 bytes at a time)
- I convert every 2 bytes into shorts (ByteOrder.LITTLE_ENDIAN)
- I apply HanningWindow to the buffer
- I split the buffer in 2 buffers each for a channel (the %2==0 as left and %2==1 right )
- I create and array of Complex numbers considering the left[i] as the real part & right[i] as imag part
- I do FFT on the complex array (wavenumber table with size 512)
- I do an FFT shift (from [1,2,..,n/2,n/2+1,..,n-1,n] to [n,n-1,..,n/2+1,1,2,..,n/2] )
- I plot the result
Do I need to process the IQ signal before somehow (demodulate it ?)
I am reading in a wrong way the file? (I know that the file is starting with header & everything but after that the data part starts)
How can I do a pitch /amplitude correction to remove the unwanted image existing in a not ideal IQ recorded by soundcard?
Thank you, Bogdan