[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8213 - gnuradio/trunk/gnuradio-core/src/python/gnurad
From: |
trondeau |
Subject: |
[Commit-gnuradio] r8213 - gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl |
Date: |
Wed, 16 Apr 2008 11:12:13 -0600 (MDT) |
Author: trondeau
Date: 2008-04-16 11:12:13 -0600 (Wed, 16 Apr 2008)
New Revision: 8213
Modified:
gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_receiver.py
gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_fixed.py
Log:
to complete what I started, this makes the ofdm_sync_fixed block work again in
the OFDM receiver. Its only used for testing in the simulation mode if you want
to remove any affects of the synchronization blocks. You have to manually edit
the number of symbols and any fractional frequency offset you might want to use.
Modified:
gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_receiver.py
===================================================================
--- gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_receiver.py
2008-04-16 16:22:41 UTC (rev 8212)
+++ gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_receiver.py
2008-04-16 17:12:13 UTC (rev 8213)
@@ -93,9 +93,12 @@
elif SYNC == "pnac":
nco_sensitivity = -2.0/fft_length #
correct for fine frequency
self.ofdm_sync = ofdm_sync_pnac(fft_length, cp_length, ks0time,
logging)
- elif SYNC == "fixed":
+ elif SYNC == "fixed": #
for testing only; do not user over the air
+ self.chan_filt = gr.multiply_const_cc(1.0) #
remove filter and filter delay for this
+ nsymbols = 18 #
enter the number of symbols per packet
+ freq_offset = 0.0 # if
you use a frequency offset, enter it here
nco_sensitivity = -2.0/fft_length #
correct for fine frequency
- self.ofdm_sync = ofdm_sync_fixed(fft_length, cp_length, logging)
+ self.ofdm_sync = ofdm_sync_fixed(fft_length, cp_length, nsymbols,
freq_offset, logging)
# Set up blocks
Modified:
gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_fixed.py
===================================================================
---
gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_fixed.py
2008-04-16 16:22:41 UTC (rev 8212)
+++
gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/ofdm_sync_fixed.py
2008-04-16 17:12:13 UTC (rev 8213)
@@ -24,26 +24,27 @@
from gnuradio import gr
class ofdm_sync_fixed(gr.hier_block2):
- def __init__(self, fft_length, cp_length, logging=False):
+ def __init__(self, fft_length, cp_length, nsymbols, freq_offset,
logging=False):
gr.hier_block2.__init__(self, "ofdm_sync_fixed",
gr.io_signature(1, 1, gr.sizeof_gr_complex), #
Input signature
- gr.io_signature2(2, 2,
gr.sizeof_gr_complex*fft_length, gr.sizeof_char)) # Output signature
+ gr.io_signature2(2, 2, gr.sizeof_float,
gr.sizeof_char)) # Output signature
# Use a fixed trigger point instead of sync block
symbol_length = fft_length + cp_length
- data = (symbol_length)*[0,]
+ pkt_length = nsymbols*symbol_length
+ data = (pkt_length)*[0,]
data[(symbol_length)-1] = 1
self.peak_trigger = gr.vector_source_b(data, True)
- self.sampler = gr.ofdm_sampler(fft_length, symbol_length)
- self.connect(self, (self.sampler,0))
- self.connect(self.peak_trigger, (self.sampler,1))
- self.connect(self.sampler, (self,0))
+ # Use a pre-defined frequency offset
+ foffset = (pkt_length)*[math.pi*freq_offset,]
+ self.frequency_offset = gr.vector_source_f(foffset, True)
+
+ self.connect(self, gr.null_sink(gr.sizeof_gr_complex))
+ self.connect(self.frequency_offset, (self,0))
self.connect(self.peak_trigger, (self,1))
if logging:
self.connect(self.peak_trigger, gr.file_sink(gr.sizeof_char,
"ofdm_sync_fixed-peaks_b.dat"))
- self.connect(self.sampler,
gr.file_sink(gr.sizeof_gr_complex*fft_length,
-
"ofdm_sync_fixed-sampler_c.dat"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8213 - gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl,
trondeau <=