GNU Radio Manual and C++ API Reference  3.7.4
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
correlate_and_sync_cc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2013 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio 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, or (at your option)
10  * any later version.
11  *
12  * GNU Radio 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 GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 
24 #ifndef INCLUDED_DIGITAL_CORRELATE_AND_SYNC_CC_H
25 #define INCLUDED_DIGITAL_CORRELATE_AND_SYNC_CC_H
26 
27 #include <gnuradio/digital/api.h>
28 #include <gnuradio/sync_block.h>
29 
30 namespace gr {
31  namespace digital {
32 
33  /*!
34  * \brief Correlate to a preamble and send time/phase sync info
35  * \ingroup synchronizers_blk
36  *
37  * \details
38  * Input:
39  * \li Stream of complex samples.
40  *
41  * Output:
42  * \li Output stream that just passes the input complex samples
43  * \li tag 'phase_est': estimate of phase offset
44  * \li tag 'timing_est': estimate of symbol timing offset
45  * \li tag 'corr_est': the correlation value of the estimates
46  *
47  * This block is designed to search for a preamble by correlation
48  * and uses the results of the correlation to get a time and phase
49  * offset estimate. These estimates are passed downstream as
50  * stream tags for use by follow-on synchronization blocks.
51  *
52  * The preamble is provided as a set of symbols along with a
53  * baseband matched filter which we use to create the filtered and
54  * upsampled symbol that we will receive over-the-air.
55  *
56  * The phase_est tag is used to adjust the phase estimation of any
57  * downstream synchronization blocks and is currently used by the
58  * gr::digital::costas_loop_cc block.
59  *
60  * The time_est tag is used to adjust the sampling timing
61  * estimation of any downstream synchronization blocks and is
62  * currently used by the gr::digital::pfb_clock_sync_ccf block.
63  */
65  {
66  public:
68 
69  /*!
70  * Make a block that correlates against the \p symbols vector
71  * and outputs a phase and symbol timing estimate.
72  *
73  * \param symbols Set of symbols to correlate against (e.g., a
74  * preamble).
75  * \param filter Baseband matched filter (e.g., RRC)
76  * \param sps Samples per symbol
77  * \param nfilts Number of filters in the internal PFB
78  */
79  static sptr make(const std::vector<gr_complex> &symbols,
80  const std::vector<float> &filter,
81  unsigned int sps, unsigned int nfilts=32);
82 
83  virtual std::vector<gr_complex> symbols() const = 0;
84  virtual void set_symbols(const std::vector<gr_complex> &symbols) = 0;
85  };
86 
87  } // namespace digital
88 } // namespace gr
89 
90 #endif /* INCLUDED_DIGITAL_CORRELATE_AND_SYNC_CC_H */
91 
boost::shared_ptr< correlate_and_sync_cc > sptr
Definition: correlate_and_sync_cc.h:67
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
Correlate to a preamble and send time/phase sync info.
Definition: correlate_and_sync_cc.h:64