commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r8205 - in gnuradio/branches/developers/jcorgan/ecc/gn


From: jcorgan
Subject: [Commit-gnuradio] r8205 - in gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src: lib/general python/gnuradio/gr
Date: Tue, 15 Apr 2008 15:17:50 -0600 (MDT)

Author: jcorgan
Date: 2008-04-15 15:17:50 -0600 (Tue, 15 Apr 2008)
New Revision: 8205

Added:
   
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py
Modified:
   
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc
   
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h
   
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h
   
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/Makefile.am
Log:
Cleanup, comments, QA.

Modified: 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc
     2008-04-15 21:04:59 UTC (rev 8204)
+++ 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.cc
     2008-04-15 21:17:50 UTC (rev 8205)
@@ -73,8 +73,9 @@
       
       // Every sixteenth symbol, read out a byte
       if (d_count % 16 == 11) {
-       d_metric = viterbi_get_output(d_state0, out++);
-       printf("%li\n", *(out-1), d_metric);
+       // long metric = 
+       viterbi_get_output(d_state0, out++);
+       // printf("%li\n", *(out-1), metric);
       }
     }
     

Modified: 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h
      2008-04-15 21:04:59 UTC (rev 8204)
+++ 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_decode_ccsds_27_fb.h
      2008-04-15 21:17:50 UTC (rev 8205)
@@ -32,6 +32,25 @@
 
 gr_decode_ccsds_27_fb_sptr gr_make_decode_ccsds_27_fb();
 
+/*! \brief A rate 1/2, k=7 convolutional decoder for the CCSDS standard
+ * \ingroup ecc
+ *  
+ * This block performs soft-decision convolutional decoding using the Viterbi
+ * algorithm.
+ *  
+ * The input is a stream of (possibly noise corrupted) floating point values 
+ * nominally spanning [-1.0, 1.0], representing the encoded channel symbols 
+ * 0 (-1.0) and 1 (1.0), with erased symbols at 0.0.
+ *
+ * The output is MSB first packed bytes of decoded values.
+ *
+ * As a rate 1/2 code, there will be one output byte for every 16 input 
symbols.
+ *
+ * This block is designed for continuous data streaming, not packetized data.
+ * The first 32 bits out will be zeroes, with the output delayed four bytes
+ * from the corresponding inputs.
+ */
+
 class gr_decode_ccsds_27_fb : public gr_sync_decimator
 {
 private:
@@ -45,10 +64,9 @@
   struct viterbi_state d_state1[64];
   unsigned char d_viterbi_in[16];
 
-  long d_metric;
   int d_count;
       
- public:
+public:
   ~gr_decode_ccsds_27_fb();
 
   int work (int noutput_items,

Modified: 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h
      2008-04-15 21:04:59 UTC (rev 8204)
+++ 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/lib/general/gr_encode_ccsds_27_bb.h
      2008-04-15 21:17:50 UTC (rev 8205)
@@ -28,6 +28,22 @@
 
 gr_encode_ccsds_27_bb_sptr gr_make_encode_ccsds_27_bb();
 
+/*! \brief A rate 1/2, k=7 convolutional encoder for the CCSDS standard
+ * \ingroup ecc
+ *  
+ * This block performs convolutional encoding using the CCSDS standard
+ * polynomial ("Voyager").
+ *  
+ * The input is an MSB first packed stream of bits.
+ *
+ * The output is a stream of symbols 0 or 1 representing the encoded data.
+ *
+ * As a rate 1/2 code, there will be 16 output symbols for every input byte.
+ *
+ * This block is designed for continuous data streaming, not packetized data.
+ * There is no provision to "flush" the encoder.
+ */
+
 class gr_encode_ccsds_27_bb : public gr_sync_interpolator
 {
 private:

Modified: 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/Makefile.am
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/Makefile.am
   2008-04-15 21:04:59 UTC (rev 8204)
+++ 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/Makefile.am
   2008-04-15 21:17:50 UTC (rev 8205)
@@ -49,6 +49,7 @@
        qa_agc.py                       \
        qa_argmax.py                    \
        qa_bin_statistics.py            \
+       qa_ecc_ccsds27.py               \
        qa_cma_equalizer.py             \
        qa_complex_to_xxx.py            \
        qa_constellation_decoder_cb.py  \

Added: 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py
===================================================================
--- 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py
                            (rev 0)
+++ 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py
    2008-04-15 21:17:50 UTC (rev 8205)
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#
+# Copyright 2004,2007 Free Software Foundation, Inc.
+# 
+# This file is part of GNU Radio
+# 
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+# 
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+# 
+
+from gnuradio import gr, gr_unittest
+
+class test_ccsds_27 (gr_unittest.TestCase):
+
+    def setUp (self):
+        self.tb = gr.top_block ()
+
+    def tearDown (self):
+        self.tb = None
+
+    def test_ccsds_27 (self):
+        src_data = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
+       expected = (0, 0, 0, 0, 1, 2, 3, 4, 5, 6)
+        src = gr.vector_source_b(src_data)
+       enc = gr.encode_ccsds_27_bb()
+       b2f = gr.char_to_float()
+       add = gr.add_const_ff(-0.5)
+       mul = gr.multiply_const_ff(2.0)
+       dec = gr.decode_ccsds_27_fb()
+       dst = gr.vector_sink_b()
+       self.tb.connect(src, enc, b2f, add, mul, dec, dst)
+       self.tb.run()
+       dst_data = dst.data()
+        self.assertEqual(expected, dst_data)
+    
+
+if __name__ == '__main__':
+    gr_unittest.main ()


Property changes on: 
gnuradio/branches/developers/jcorgan/ecc/gnuradio-core/src/python/gnuradio/gr/qa_ecc_ccsds_27.py
___________________________________________________________________
Name: svn:executable
   + *





reply via email to

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