discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] complex type clarification


From: West, Nathan
Subject: Re: [Discuss-gnuradio] complex type clarification
Date: Fri, 2 Oct 2015 13:44:10 -0400

On Fri, Oct 2, 2015 at 12:55 PM, Jason Matusiak <address@hidden> wrote:
I just wanted to make sure I have this right (because I always seem to
confuse myself); the complex data type is 64bits, 4 bytes of I and 4
bytes of Q, right?

The gr_complex type is defined as std::complex<float> (https://github.com/gnuradio/gnuradio/blob/master/gnuradio-runtime/include/gnuradio/gr_complex.h#L27). I'm not certain what the C++ spec *requires*, but I've always seen that as a pair of floats with the real part in the first 4 bytes and the imaginary part in the second 4.
 
Secondly, those 4B are of type signed floats from [-1,1], right?  I
assume that these are of the IEEE 754 type?

There is nothing that restricts the real/imag parts to [-1,1] other than a de facto standard that SDR hardware has floats in range [-1, 1] representing the full ADC/DAC range.
 

TIA!


 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]