commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r4174 - gnuradio/branches/developers/n4hy/ofdm/gnuradi


From: trondeau
Subject: [Commit-gnuradio] r4174 - gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm
Date: Wed, 20 Dec 2006 18:28:06 -0700 (MST)

Author: trondeau
Date: 2006-12-20 18:28:06 -0700 (Wed, 20 Dec 2006)
New Revision: 4174

Modified:
   
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/ofdm_receiver.py
Log:
receiver hierarchical block for OFDM symbols

Modified: 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/ofdm_receiver.py
===================================================================
--- 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/ofdm_receiver.py
       2006-12-21 01:27:41 UTC (rev 4173)
+++ 
gnuradio/branches/developers/n4hy/ofdm/gnuradio-examples/python/ofdm/ofdm_receiver.py
       2006-12-21 01:28:06 UTC (rev 4174)
@@ -27,13 +27,16 @@
 from optparse import OptionParser
 
 class ofdm_receiver(gr.hier_block):
-    def __init__(self, fg, fft_length, symbol_length, rho):
+    def __init__(self, fg, fft_length, symbol_length, snr):
         self.input = gr.add_const_cc(0) # Kluge that goes away with hier_block2
 
         self.fg = fg
         
         cpsize = symbol_length - fft_length;
 
+        SNR = 10.0**(snr/10.0)
+        rho = SNR / (SNR + 1.0)
+
         # ML Sync
 
         # Energy Detection from ML Sync
@@ -94,4 +97,6 @@
         self.fg.connect(self.diff, self.f2c1,(self.sampler,1))
         self.fg.connect(self.angle, self.f2c2,(self.sampler,2))
 
+        self.fg.connect(self.diff, gr.file_sink(gr.sizeof_float, "theta.out"))
+
         gr.hier_block.__init__(self, fg, self.input, self.sampler)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]