summaryrefslogtreecommitdiff
path: root/gnuradio-examples/python/digital/usrp_transmit_path.py
diff options
context:
space:
mode:
authorTom Rondeau2010-02-08 21:12:39 -0800
committerTom Rondeau2010-02-08 21:12:39 -0800
commitfe3150d5e5a0bb7bf98b5f44ad0b68a107bd7f9a (patch)
treed92d3266b2438eed4893716c622fd21aabb82f6f /gnuradio-examples/python/digital/usrp_transmit_path.py
parent6b1bcb301ff4cb20ac62bf5400fa3001182cb069 (diff)
downloadgnuradio-fe3150d5e5a0bb7bf98b5f44ad0b68a107bd7f9a.tar.gz
gnuradio-fe3150d5e5a0bb7bf98b5f44ad0b68a107bd7f9a.tar.bz2
gnuradio-fe3150d5e5a0bb7bf98b5f44ad0b68a107bd7f9a.zip
Adding a pick bitrate calculation for new tx/rx modulators with arbitrary samples per second to allow and real valued bitrate.
Diffstat (limited to 'gnuradio-examples/python/digital/usrp_transmit_path.py')
-rw-r--r--gnuradio-examples/python/digital/usrp_transmit_path.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/gnuradio-examples/python/digital/usrp_transmit_path.py b/gnuradio-examples/python/digital/usrp_transmit_path.py
index ee63dcd2b..4244c33f2 100644
--- a/gnuradio-examples/python/digital/usrp_transmit_path.py
+++ b/gnuradio-examples/python/digital/usrp_transmit_path.py
@@ -22,7 +22,7 @@
from gnuradio import gr
from gnuradio import usrp_options
import transmit_path
-from pick_bitrate import pick_tx_bitrate
+from pick_bitrate2 import pick_tx_bitrate
from gnuradio import eng_notation
def add_freq_option(parser):
@@ -84,15 +84,17 @@ class usrp_transmit_path(gr.hier_block2):
self.rs_rate = options.bitrate # Store requested bit rate
if options.verbose:
print 'USRP Sink:', self.u
+ #(self._bitrate, self._samples_per_symbol, self._interp) = \
+ # pick_tx_bitrate(options.bitrate, self._modulator_class.bits_per_symbol(), \
+ # options.samples_per_symbol, options.interp, dac_rate, \
+ # self.u.get_interp_rates())
(self._bitrate, self._samples_per_symbol, self._interp) = \
pick_tx_bitrate(options.bitrate, self._modulator_class.bits_per_symbol(), \
- options.samples_per_symbol, options.interp, dac_rate, \
- self.u.get_interp_rates())
-
- # Calculate resampler rate based on requested and actual rates
- self.rs_rate = self._bitrate / self.rs_rate
- print "Resampling by %f to get bitrate of %ssps" % (self.rs_rate, eng_notation.num_to_str(self._bitrate/self.rs_rate))
+ dac_rate, self.u.get_interp_rates())
+ print "USRP Interpolation: ", self._interp
+ print "Samples Per Symbol: ", self._samples_per_symbol
+
self.u.set_interp(self._interp)
self.u.set_auto_tr(True)