discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] FM TX diagram


From: Eric Blossom
Subject: Re: [Discuss-gnuradio] FM TX diagram
Date: Thu, 10 Nov 2005 10:11:09 -0800
User-agent: Mutt/1.5.6i

On Wed, Nov 09, 2005 at 10:33:13PM -0600, Jorge Chávez wrote:
> Thanks a lot for the help.

> In a non Software Radio FM transmitter we have an integrator, local
> osc, mixer, and RF filter.  In this case, I can´t find the
> integrator and the RF section. why? are not necessary?.


The integrator is the d_phase instance variable of gr_frequency_modulator_fc.

    int
    gr_frequency_modulator_fc::work (int noutput_items,
                                     gr_vector_const_void_star &input_items,
                                     gr_vector_void_star &output_items)
    {
      const float *in = (const float *) input_items[0];
      gr_complex *out = (gr_complex *) output_items[0];

      for (int i = 0; i < noutput_items; i++){
        d_phase = d_phase + d_sensitivity * in[i];
        float oi, oq;
        gr_sincosf (d_phase, &oq, &oi);
        out[i] = gr_complex (oi, oq);
      }

      // Limit the phase accumulator to [-16*pi,16*pi]
      // to avoid loss of precision in the addition above.

      if (fabs (d_phase) > 16 * M_PI){
        double ii = trunc (d_phase / (2 * M_PI));
        d_phase = d_phase - (ii * 2 * M_PI);
      }

      return noutput_items;
    }

The RF section would be whatever comes after the D/A.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]