GNU Radio's LTE Package
correlator.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2013 Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT)
4 *
5 * This 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 * This software 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 this software; 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_LTE_CORRELATOR_H
23#define INCLUDED_LTE_CORRELATOR_H
24
25#include <lte/api.h>
26
27#include <gnuradio/gr_complex.h>
28#include <fftw3.h>
29
30namespace gr {
31 namespace lte {
32
33 /*!
34 * \brief This is a helper class to provide Fast Correlation using FFTW3f
35 *
36 */
38 {
39 public:
40 correlator(gr_complex* in1, gr_complex* in2, gr_complex *out, int len);
42
43 void execute();
44 void get_maximum(int &pos, float &max );
45
46 private:
47 //external inputs and outputs
48 gr_complex *d_in1;
49 gr_complex *d_in2;
50 gr_complex *d_out_p;
51 //internal input and output buffers
52 gr_complex *d_in;
53 gr_complex *d_out;
54
55 int d_len;
56
57 // FFTW Planner
58 fftwf_plan d_plan_f;
59 fftwf_plan d_plan_r;
60
61 //results after fourier transform
62 gr_complex* d_f1;
63 gr_complex* d_f2;
64 gr_complex* d_res_f;
65 gr_complex* d_res_t;
66 float* d_abs;
67
68 };
69
70 } // namespace lte
71} // namespace gr
72
73#endif /* INCLUDED_LTE_CORRELATOR_H */
74
#define LTE_API
Definition: api.h:30
This is a helper class to provide Fast Correlation using FFTW3f.
Definition: correlator.h:38
correlator(gr_complex *in1, gr_complex *in2, gr_complex *out, int len)
void get_maximum(int &pos, float &max)
Definition: bch_crc_check_ant_chooser_bb.h:28