[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss-gnuradio] simple transmit questions
From: |
njm25 |
Subject: |
[Discuss-gnuradio] simple transmit questions |
Date: |
Tue, 20 Feb 2007 11:57:48 -0500 |
First, I assume that you need 2 seperate computers to run 2 USRP boards (1 to
transmit and 1 to receive). I just wanted to make sure.
Second, for a simple transmit using the fm_tx4.py example, how do you change
the output gain for the transmitting signal. I assume it has to do with the
line:
gain = gr.multiply_const_cc (4000.0 / options.nchannels)
but I don't know what the max gain can be set to.
Third, in the fm_tx4.py example, instead of opening a single file of floats and
doing an FM modulation, I simply want to open 2 seperate files of floats and
combine them into a single stream of complex data. I have changed the
following code as follows but I'm not sure about what I have to change about
the last line.
class pipeline(gr.hier_block):
def __init__(self, fg, filename, lo_freq, audio_rate, if_rate):
src1 = gr.file_source (gr.sizeof_float, "file name and path here", True)
src2 = gr.file_source (gr.sizeof_float, "file name and path here", 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()
fg.connect (src1, (converter, 0))
fg.connect (src2, (converter, 1))
fg.connect (converter, (mixer, 0))
fg.connect (lo, (mixer, 1))
gr.hier_block.__init__(self, fg, src, mixer)
Thanks,
Nick
- [Discuss-gnuradio] simple transmit questions,
njm25 <=