commit-gnuradio
[Top][All Lists]
Advanced

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

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


From: trondeau
Subject: [Commit-gnuradio] r4624 - gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2
Date: Sat, 24 Feb 2007 15:35:57 -0700 (MST)

Author: trondeau
Date: 2007-02-24 15:35:57 -0700 (Sat, 24 Feb 2007)
New Revision: 4624

Modified:
   
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/dqpsk.py
   
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/pkt.py
   
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/psk.py
Log:
making hier2 block implementations like blksimpl

Modified: 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/dqpsk.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/dqpsk.py
     2007-02-24 21:46:14 UTC (rev 4623)
+++ 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/dqpsk.py
     2007-02-24 22:35:57 UTC (rev 4624)
@@ -39,8 +39,8 @@
 _def_verbose = False
 _def_log = False
 
-_def_costas_alpha = 0.01
-_def_gain_mu = 0.05
+_def_costas_alpha = 0.15
+_def_gain_mu = 0.1
 _def_mu = 0.5
 _def_omega_relative_limit = 0.005
 
@@ -247,7 +247,7 @@
         # Automatic gain control
         scale = (1.0/16384.0)
         self.pre_scaler = gr.multiply_const_cc(scale)   # scale the signal 
from full-range to +-1
-        self.agc = gr.feedforward_agc_cc(16, 1.0)
+        self.agc = gr.feedforward_agc_cc(16, 2.0)
        
         # RRC data filter
         ntaps = 11 * samples_per_symbol
@@ -263,8 +263,8 @@
         self._mm_omega = self._samples_per_symbol
         self._mm_gain_omega = .25 * self._mm_gain_mu * self._mm_gain_mu
         self._costas_beta  = 0.25 * self._costas_alpha * self._costas_alpha
-        fmin = -0.05
-        fmax = 0.05
+        fmin = -0.01
+        fmax = 0.01
         
         self.receiver=gr.mpsk_receiver_cc(arity, pi/4.0,
                                          self._costas_alpha, self._costas_beta,
@@ -278,9 +278,7 @@
 
         # find closest constellation point
         rot = 1
-        rot = .707 + .707j
         rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-
         self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
 
         if self._gray_code:

Modified: 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/pkt.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/pkt.py
       2007-02-24 21:46:14 UTC (rev 4623)
+++ 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/pkt.py
       2007-02-24 22:35:57 UTC (rev 4624)
@@ -159,7 +159,9 @@
 
     def run(self):
         while self.keep_running:
+            print "enter blocking receive call"
             msg = self.rcvd_pktq.delete_head()
+            print "received packet"
             ok, payload = packet_utils.unmake_packet(msg.to_string())
             if self.callback:
                 self.callback(ok, payload)

Modified: 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/psk.py
===================================================================
--- 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/psk.py
       2007-02-24 21:46:14 UTC (rev 4623)
+++ 
gnuradio/branches/developers/trondeau/digital-wip2/gnuradio-core/src/python/gnuradio/blksimpl2/psk.py
       2007-02-24 22:35:57 UTC (rev 4624)
@@ -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,9 @@
     # 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 = {
@@ -57,14 +60,14 @@
 binary_to_gray = {
     2 : range(2),
     4 : [0,1,3,2],
-    8 : range(8)
+    8 : [0, 1, 3, 2, 7, 6, 4, 5]
     }
    
 # gray to binary
 gray_to_binary = {
     2 : range(2),
     4 : [0,1,3,2],
-    8 : range(8)
+    8 : [0, 1, 3, 2, 6, 7, 5, 4]
     }
 
 # -----------------------





reply via email to

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