Closed ac2cz closed 6 years ago
Furthermore, when I calculate the PSD I take the square root, which is not correct. The magnitude is equal to I^2 + Q^2. For a complex input the magnitude needs to be divided by N (not N/2). Need to remember if that factor is already applied when the FFT run. I know its an option in the method.
It is then divided by the bin bandwidth to get PSD.
Also stretching the FFT vertically currently changes the position of the trace wrt the scale. Which can't be right!
Issue with stretching was a bug and is fixed in v1.05p The calculation has to be tested with a calibrated source and a couple of different dongles. This needs to be tried in the rtlsdr branch where the new USB code is implemented.
float minValue = (float) (20 * Math.log10( 1.0 / ( Math.pow(2.0,( bitDepth - 1)))));
Actually, this may be OK. We calculate the Power Spectral Density as follows: 20Math.log10(Math.sqrt((ii) + (q*q))/binBandwidth)
So this uses the raw value of i and q, which come directly from the Complex Forward FFT.
The values from the RTL-SDR start at about -50dBm, reflecting the lower sensitivity of this device. As a test I compared to SDR#. The noise floor with no antenna and gain at min is at -60dBm. With FoxTelem the noise floor is about -65dBm. It is hard to compare directly because the gain controls work differently and changing any of them moves the noise floor.
I consider this not an issue.
e.g. the airspy is 12 bit. See the excellent notes in sdrtrunk's Spectrum db converter class