GNU Radio's SATNOGS Package
doppler_correction.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) 2022, Libre Space Foundation <http://libre.space>
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
22#ifndef DOPPLER_CORRECTION_H
23#define DOPPLER_CORRECTION_H
24
26#include <memory>
27#include <string>
28
29namespace gr {
30namespace satnogs {
31
32/**
33 * @brief Base class of the Doppler Correction
34 *
35 * This class provides the API for a generalized Doppler correction. Different correction
36 * schemes can be implemented and easily used.
37 */
39{
40public:
41 using sptr = std::shared_ptr<doppler_correction>;
42
43 doppler_correction(const std::string& name = "doppler_correction") : m_name(name) {}
44
45 virtual ~doppler_correction() = default;
46
47 const std::string& name() const { return m_name; }
48
49 virtual void start() {}
50
51 virtual void stop() {}
52
53 virtual double offset() = 0;
54
55 virtual void reset() {}
56
57private:
58 const std::string m_name;
59};
60
61} // namespace satnogs
62} // namespace gr
63
64
65#endif // DOPPLER_CORRECTION_H
#define SATNOGS_API
Definition: api.h:19
Base class of the Doppler Correction.
Definition: doppler_correction.h:39
std::shared_ptr< doppler_correction > sptr
Definition: doppler_correction.h:41
virtual void start()
Definition: doppler_correction.h:49
const std::string & name() const
Definition: doppler_correction.h:47
doppler_correction(const std::string &name="doppler_correction")
Definition: doppler_correction.h:43
virtual void stop()
Definition: doppler_correction.h:51
virtual ~doppler_correction()=default
virtual void reset()
Definition: doppler_correction.h:55
Definition: amsat_duv_decoder.h:29