<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Sun Sep 20 19:09:57 2009</timestamp>
+ <timestamp>Sun Sep 20 19:30:16 2009</timestamp>
<block>
<key>options</key>
<param>
<value>0</value>
</param>
</block>
- <block>
- <key>gr_file_sink</key>
- <param>
- <key>id</key>
- <value>gr_file_sink_1</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>file</key>
- <value>frames.dat</value>
- </param>
- <param>
- <key>type</key>
- <value>short</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(1253, 805)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>noaa_hrpt_deframer</key>
- <param>
- <key>id</key>
- <value>noaa_hrpt_deframer_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(1063, 809)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
<block>
<key>wxgui_scopesink2</key>
<param>
<value>0</value>
</param>
</block>
+ <block>
+ <key>gr_file_sink</key>
+ <param>
+ <key>id</key>
+ <value>gr_file_sink_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>file</key>
+ <value>frames.dat</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1265, 917)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>noaa_hrpt_deframer</key>
+ <param>
+ <key>id</key>
+ <value>noaa_hrpt_deframer_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1063, 809)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>noaa_hrpt_decoder</key>
+ <param>
+ <key>id</key>
+ <value>noaa_hrpt_decoder_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1266, 809)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
<connection>
<source_block_id>virtual_source_0</source_block_id>
<sink_block_id>agr</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
+ <connection>
+ <source_block_id>noaa_hrpt_deframer_0</source_block_id>
+ <sink_block_id>noaa_hrpt_decoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
</flow_graph>
##################################################
# Gnuradio Python Flow Graph
# Title: USRP HRPT Receiver
-# Generated: Sun Sep 20 19:09:57 2009
+# Generated: Sun Sep 20 19:30:17 2009
##################################################
from gnuradio import eng_notation
self.agr = gr.agc_cc(1e-6, 1.0, 1.0, 1.0)
self.gr_deinterleave_0 = gr.deinterleave(gr.sizeof_float*1)
self.gr_file_sink_1 = gr.file_sink(gr.sizeof_short*1, "frames.dat")
- self.gr_file_source_0 = gr.file_source(gr.sizeof_short*1, "filename", False)
+ self.gr_file_source_0 = gr.file_source(gr.sizeof_short*1, filename, False)
self.gr_float_to_complex_0 = gr.float_to_complex(1)
self.gr_short_to_float_0 = gr.short_to_float()
self.matched_filter = gr.moving_average_cc(hs, 1.0/hs, 4000)
+ self.noaa_hrpt_decoder_0 = noaa.hrpt_decoder()
self.noaa_hrpt_deframer_0 = noaa.hrpt_deframer()
self.noaa_hrpt_pll_cf_0 = noaa.hrpt_pll_cf(pll_alpha, pll_alpha**2/4.0, max_carrier_offset)
self.noaa_hrpt_sync_fb_0 = noaa.hrpt_sync_fb(sync_alpha, sync_alpha**2/4.0, sps, max_sync_offset)
self.connect((self.gr_deinterleave_0, 1), (self.gr_float_to_complex_0, 1))
self.connect((self.gr_deinterleave_0, 0), (self.gr_float_to_complex_0, 0))
self.connect((self.gr_file_source_0, 0), (self.gr_short_to_float_0, 0))
+ self.connect((self.noaa_hrpt_deframer_0, 0), (self.noaa_hrpt_decoder_0, 0))
def set_filename(self, filename):
self.filename = filename
grcblocksdir = $(prefix)/share/gnuradio/grc/blocks
dist_grcblocks_DATA = \
+ noaa_hrpt_decoder.xml \
noaa_hrpt_deframer.xml \
noaa_hrpt_pll_cf.xml \
noaa_hrpt_sync_fb.xml
--- /dev/null
+<?xml version="1.0"?>
+<block>
+ <name>HRPT Decoder</name>
+ <key>noaa_hrpt_decoder</key>
+ <category>NOAA</category>
+ <import>from gnuradio import noaa</import>
+ <make>noaa.hrpt_decoder()</make>
+ <sink>
+ <name>in</name>
+ <type>short</type>
+ </sink>
+</block>
libgnuradio-noaa.la
libgnuradio_noaa_la_SOURCES = \
+ noaa_hrpt_decoder.cc \
noaa_hrpt_deframer.cc \
noaa_hrpt_pll_cf.cc \
noaa_hrpt_sync_fb.cc
libgnuradio_noaa_la_LDFLAGS = $(NO_UNDEFINED) -version-info 0:0:0
grinclude_HEADERS = \
+ noaa_hrpt_decoder.h \
noaa_hrpt_deframer.h \
noaa_hrpt_pll_cf.h \
noaa_hrpt_sync_fb.h
--- /dev/null
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <noaa_hrpt_decoder.h>
+#include <gr_io_signature.h>
+
+#define SYNC1 0x0284
+#define SYNC2 0x016F
+#define SYNC3 0x035C
+#define SYNC4 0x019D
+#define SYNC5 0x020F
+#define SYNC6 0x0095
+
+noaa_hrpt_decoder_sptr
+noaa_make_hrpt_decoder()
+{
+ return gnuradio::get_initial_sptr(new noaa_hrpt_decoder());
+}
+
+noaa_hrpt_decoder::noaa_hrpt_decoder()
+ : gr_sync_block("noaa_hrpt_decoder",
+ gr_make_io_signature(1, 1, sizeof(short)),
+ gr_make_io_signature(0, 0, 0))
+{
+ d_word_count = 0;
+}
+
+int
+noaa_hrpt_decoder::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+{
+ const unsigned short *in = (const unsigned short*)input_items[0];
+
+ int i = 0;
+ while (i < noutput_items) {
+ unsigned short word = in[i++];
+ }
+
+ return i;
+}
--- /dev/null
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 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.
+ */
+
+#ifndef INCLUDED_NOAA_HRPT_DECODER_H
+#define INCLUDED_NOAA_HRPT_DECODER_H
+
+#include <gr_sync_block.h>
+
+class noaa_hrpt_decoder;
+typedef boost::shared_ptr<noaa_hrpt_decoder> noaa_hrpt_decoder_sptr;
+
+noaa_hrpt_decoder_sptr
+noaa_make_hrpt_decoder();
+
+class noaa_hrpt_decoder : public gr_sync_block
+{
+ friend noaa_hrpt_decoder_sptr noaa_make_hrpt_decoder();
+ noaa_hrpt_decoder();
+
+ unsigned int d_word_count;
+
+public:
+ int work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+};
+
+#endif /* INCLUDED_NOAA_HRPT_DECODER_H */
# additional SWIG files to be installed
noaa_swig_swiginclude_headers = \
noaa_swig.i \
+ noaa_hrpt_decoder.i \
noaa_hrpt_deframer.i \
noaa_hrpt_pll_cf.i \
noaa_hrpt_sync_fb.i
--- /dev/null
+/* -*- c++ -*- */
+/*
+ * Copyright 2009 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.
+ */
+
+GR_SWIG_BLOCK_MAGIC(noaa,hrpt_decoder)
+
+noaa_hrpt_decoder_sptr
+noaa_make_hrpt_decoder();
+
+class noaa_hrpt_decoder : public gr_sync_block
+{
+private:
+ noaa_hrpt_decoder();
+};
noaa_hrpt_deframer_sptr
noaa_make_hrpt_deframer();
-class noaa_hrpt_deframer : public gr_sync_block
+class noaa_hrpt_deframer : public gr_block
{
private:
noaa_hrpt_deframer();
%include "gnuradio.i"
%{
+#include <noaa_hrpt_decoder.h>
#include <noaa_hrpt_deframer.h>
#include <noaa_hrpt_pll_cf.h>
#include <noaa_hrpt_sync_fb.h>
%}
+%include "noaa_hrpt_decoder.i"
%include "noaa_hrpt_deframer.i"
%include "noaa_hrpt_pll_cf.i"
%include "noaa_hrpt_sync_fb.i"