GNU Radio's DAB Package
dab_correct_individual_phase_offset_vff.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2004 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
#ifndef INCLUDED_DAB_CORRECT_INDIVIDUAL_PHASE_OFFSET_VFF_H
23
#define INCLUDED_DAB_CORRECT_INDIVIDUAL_PHASE_OFFSET_VFF_H
24
25
#include <gr_sync_block.h>
26
27
class
dab_correct_individual_phase_offset_vff
;
28
29
/*
30
* We use boost::shared_ptr's instead of raw pointers for all access
31
* to gr_blocks (and many other data structures). The shared_ptr gets
32
* us transparent reference counting, which greatly simplifies storage
33
* management issues. This is especially helpful in our hybrid
34
* C++ / Python system.
35
*
36
* See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
37
*
38
* As a convention, the _sptr suffix indicates a boost::shared_ptr
39
*/
40
typedef
boost::shared_ptr<dab_correct_individual_phase_offset_vff> dab_correct_individual_phase_offset_vff_sptr;
41
42
/*!
43
* \brief Return a shared_ptr to a new instance of dab_correct_individual_phase_offset_vff.
44
*
45
* To avoid accidental use of raw pointers, dab_correct_individual_phase_offset_vff's
46
* constructor is private. dab_make_correct_individual_phase_offset_vff is the public
47
* interface for creating new instances.
48
*/
49
dab_correct_individual_phase_offset_vff_sptr
50
dab_make_correct_individual_phase_offset_vff
(
unsigned
int
vlen,
float
alpha);
51
52
/*!
53
* \brief Corrects the individual phase offset of each subcarrier by doing an estimation of the error.
54
* \ingroup DAB
55
*
56
* \param vlen length of the vector
57
* \param alpha adaptation speed fatcor: corr = (1-alpha)*corr + alpha*new_val)
58
*
59
* input: float vector stream with phase vectors of symbols
60
* output: float vector stream with corrected phases
61
*
62
* Note: This block only makes sense as long as the offset of the majority of
63
* the samples is smaller than pi/4
64
*/
65
class
dab_correct_individual_phase_offset_vff
:
public
gr_sync_block
66
{
67
private
:
68
// The friend declaration allows dab_make_correct_individual_phase_offset_vff to
69
// access the private constructor.
70
71
friend
dab_correct_individual_phase_offset_vff_sptr
72
dab_make_correct_individual_phase_offset_vff
(
unsigned
int
vlen,
float
alpha);
73
74
dab_correct_individual_phase_offset_vff
(
unsigned
int
vlen,
float
alpha);
// private constructor
75
76
unsigned
int
d_vlen;
77
float
d_alpha;
78
float
* d_offset_estimation;
79
unsigned
int
d_debug;
80
81
public
:
82
~dab_correct_individual_phase_offset_vff
(
void
);
83
int
work
(
int
noutput_items,
84
gr_vector_const_void_star &input_items,
85
gr_vector_void_star &output_items);
86
};
87
88
#endif
/* INCLUDED_DAB_CORRECT_INDIVIDUAL_PHASE_OFFSET_VFF_H */
dab_correct_individual_phase_offset_vff::work
int work(int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
dab_correct_individual_phase_offset_vff::dab_make_correct_individual_phase_offset_vff
friend dab_correct_individual_phase_offset_vff_sptr dab_make_correct_individual_phase_offset_vff(unsigned int vlen, float alpha)
Return a shared_ptr to a new instance of dab_correct_individual_phase_offset_vff.
dab_correct_individual_phase_offset_vff
Corrects the individual phase offset of each subcarrier by doing an estimation of the error.
Definition:
dab_correct_individual_phase_offset_vff.h:66
dab_correct_individual_phase_offset_vff::~dab_correct_individual_phase_offset_vff
~dab_correct_individual_phase_offset_vff(void)
dab_make_correct_individual_phase_offset_vff
dab_correct_individual_phase_offset_vff_sptr dab_make_correct_individual_phase_offset_vff(unsigned int vlen, float alpha)
Return a shared_ptr to a new instance of dab_correct_individual_phase_offset_vff.
lib
dab_correct_individual_phase_offset_vff.h
Generated by
1.8.20