Re: User Generated Signals

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.html#d2a3ccb198a4cd06f62ce2d7cbebe150(gr_fxpt::cos
http://gnuradio.org/doc/doxygen/classgr__fxpt.html#c3130cca0cea5c07251ba2b12912782a
(d_phase) * ampl, gr_fxpt::sin
http://gnuradio.org/doc/doxygen/classgr__fxpt.html#42cd1a697856716bef576f1402fee6af
(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