[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r6100 - gnuradio/branches/developers/trondeau/ofdm_mod
From: |
trondeau |
Subject: |
[Commit-gnuradio] r6100 - gnuradio/branches/developers/trondeau/ofdm_mod/gnuradio-core/src/python/gnuradio/blksimpl |
Date: |
Thu, 2 Aug 2007 05:17:20 -0600 (MDT) |
Author: trondeau
Date: 2007-08-02 05:17:20 -0600 (Thu, 02 Aug 2007)
New Revision: 6100
Modified:
gnuradio/branches/developers/trondeau/ofdm_mod/gnuradio-core/src/python/gnuradio/blksimpl/ofdm.py
Log:
using new demapper functionality.
Modified:
gnuradio/branches/developers/trondeau/ofdm_mod/gnuradio-core/src/python/gnuradio/blksimpl/ofdm.py
===================================================================
---
gnuradio/branches/developers/trondeau/ofdm_mod/gnuradio-core/src/python/gnuradio/blksimpl/ofdm.py
2007-08-01 20:35:30 UTC (rev 6099)
+++
gnuradio/branches/developers/trondeau/ofdm_mod/gnuradio-core/src/python/gnuradio/blksimpl/ofdm.py
2007-08-02 11:17:20 UTC (rev 6100)
@@ -83,17 +83,17 @@
symbol_length = options.fft_length + options.cp_length
- mods = {"bpsk": 2, "qpsk": 4, "8psk": 8}
- order = mods[self._modulation]
+ if 1:
+ mods = {"bpsk": 2, "qpsk": 4, "8psk": 8}
+ arity = mods[self._modulation]
- if 1:
- const = psk.gray_constellation[order]
+ rot = 1
if self._modulation == "qpsk":
- const = list()
- for c in psk.gray_constellation[order]:
- const.append((0.707+0.707j)*c)
- print const
- self._pkt_input = gr.ofdm_mapper_bcv(const, msgq_limit,
+ rot = (0.707+0.707j)
+
+ rotated_const = map(lambda pt: pt * rot,
psk.gray_constellation[arity])
+ print rotated_const
+ self._pkt_input = gr.ofdm_mapper_bcv(rotated_const, msgq_limit,
options.occupied_tones,
options.fft_length)
else:
if self._modulation == "bpsk":
@@ -224,9 +224,24 @@
self.ofdm_recv = ofdm_receiver(fg, self._fft_length, self._cp_length,
self._occupied_tones, self._snr,
preambles,
options.log)
- self.ofdm_demod = gr.ofdm_frame_sink(self._rcvd_pktq,
- self._occupied_tones,
- self._modulation)
+
+ if 1:
+ mods = {"bpsk": 2, "qpsk": 4, "8psk": 8}
+ arity = mods[self._modulation]
+
+ rot = 1
+ if self._modulation == "qpsk":
+ rot = (0.707+0.707j)
+
+ rotated_const = map(lambda pt: pt * rot,
psk.gray_constellation[arity])
+ print rotated_const
+ self.ofdm_demod = gr.ofdm_frame_sink(rotated_const, range(arity),
+ self._rcvd_pktq,
+ self._occupied_tones)
+ else:
+ self.ofdm_demod = gr.ofdm_frame_sink(self._rcvd_pktq,
+ self._occupied_tones,
+ self._modulation)
fg.connect((self.ofdm_recv, 0), (self.ofdm_demod, 0))
fg.connect((self.ofdm_recv, 1), (self.ofdm_demod, 1))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r6100 - gnuradio/branches/developers/trondeau/ofdm_mod/gnuradio-core/src/python/gnuradio/blksimpl,
trondeau <=