GNU Radio 3.7.2 C++ API
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: complex samples.
39  * Output 0: pass through complex samples
40  * tag 'phase_est': estimate of phase offset
41  * tag 'timing_est': estimate of symbol timing offset
42  * tag 'corr_est': the correlation value of the estimates
43  *
44  * This block is designed to search for a preamble by correlation
45  * and uses the results of the correlation to get a time and phase
46  * offset estimate. These estimates are passed downstream as
47  * stream tags for use by follow-on synchronization blocks.
48  *
49  * The preamble is provided as a set of symbols along with a
50  * baseband matched filter which we use to create the filtered and
51  * upsampled symbol that we will receive over-the-air.
52  *
53  * The phase_est tag is used to adjust the phase estimation of any
54  * downstream synchronization blocks and is currently used by the
55  * gr::digital::costas_loop_cc block.
56  *
57  * The time_est tag is used to adjust the sampling timing
58  * estimation of any downstream synchronization blocks and is
59  * currently used by the gr::digital::pfb_clock_sync_ccf block.
60  */
62  {
63  public:
65 
66  /*!
67  * Make a block that correlates against the \p symbols vector
68  * and outputs a phase and symbol timing estimate.
69  *
70  * \param symbols Set of symbols to correlate against (e.g., a
71  * preamble).
72  * \param filter Baseband matched filter (e.g., RRC)
73  * \param sps Samples per symbol
74  * \param nfilts Number of filters in the internal PFB
75  */
76  static sptr make(const std::vector<gr_complex> &symbols,
77  const std::vector<float> &filter,
78  unsigned int sps, unsigned int nfilts=32);
79 
80  virtual std::vector<gr_complex> symbols() const = 0;
81  virtual void set_symbols(const std::vector<gr_complex> &symbols) = 0;
82  };
83 
84  } // namespace digital
85 } // namespace gr
86 
87 #endif /* INCLUDED_DIGITAL_CORRELATE_AND_SYNC_CC_H */
88 
boost::shared_ptr< correlate_and_sync_cc > sptr
Definition: correlate_and_sync_cc.h:64
#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:61