I am new to GNU radio as well but have been using the gr_sig_source_c
This class generates a complex quadrature sinusoid with cosine(x) as
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
calls ‘sincos’ method of class gr_fxpt_nco. Now, ‘sincos’ is defined as
output[i] = gr_complex
(d_phase) * ampl, gr_fxpt::sin
(d_phase) * ampl);
So, this is how you get cos in the real part and sin in the imaginary
One word of caution here, the file gr_sig_source_c.cc is machine
meaning it is generated by gr_sig_souce_x.t file. In case you would like
modify, do not modify .cc file rather change .t file.
I hope it will be helpful.