[USRP-users] Tx2Rx-Sine

Marcus Müller marcus.mueller at ettus.com
Thu Apr 2 15:35:48 EDT 2015


Hi Siva,

would you have a little surrounding source code?
for example, what is the exact type of "data"? Is it something like
std::vector<std::complex<float>>, or just std::complex<float>[], or is
it actually the first element in such a vector/array?

How does the loop with which you stream the stringified complexes to
output_file1 look like?
Is there a particular reason you take this detour? Assuming your .dat is
coming from something like UHD's rx_samples_to_file, octaves fread
functionality should directly be able to read these files into arrays of
real numbers, and you can then just slice them and use them as real and
imaginary part. GNU Radio has octave tools for that [1].

Also: is this data from the very beginning of a reception? There might
be residual values in the integrated DSP chain. Which version of UHD are
you using, and which USRP?

Greetings,
Marcus

[1] https://github.com/gnuradio/gnuradio/tree/master/gr-utils/octave ;
use read_complex_binary.m for complexes consisting of float32,
read_cshort_binary.m for complexes of shorts (int16).

On 03/31/2015 02:29 PM, siva sankar via USRP-users wrote:
> Hello all, 
> We are trying to transmit a sine wave and receive at both the
> receivers simultaneously which is then written into a .dat file. We
> then plotted the imaginary part, which matches the transmitted sine
> wave and the real part doesn't look like a sine wave.
> This is how we are writing the imag/real part to a .txt file, reading
> it from .dat file and then plotting the same using octave.
>
>     input_file1.read((char*)&data, sizeof(data));
>     output_file1<<data.real()<<"\n";
>               or
>     input_file1.read((char*)&data, sizeof(data));
>     output_file1<<data.imag()<<"\n";
>
> Below I am attaching the pictures of the output of the real and
> imaginary part. I am also attaching the .dat file generated after
> executing the program.
>
> Can someone please explain this behavior?
>
> Thanks
> Siva
>
>
> _______________________________________________
> USRP-users mailing list
> USRP-users at lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20150402/16a28c5e/attachment-0002.html>


More information about the USRP-users mailing list