[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r4220 - in gnuradio/branches/developers/trondeau/digit
From: |
trondeau |
Subject: |
[Commit-gnuradio] r4220 - in gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python: digital hier/digital |
Date: |
Tue, 2 Jan 2007 16:58:25 -0700 (MST) |
Author: trondeau
Date: 2007-01-02 16:58:25 -0700 (Tue, 02 Jan 2007)
New Revision: 4220
Modified:
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/digital/receive_path.py
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/digital/receive_path_lb.py
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path.py
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path_lb.py
Log:
formatting and opened channel filter a bit more (for larger frequency offsets)
Modified:
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/digital/receive_path.py
===================================================================
---
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/digital/receive_path.py
2007-01-02 23:57:09 UTC (rev 4219)
+++
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/digital/receive_path.py
2007-01-02 23:58:25 UTC (rev 4220)
@@ -57,7 +57,22 @@
# Set up USRP source; also adjusts decim, samples_per_symbol, and
bitrate
self._setup_usrp_source()
-
+
+ g = self.subdev.gain_range()
+ if options.show_rx_gain_range:
+ print "Rx Gain Range: minimum = %g, maximum = %g, step size = %g" \
+ % (g[0], g[1], g[2])
+
+ self.set_gain(options.rx_gain)
+
+ self.set_auto_tr(True) # enable Auto Transmit/Receive
switching
+
+ # Set RF frequency
+ ok = self.set_freq(self._rx_freq)
+ if not ok:
+ print "Failed to set Rx frequency to %s" %
(eng_notation.num_to_str(self._rx_freq))
+ raise ValueError, eng_notation.num_to_str(self._rx_freq)
+
# copy the final answers back into options for use by demodulator
options.samples_per_symbol = self._samples_per_symbol
options.bitrate = self._bitrate
@@ -71,7 +86,7 @@
chan_coeffs = gr.firdes.low_pass (1.0, # gain
sw_decim * self._samples_per_symbol,
# sampling rate
1.0, # midpoint of
trans. band
- 0.1, # width of
trans. band
+ 0.5, # width of
trans. band
gr.firdes.WIN_HANN) # filter type
# Decimating channel filter
@@ -86,21 +101,7 @@
access_code=None,
callback=self._rx_callback,
threshold=-1)
-
- ok = self.set_freq(self._rx_freq)
- if not ok:
- print "Failed to set Rx frequency to %s" %
(eng_notation.num_to_str(self._rx_freq))
- raise ValueError, eng_notation.num_to_str(self._rx_freq)
- g = self.subdev.gain_range()
- if options.show_rx_gain_range:
- print "Rx Gain Range: minimum = %g, maximum = %g, step size = %g" \
- % (g[0], g[1], g[2])
-
- self.set_gain(options.rx_gain)
-
- self.set_auto_tr(True) # enable Auto Transmit/Receive
switching
-
# Carrier Sensing Blocks
alpha = 0.001
thresh = 30 # in dB, will have to adjust
@@ -228,6 +229,7 @@
"""
Prints information about the receive path
"""
+ print "\nReceive Path:"
print "Using RX d'board %s" % (self.subdev.side_and_name(),)
print "Rx gain: %g" % (self.gain,)
print "modulation: %s" % (self._demod_class.__name__)
Modified:
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/digital/receive_path_lb.py
===================================================================
---
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/digital/receive_path_lb.py
2007-01-02 23:57:09 UTC (rev 4219)
+++
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/digital/receive_path_lb.py
2007-01-02 23:58:25 UTC (rev 4220)
@@ -49,10 +49,10 @@
chan_coeffs = gr.firdes.low_pass (1.0, # gain
sw_decim * self._samples_per_symbol,
# sampling rate
1.0, # midpoint of
trans. band
- 0.1, # width of
trans. band
+ 0.5, # width of
trans. band
gr.firdes.WIN_HANN) # filter type
self.channel_filter = gr.fft_filter_ccc(sw_decim, chan_coeffs)
-
+
# receiver
self.packet_receiver = \
blks.demod_pkts(fg,
@@ -130,6 +130,7 @@
"""
Prints information about the receive path
"""
+ print "\nReceive Path:"
print "modulation: %s" % (self._demod_class.__name__)
print "bitrate: %sb/s" %
(eng_notation.num_to_str(self._bitrate))
print "samples/symbol: %3d" % (self._samples_per_symbol)
Modified:
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path.py
===================================================================
---
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path.py
2007-01-02 23:57:09 UTC (rev 4219)
+++
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path.py
2007-01-02 23:58:25 UTC (rev 4220)
@@ -33,7 +33,7 @@
# receive path
# /////////////////////////////////////////////////////////////////////////////
-class receive_path(gr.hier_block):
+class receive_path(gr.hier_block2):
def __init__(self, demod_class, rx_callback, options):
gr.hier_block2.__init__(self, "receive_path",
gr.io_signature(0,0,0), # Input signature
@@ -60,7 +60,22 @@
# Set up USRP source; also adjusts decim, samples_per_symbol, and
bitrate
self._setup_usrp_source()
-
+
+ g = self.subdev.gain_range()
+ if options.show_rx_gain_range:
+ print "Rx Gain Range: minimum = %g, maximum = %g, step size = %g" \
+ % (g[0], g[1], g[2])
+
+ self.set_gain(options.rx_gain)
+
+ self.set_auto_tr(True) # enable Auto Transmit/Receive
switching
+
+ # Set RF frequency
+ ok = self.set_freq(self._rx_freq)
+ if not ok:
+ print "Failed to set Rx frequency to %s" %
(eng_notation.num_to_str(self._rx_freq))
+ raise ValueError, eng_notation.num_to_str(self._rx_freq)
+
# copy the final answers back into options for use by demodulator
options.samples_per_symbol = self._samples_per_symbol
options.bitrate = self._bitrate
@@ -74,41 +89,24 @@
chan_coeffs = gr.firdes.low_pass (1.0, # gain
sw_decim * self._samples_per_symbol,
# sampling rate
1.0, # midpoint of
trans. band
- 0.1, # width of
trans. band
+ 0.5, # width of
trans. band
gr.firdes.WIN_HANN) # filter type
# Decimating channel filter
# complex in and out, float taps
self.chan_filt = gr.fft_filter_ccc(sw_decim, chan_coeffs)
#self.chan_filt = gr.fir_filter_ccf(sw_decim, chan_coeffs)
-
# receiver
self.packet_receiver = \
- blks.demod_pkts(fg,
- self._demod_class(fg, **demod_kwargs),
- access_code=None,
- callback=self._rx_callback,
- threshold=-1)
+ blks2.demod_pkts(self._demod_class(**demod_kwargs),
+ access_code=None,
+ callback=self._rx_callback,
+ threshold=-1)
- ok = self.set_freq(self._rx_freq)
- if not ok:
- print "Failed to set Rx frequency to %s" %
(eng_notation.num_to_str(self._rx_freq))
- raise ValueError, eng_notation.num_to_str(self._rx_freq)
-
- g = self.subdev.gain_range()
- if options.show_rx_gain_range:
- print "Rx Gain Range: minimum = %g, maximum = %g, step size = %g" \
- % (g[0], g[1], g[2])
-
- self.set_gain(options.rx_gain)
-
- self.set_auto_tr(True) # enable Auto Transmit/Receive
switching
-
# Carrier Sensing Blocks
alpha = 0.001
thresh = 30 # in dB, will have to adjust
self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha)
- fg.connect(self.chan_filt, self.probe)
# Display some information about the setup
if self._verbose:
Modified:
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path_lb.py
===================================================================
---
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path_lb.py
2007-01-02 23:57:09 UTC (rev 4219)
+++
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python/hier/digital/receive_path_lb.py
2007-01-02 23:58:25 UTC (rev 4220)
@@ -52,7 +52,7 @@
chan_coeffs = gr.firdes.low_pass (1.0, # gain
sw_decim * self._samples_per_symbol,
# sampling rate
1.0, # midpoint of
trans. band
- 0.1, # width of
trans. band
+ 0.5, # width of
trans. band
gr.firdes.WIN_HANN) # filter type
# receiver
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r4220 - in gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-examples/python: digital hier/digital,
trondeau <=