GNU Radio's SATNOGS Package
noaa_apt_sink.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
4  *
5  * Copyright (C) 2017, Libre Space Foundation <http://librespacefoundation.org/>
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef INCLUDED_SATNOGS_NOAA_APT_SINK_H
22 #define INCLUDED_SATNOGS_NOAA_APT_SINK_H
23 
24 #include <satnogs/api.h>
25 #include <gnuradio/sync_block.h>
26 
27 namespace gr {
28 namespace satnogs {
29 
30 /*!
31  * Sink block for NOAA satellites
32  * \ingroup satnogs
33  *
34  */
35 class SATNOGS_API noaa_apt_sink : virtual public gr::sync_block {
36 public:
37  typedef boost::shared_ptr<noaa_apt_sink> sptr;
38 
39  /*!
40  * Accepts a stream of floats in the range [0,1] which
41  * correspond to one sample per symbol (pixel) and
42  * outputs a grayscale PNG image. The user can
43  * choose between deriving a single PNG file for each
44  * width x length pixels or two PNG files corresponding to
45  * each one of the two different spectrum images contained
46  * in a NOAA APT transmission. The notation 'left' and 'right'
47  * is with respect to the original image sent by the satellite.
48  * Further, this block performs normalization on the input
49  * float values based on the max and min values observed in the stream.
50  * Adding to that, the user has the option to synchronize to the first of the
51  * two training sequences used by the NOAA APT protocol so that
52  * the two images are displayed one next to the other. The user
53  * can also select to rotate the image 180 degrees in case the captured one
54  * is upside down.
55  *
56  *
57  * @param filename_png the base filename of the output PNG file(s)
58  * @param width the width of the image in the APT transmission
59  * @param height the height of the image in the APT transmission
60  * @param sync user option for synchronizing to the first of the
61  * two training sequences
62  * @param flip user option to rotate the image(s) 180 degrees
63  *
64  */
65  static sptr
66  make(const char *filename_png, size_t width, size_t height,
67  bool sync, bool flip);
68 };
69 
70 } // namespace satnogs
71 } // namespace gr
72 
73 #endif /* INCLUDED_SATNOGS_NOAA_APT_SINK_H */
74 
boost::shared_ptr< noaa_apt_sink > sptr
Definition: noaa_apt_sink.h:37
Definition: amsat_duv_decoder.h:29
Definition: noaa_apt_sink.h:35
#define SATNOGS_API
Definition: api.h:30