summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
diff options
context:
space:
mode:
authortrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>2008-04-15 17:06:46 +0000
committertrondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5>2008-04-15 17:06:46 +0000
commit3a2f0b7e9fedaa29dbce47fe5d0b61ac8135aefb (patch)
treedb9a83d20a2b89f58a56f213092327c732529742 /gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
parent87b7f14e965c86fbc024bc586cce0d73a3962785 (diff)
Adjusting structure a bit to redistribute responsibilities. This does not change the behavior or performance at all. The sync. block only calculates the frequency and timing signals and now outputs the fine frequency adjustment signal from output 0 and the timing signal for the start of the packet from output 1.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@8198 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py')
-rw-r--r--gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py b/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
index cc260d8d7c..2663f7cf87 100644
--- a/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/ofdm.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2006,2007 Free Software Foundation, Inc.
+# Copyright 2006,2007,2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -197,10 +197,11 @@ class ofdm_demod(gr.hier_block2):
self._snr = options.snr
# Use freq domain to get doubled-up known symbol for correlation in time domain
+ zeros_on_left = int(math.ceil((self._fft_length - self._occupied_tones)/2.0))
ksfreq = known_symbols_4512_3[0:self._occupied_tones]
for i in range(len(ksfreq)):
- if(i&1):
- ksfreq[i] = 0
+ if((zeros_on_left + i) & 1):
+ ksfreq[i] = 0
# hard-coded known symbols
preambles = (ksfreq,)