Vec Length

Hi all,

What does the Vec Length parameter signify in gnuradio-companion blocks?
I
have realized that Vec Length for the USRP2 source is by default 2 and
cannot be changed on the GUI. How can this be changed to 1? In my case,
I
have set the USRP2 UHD source Input Type to Short. I am assuming that
this
means that Input Type is a typo and in real sense it defines the output
type
of the USRP2 source. This short type however seems to have a Vec Length
of
2.

Nick

On 05/12/2011 10:18 AM, Nick O. wrote:

Hi all,

What does the Vec Length parameter signify in gnuradio-companion blocks? I
have realized that Vec Length for the USRP2 source is by default 2 and
cannot be changed on the GUI. How can this be changed to 1? In my case, I
have set the USRP2 UHD source Input Type to Short. I am assuming that this
means that Input Type is a typo and in real sense it defines the output type
of the USRP2 source. This short type however seems to have a Vec Length of
2.

The vector length of 2 shorts are a funny way to say type “complex
int16”. The issue is we dont really have an official complex type for
non single precision floats in gnuradio.

Technically, you can connect that to any input that is 32 bits wide, but
since grc does does type checking as well, you may need to perform some
manipulations on the stream to get it into the format you like.

-Josh

I guessed so. However, I am stumped as to how to make my complex short a
real short. Do I have to write my own code or is there a
gnuradio-companion
method?

Nick

Hi Josh,

One more thing. Where can I find the class that has the member function
real() implemented? I tracked the conversion of complex to float in the
gnuradio code in
~/gnuradio/gnuradio-core/src/lib/general/gr_complex_to_xxx.cc . And came
across the line:

out0[i] = in[i].real ();

But I am not able to find the class that has the implementation of the
member function real() in it.

Nick

On 05/12/2011 08:08 PM, Nick O. wrote:

But I am not able to find the class that has the implementation of
the member function real() in it.

Just a typedef for std complex:
http://www.cplusplus.com/reference/std/complex/

-josh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs