commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r4246 - gnuradio/branches/developers/trondeau/digital-


From: trondeau
Subject: [Commit-gnuradio] r4246 - gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl
Date: Sun, 7 Jan 2007 11:29:39 -0700 (MST)

Author: trondeau
Date: 2007-01-07 11:29:38 -0700 (Sun, 07 Jan 2007)
New Revision: 4246

Modified:
   
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
   
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl/psk.py
Log:
changed constellation mapping to support gray/non-gray coding for differential 
modulations

Modified: 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
      2007-01-07 00:03:07 UTC (rev 4245)
+++ 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl/dqpsk.py
      2007-01-07 18:29:38 UTC (rev 4246)
@@ -121,7 +121,7 @@
             self._setup_logging()
             
        # Connect & Initialize base class
-        self._fg.connect(self.bytes2chunks, self.diffenc, self.symbol_mapper,
+        self._fg.connect(self.bytes2chunks, self.symbol_mapper, self.diffenc,
                          self.chunks2symbols, self.rrc_filter)
        gr.hier_block.__init__(self, self._fg, self.bytes2chunks, 
self.rrc_filter)
 

Modified: 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl/psk.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl/psk.py
        2007-01-07 00:03:07 UTC (rev 4245)
+++ 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl/psk.py
        2007-01-07 18:29:38 UTC (rev 4246)
@@ -20,10 +20,10 @@
 # 
 
 from math import pi, sqrt, log10
-import math
+import math, cmath
 
 # The following algorithm generates Gray coded constellations for M-PSK for 
M=[2,4,8]
-def make_constellation(m):
+def make_gray_constellation(m):
     # number of bits/symbol (log2(M))
     k = int(log10(m) / log10(2.0))
 
@@ -42,6 +42,10 @@
     # return the constellation; by default, it is normalized
     return const_map
 
+# This makes a constellation that increments around the unit circle
+def make_constellation(m):
+    return [cmath.exp(i * 2 * pi / m * 1j) for i in range(m)]
+
 # Common definition of constellations for Tx and Rx
 constellation = {
     2 : make_constellation(2),           # BPSK





reply via email to

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