Forum: GNU Radio Re: User Generated Signals

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D9b8df4b0d3cff4a296343cda4e5b6e8?d=identicon&s=25 Syed Faisal Shah (Guest)
on 2007-04-08 00:03
(Received via mailing list)
Jonathan,

I am new to GNU radio as well but have been using the gr_sig_source_c
class.
This class generates a complex quadrature sinusoid with cosine(x) as
real
part and sine(x) as imaginary part. Doing some code hacking in
gnuradio-core/src/lib/general/gr_sig_source_c.cc, you can see that
irrespective of the input argument SIN_WAVE or COS_WAVE the program
always
calls 'sincos' method of class gr_fxpt_nco. Now, 'sincos' is defined as
follows:

output[i]   = gr_complex
<http://gnuradio.org/doc/doxygen/gr__complex_8h.htm...
<http://gnuradio.org/doc/doxygen/classgr__fxpt.html...
(d_phase) * ampl, gr_fxpt::sin
<http://gnuradio.org/doc/doxygen/classgr__fxpt.html...
(d_phase) * ampl);


So, this is how you get cos in the real part and sin in the imaginary
part.
One word of caution here, the file gr_sig_source_c.cc is machine
generated
meaning it is generated by gr_sig_souce_x.t file. In case you would like
to
modify, do not modify .cc file rather change .t file.

I hope it will be helpful.

Regards

Faisal
This topic is locked and can not be replied to.