On Tue, Dec 23, 2008 at 05:52:03AM -0800, Ling H. wrote:
I’ve change the usrp_spectrum_sense.py to print out the m.data. And I got
the numbers like 9376200 2976546 34170452… But I just don’t understand
what these numbers stand for . Are they stand for the power or the energy?
And what’s these numbers’ dimension?
Sorry for my bad English.
They are the single precision floating point magnitude squared of the
FFT output. That is, for each FFT bin[i], mag_squared[i] = re[i]*re[i]
If you want power, take the square root. We don’t do it by default
since most users are going to be computing a log somewhere downstream,
and the square root can be trivially folded into that calculation.
To see what the FFT bins contain, see the FFTW documentation (fftw.org).
The actual mapping from the levels at the daughterboard antenna port
to sample values depends on a lot of factors including any
daughterboard gain and decimation specific gain in the digital down
converter. You’ll need to calibrate the system if you need something
that maps to dBm.