summaryrefslogtreecommitdiff
path: root/gnuradio-examples/python/channel-coding/test_tcm.py
diff options
context:
space:
mode:
authoranastas <anastas@221aa14e-8319-0410-a670-987f0aec2ac5>2006-08-16 20:07:36 +0000
committeranastas <anastas@221aa14e-8319-0410-a670-987f0aec2ac5>2006-08-16 20:07:36 +0000
commitd5c192f9e3cde58589845b7b51057afc45d3bc79 (patch)
tree04dc746388bb19f66bae93d110e4f2a5ca14c64b /gnuradio-examples/python/channel-coding/test_tcm.py
parent1f0a124c68a40b2eee063267d4f7aeba4ed87619 (diff)
Several enhancements to gr-trellis and gnuradio-examples/python/channel-coding:
-Added fsm constructor for generating FSM directly from the generator matrix of binary convolutional codes. -Added functionality to fsm class to compute the best way to go from any state to any other state (useful for termination) -Added soft-in-soft-out (SISO) block for turbo processing -Added turbo decoding examples git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3322 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/channel-coding/test_tcm.py')
-rwxr-xr-xgnuradio-examples/python/channel-coding/test_tcm.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gnuradio-examples/python/channel-coding/test_tcm.py b/gnuradio-examples/python/channel-coding/test_tcm.py
index 1f892ef996..f225015580 100755
--- a/gnuradio-examples/python/channel-coding/test_tcm.py
+++ b/gnuradio-examples/python/channel-coding/test_tcm.py
@@ -101,14 +101,17 @@ def main(args):
tot_s=0 # total number of transmitted shorts
terr_s=0 # total number of shorts in error
+ terr_p=0 # total number of packets in error
for i in range(rep):
(s,e)=run_test(f,Kb,bitspersymbol,K,dimensionality,constellation,N0,-long(666+i)) # run experiment with different seed to get different noise realizations
tot_s=tot_s+s
terr_s=terr_s+e
- if (i%100==0) & (i>0): # display progress
- print i,s,e,tot_s,terr_s, '%e' % ((1.0*terr_s)/tot_s)
+ terr_p=terr_p+(terr_s!=0)
+ if ((i+1)%100==0) : # display progress
+ print i+1,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s)
# estimate of the (short or bit) error rate
- print tot_s,terr_s, '%e' % ((1.0*terr_s)/tot_s)
+ print rep,terr_p, '%.2e' % ((1.0*terr_p)/(i+1)),tot_s,terr_s, '%.2e' % ((1.0*terr_s)/tot_s)
+
if __name__ == '__main__':