GNU Radio's SATELLITES Package
time_dependent_delay.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2025 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_TIME_DEPENDENT_DELAY_H
11#define INCLUDED_SATELLITES_TIME_DEPENDENT_DELAY_H
12
13#include <gnuradio/sync_block.h>
14#include <satellites/api.h>
15#include <string>
16#include <vector>
17
18namespace gr {
19namespace satellites {
20
21/*!
22 * \brief Applies a time-dependent group delay by using a delay vs. time textfile
23 * \ingroup satellites
24 *
25 * \details
26 * This block is similar to the Doppler Correction block, in the sense that
27 * it uses a text file that lists a time series of delay vs. time. The format
28 * of this text file is very similar to the one used by Doppler Correction.
29 * Each line of the file contains a timestamp and a delay. The format of the
30 * timestamp is the same as for Doppler correction. The delay is given in
31 * seconds.
32 *
33 * Like the Doppler Correction block, this block can use time tags to update
34 * its internal timestamp.
35 *
36 * The block interpolates the delay linearly for each sample, and uses a
37 * polyphase filterbank to apply the appropriate delay.
38 */
39class SATELLITES_API time_dependent_delay : virtual public gr::sync_block
40{
41public:
42 typedef std::shared_ptr<time_dependent_delay> sptr;
43
44 /*!
45 * \brief Build the Time-dependent Delay block.
46 *
47 * \param filename Path of the text file describing the delay vs. time data
48 * \param samp_rate Sample rate
49 * \param t0 Timestamp corresponding to the first sample
50 * \param taps Taps for the fractional delay polyphase filterbank
51 * \param num_filters Number of filters in the polyphase filterbank
52 */
53 static sptr make(const std::string& filename,
54 double samp_rate,
55 double t0,
56 const std::vector<float>& taps,
57 int num_filters);
58
59 /*!
60 * \brief Sets the current time.
61 *
62 * \param t Tiemstamp corresponding to the current time.
63 */
64 virtual void set_time(double t) = 0;
65
66 /*!
67 * \brief Returns the current time.
68 */
69 virtual double time() = 0;
70
71 /*!
72 * \brief Returns the current delay in seconds.
73 */
74 virtual double delay() = 0;
75};
76
77} // namespace satellites
78} // namespace gr
79
80#endif /* INCLUDED_SATELLITES_TIME_DEPENDENT_DELAY_H */
#define SATELLITES_API
Definition api.h:31
Applies a time-dependent group delay by using a delay vs. time textfile.
Definition time_dependent_delay.h:40
virtual void set_time(double t)=0
Sets the current time.
std::shared_ptr< time_dependent_delay > sptr
Definition time_dependent_delay.h:42
static sptr make(const std::string &filename, double samp_rate, double t0, const std::vector< float > &taps, int num_filters)
Build the Time-dependent Delay block.
virtual double time()=0
Returns the current time.
virtual double delay()=0
Returns the current delay in seconds.
data_t t[NROOTS+1]
Definition lib/libfec/decode_rs.h:83
Definition ax100_decode.h:18
Definition ax100_decode.h:17