GNU Radio Manual and C++ API Reference  3.7.9.2
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
cpm.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2010,2012 Free Software Foundation, Inc.
4  *
5  * GNU Radio is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3, or (at your option)
8  * any later version.
9  *
10  * GNU Radio is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with GNU Radio; see the file COPYING. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 
22 #ifndef INCLUDED_ANALOG_CPM_H
23 #define INCLUDED_ANALOG_CPM_H
24 
25 #include <gnuradio/analog/api.h>
26 #include <vector>
27 
28 namespace gr {
29  namespace analog {
30 
31  /*! \brief Return the taps for an interpolating FIR filter
32  * (gr::filter::interp_fir_filter_fff).
33  */
35  {
36  public:
37  enum cpm_type {
38  LRC,
41  TFM,
43  GENERIC = 999
44  };
45 
46  /*! \brief Return the taps for an interpolating FIR filter
47  * (gr::filter::interp_fir_filter_fff).
48  *
49  * \details
50  * These taps represent the phase response \f$g(k)\f$ for use in a CPM modulator,
51  * see also gr_cpmmod_bc.
52  *
53  * \param type The CPM type (Rectangular, Raised Cosine,
54  * Spectral Raised Cosine, Tamed FM or Gaussian).
55  * \param samples_per_sym Samples per symbol.
56  * \param L The length of the phase response in symbols.
57  * \param beta For Spectral Raised Cosine, this is the rolloff
58  * factor. For Gaussian phase responses, this the
59  * 3dB-time-bandwidth product. For all other cases,
60  * it is ignored.
61  *
62  * Output: returns a vector of length \a K = \p samples_per_sym
63  * x \p L. This can be used directly in an
64  * interpolating FIR filter such as
65  * gr_interp_fir_filter_fff with interpolation factor \p
66  * samples_per_sym.
67  *
68  * All phase responses are normalised s.t. \f$ \sum_{k=0}^{K-1}
69  * g(k) = 1\f$; this will cause a maximum phase change of \f$ h
70  * \cdot \pi\f$ between two symbols, where \a h is the
71  * modulation index.
72  *
73  * The following phase responses can be generated:
74  * - LREC: Rectangular phase response.
75  * - LRC: Raised cosine phase response, looks like 1 - cos(x).
76  * - LSRC: Spectral raised cosine. This requires a rolloff factor beta.
77  * The phase response is the Fourier transform of raised cosine
78  * function.
79  * - TFM: Tamed frequency modulation. This scheme minimizes phase change for
80  * rapidly varying input symbols.
81  * - GAUSSIAN: A Gaussian phase response. For a modulation index h = 1/2, this
82  * results in GMSK.
83  *
84  * A short description of all these phase responses can be found in [1].
85  *
86  * [1]: Anderson, Aulin and Sundberg; Digital Phase Modulation
87  */
88  static std::vector<float>
89  phase_response(cpm_type type, unsigned samples_per_sym,
90  unsigned L, double beta=0.3);
91  };
92  } // namespace analog
93 } // namespace gr
94 
95 #endif /* INCLUDED_ANALOG_CPM_H */
96 
Definition: cpm.h:39
cpm_type
Definition: cpm.h:37
Definition: cpm.h:41
Definition: cpm.h:38
Definition: cpm.h:42
Include this header to use the message passing features.
Definition: logger.h:131
#define ANALOG_API
Definition: gr-analog/include/gnuradio/analog/api.h:30
Definition: cpm.h:40
Return the taps for an interpolating FIR filter (gr::filter::interp_fir_filter_fff).
Definition: cpm.h:34