From d049678e49aefaa823ce45bd9310e2e43c93e1cf Mon Sep 17 00:00:00 2001
From: cswiger <cswiger@221aa14e-8319-0410-a670-987f0aec2ac5>
Date: Mon, 23 Apr 2007 10:45:42 +0000
Subject: Fixed atsc_field_sync_demux to consume input even when not creating
 output. Added python files to make a complete 2.x atsc receiver, but it is
 not fully working. It will happily produce the exact same amount of transport
 stream output as a working system but has errors in the data.

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@5081 221aa14e-8319-0410-a670-987f0aec2ac5
---
 gr-atsc/src/python/interp.py | 74 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)
 create mode 100755 gr-atsc/src/python/interp.py

(limited to 'gr-atsc/src/python/interp.py')

diff --git a/gr-atsc/src/python/interp.py b/gr-atsc/src/python/interp.py
new file mode 100755
index 0000000000..36cc72447b
--- /dev/null
+++ b/gr-atsc/src/python/interp.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env /usr/bin/python
+#
+# Copyright 2004 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 2, 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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+# 
+# This module starts the atsc processing chain taking the captured
+# off-air signal created with:
+#
+#  usrp_rx_cfile.py -R <side with tuner, a or b>
+#                   -d 10     set decimation to get signal at 6.4e6 rate
+#                   -f <center of tv signal channel freq>
+#                   -g <appropriate gain for best signal / noise>
+# 
+# All this module does is multiply the sample rate by 3, from 6.4e6 to
+# 19.2e6 complex samples / sec, then lowpass filter with a cutoff of 3.2MHz
+# and a transition band width of .5MHz.  Center of the tv channels is
+# then at 0 with edges at -3.2MHz and 3.2MHz.
+
+from gnuradio import gr
+import sys
+
+def graph (args):
+
+    nargs = len (args)
+    if nargs == 1:
+	infile = args[0]
+    else:
+	sys.stderr.write('usage: interp.py input_file\n')
+	sys.exit (1)
+
+    sampling_freq = 6400000
+
+    fg = gr.flow_graph ()
+
+    src0 = gr.file_source (gr.sizeof_gr_complex,infile)
+    src1 = gr.sig_source_c (sampling_freq, gr.GR_CONST_WAVE, 1, 0)
+    src2 = gr.sig_source_c (sampling_freq, gr.GR_CONST_WAVE, 1, 0)
+
+    interlv = gr.interleave(gr.sizeof_gr_complex)
+
+    lp_coeffs = gr.firdes.low_pass ( 3, 19.2e6, 3.2e6, .5e6, gr.firdes.WIN_HAMMING )
+    lp = gr.fir_filter_ccf ( 1, lp_coeffs )
+
+    file = gr.file_sink(gr.sizeof_gr_complex,"/tmp/atsc_pipe_1")
+
+    fg.connect( src0, (interlv, 0) )
+    fg.connect( src1, (interlv, 1) )
+    fg.connect( src2, (interlv, 2) )
+    fg.connect( interlv, lp, file )
+
+    fg.start()
+    raw_input ('Head End: Press Enter to stop')
+    fg.stop()
+
+if __name__ == '__main__':
+    graph (sys.argv[1:])
+
+
-- 
cgit v1.2.3