discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] data types and other questions


From: scaperot
Subject: [Discuss-gnuradio] data types and other questions
Date: Tue, 31 Oct 2006 16:47:54 -0500
User-agent: Internet Messaging Program (IMP) 3.2.8


Hello all,

I've been using GNU Radio and the USRP for about a year now, and until now I
took for granted some of the things that are going on under the hood, if you
know what I mean.  For example, recently, I noticed that the gr_complex data
type is simply the complex float data type in C++ (I was looking in
gr_complex.h), which means that the data is 64bit data (32bit I and 32bit Q).
I'm sure this is all written down somewhere, but I'm trying to make sure that
what I've seen in correct...Also, I was perusing (I think that's a word)
through the gr-usrp/ folder and I also noticed that in usrp1_source_c.cc that
the output seems to be of "short" data type:

 for (int i = 0; i < nitems; i++){
    dst[2*i + 0] = host_to_usrp_short((short) real(in[i]));     // FIXME 
saturate?
    dst[2*i + 1] = host_to_usrp_short((short) imag(in[i]));     // FIXME 
saturate?
  }


does this mean that the 64-bit gr_complex float is converted to integers (16bit
I and 16bit Q) when it
gets to the USRP?  This seems odd to me (but that could just be me not
understanding), so I was wondering if maybe someone could help me understand.

Thanks in advance,

David




reply via email to

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