Forum: GNU Radio Interpolation, BasicTX, and tune()

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.
Eric R Menendez (Guest)
on 2007-03-14 00:23
(Received via mailing list)
Hello all--

I am a GNU Radio beginner attempting to build a simple CB radio
transmitter (26-27MHz AM) with the USRP and BasicTx.

I've started with fm_tx4.py (from the examples) and modified it to use
AM modulation and run at CB frequencies. However, I have a few
questions:

 - What does the tune() function do when using the BasicTx? The BasicTx
does not have its own oscillator, correct? If so, how can it tune to
anything? e.g.:

  self.u = usrp.sink_c ()       # the USRP sink (consumes samples)
  r = self.u.tune(self.subdev._which, self.subdev, target_freq)

 - My program reads in an audio file sampled at 8ks/s and mixes it with
a 26.695MHz sine wave sampled at 128Ms/s. Therefore, the audio file must
be interpolated by a factor of 16000 before it is multiplied with the
carrier. (see code below) What is the simplest way to accomplish this?
I've noticed that some of the examples do this with a filter; why is it
done that way?

class pipeline(gr.hier_block):
    def __init__(self, fg, filename, lo_freq, audio_rate, if_rate):

        src = gr.file_source (gr.sizeof_float, filename, True)

        # Local oscillator
        lo = gr.sig_source_c (if_rate,        # sample rate
                              gr.GR_SIN_WAVE, # waveform type
                              lo_freq,        #frequency
                              1.0,            # amplitude
                              0)              # DC Offset
        mixer = gr.multiply_cc ()

        converter = gr.float_to_complex ()

        interpolater = # Interpolate src by factor of if_rate/audio_rate

        fg.connect (src, converter, interpolater, (mixer, 0))
        fg.connect (lo, (mixer, 1))

        gr.hier_block.__init__(self, fg, src, mixer)

Thanks for your help!

Sincerely,
Eric Menendez
This topic is locked and can not be replied to.