GNU Radio's SATELLITES Package

doppler_correction.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2022 Daniel Estevez <daniel@destevez.net>.
4 *
5 * This file is part of gr-satellites
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 */
9
10#ifndef INCLUDED_SATELLITES_DOPPLER_CORRECTION_H
11#define INCLUDED_SATELLITES_DOPPLER_CORRECTION_H
12
13#include <gnuradio/sync_block.h>
14#include <satellites/api.h>
15
16 namespace gr {
17 namespace satellites {
18
19/*!
20 * \brief Performs Doppler correction using a frequency vs. time file
21 * \ingroup satellites
22 *
23 * \details
24 * The Doppler Correction block uses a text file listing frequency vs. time to
25 * perform Doppler correction on its input signal. The same block can be used
26 * for Doppler simulation by inverting the frequency values in the input file or
27 * by taking the complex conjugate of the output of the block.
28 *
29 * The text file should contain lines with a timestamp and a frequency separated
30 * by a space. The timestamps are given in seconds, and typically consist of
31 * UNIX time. The t0 parameter in the block constructor gives the starting time,
32 * which is the timestamp corresponding to the first sample processed by the
33 * block. As long as the timestamps in the file and this timestamp are
34 * consistent, the block will work correctly. The frequencies are given in Hz.
35 *
36 * The block can also use time tags such as those generated by the UHD Source
37 * block to update its internal timestamp. In this case the timestamps in the
38 * file should use UNIX seconds, since the UHD timestamps also use UNIX
39 * seconds. When using UHD time tags, the t0 parameter can be left as 0.
40 *
41 * The Doppler correction block interpolates the frequency linearly between each
42 * pair of entries in the text file, and generates a correction with continuous
43 * phase.
44 */
45 class SATELLITES_API doppler_correction : virtual public gr::sync_block
46{
47 public:
48 typedef boost::shared_ptr<doppler_correction> sptr;
49
50 /*!
51 * \brief Build the Doppler Correction block.
52 *
53 * \param filename Path of the text file describing the Doppler data
54 * \param samp_rate Sample rate
55 * \param t0 Timestamp corresponding to the first sample
56 */
57 static sptr make(const char* filename, double samp_rate, double t0);
58};
59
60} // namespace satellites
61} // namespace gr
62
63#endif /* INCLUDED_SATELLITES_DOPPLER_CORRECTION_H */
api.h
SATELLITES_API
#define SATELLITES_API
Definition api.h:31
gr::satellites::doppler_correction
Performs Doppler correction using a frequency vs. time file.
Definition doppler_correction.h:46
gr::satellites::doppler_correction::sptr
boost::shared_ptr< doppler_correction > sptr
Definition doppler_correction.h:48
gr::satellites::doppler_correction::make
static sptr make(const char *filename, double samp_rate, double t0)
Build the Doppler Correction block.
gr::satellites
Definition ax100_decode.h:18
gr
Definition ax100_decode.h:17