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
25#include <gnuradio/sync_block.h>
26
27namespace gr {
28namespace satnogs {
29
30/*!
31 * Sink block for NOAA satellites
32 * \ingroup satnogs
33 *
34 */
35class SATNOGS_API noaa_apt_sink : virtual public gr::sync_block
36{
37public:
38 typedef std::shared_ptr<noaa_apt_sink> sptr;
39
40 /*!
41 * Accepts a stream of floats in the range [0,1] which
42 * correspond to one sample per symbol (pixel) and
43 * outputs a grayscale PNG image. The user can
44 * choose between deriving a single PNG file for each
45 * width x length pixels or two PNG files corresponding to
46 * each one of the two different spectrum images contained
47 * in a NOAA APT transmission. The notation 'left' and 'right'
48 * is with respect to the original image sent by the satellite.
49 * Further, this block performs normalization on the input
50 * float values based on the max and min values observed in the stream.
51 * Adding to that, the user has the option to synchronize to the first of the
52 * two training sequences used by the NOAA APT protocol so that
53 * the two images are displayed one next to the other. The user
54 * can also select to rotate the image 180 degrees in case the captured one
55 * is upside down.
56 *
57 *
58 * @param filename_png the base filename of the output PNG file(s)
59 * @param width the width of the image in the APT transmission
60 * @param height the height of the image in the APT transmission
61 * @param sync user option for synchronizing to the first of the
62 * two training sequences
63 * @param flip user option to rotate the image(s) 180 degrees
64 *
65 */
66 static sptr
67 make(const char* filename_png, size_t width, size_t height, bool sync, bool flip);
68};
69
70} // namespace satnogs
71} // namespace gr
72
73#endif /* INCLUDED_SATNOGS_NOAA_APT_SINK_H */
#define SATNOGS_API
Definition: api.h:19
Definition: noaa_apt_sink.h:36
static sptr make(const char *filename_png, size_t width, size_t height, bool sync, bool flip)
std::shared_ptr< noaa_apt_sink > sptr
Definition: noaa_apt_sink.h:38
Definition: amsat_duv_decoder.h:29