GNU Radio's MAPPER Package
pream_sync_correlator.h
Go to the documentation of this file.
1/* -*- c++ -*- */
2/*
3 * Copyright 2015 Free Software Foundation, Inc
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#ifndef INCLUDED_MAPPER_PREAMBLE_SYNC_CORRELATOR_H
22#define INCLUDED_MAPPER_PREAMBLE_SYNC_CORRELATOR_H
23
24#include <mapper/api.h>
25#include <gnuradio/gr_complex.h>
26#include <cmath>
27#include <stdio.h>
28#include <vector>
29
30
31namespace gr {
32 namespace mapper {
33
35 public:
37 pream_sync_correlator(int N, gr_complex *symbols);
39 void next_symbol(gr_complex next_sym);
40 float xcorr_value(void);
41 float acquire_value(void);
42 void reset(void);
43 void rewind(void);
45
46 private:
47 int d_preamble_symbol_count;
48 std::vector<gr_complex> d_preamble_symbols;
49 std::vector<float> d_preamble_phase_change;
50 std::vector<gr_complex> d_in_stream;
51 void unwrap(float *phase_array, int N);
52 };
53 }
54}
55
56#endif /* INCLUDED_MAPPER_PREAMBLE_SYNC_CORRELATOR_H */
#define MAPPER_API
Definition api.h:30
Definition pream_sync_correlator.h:34
pream_sync_correlator * clone() const
pream_sync_correlator(int N, gr_complex *symbols)
void next_symbol(gr_complex next_sym)
Definition constellation.h:11