blob: e9881ddabcc2be694af82848799c22e530d0476c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#ifndef INCLUDED_MM_C_H
#define INCLUDED_MM_C_H
#include <gr_math.h>
#if 0
#define SLICE_0_R 0.0
#define SLICE_0_I 0.0
#define SLICE_1_R 1.0
#define SLICE_1_I 1.0
#else
#define SLICE_0_R -1.0
#define SLICE_0_I -1.0
#define SLICE_1_R 1.0
#define SLICE_1_I 1.0
#endif
class mm_c {
private:
public:
float d_mm;
float d_omega; //relative sample rate
float d_mu;
float d_gain_mu;
float d_gain_omega;
//delay taps
gr_complex d_x_1; //last input sample
gr_complex d_x_2;
gr_complex d_a_1; //last decision
gr_complex d_a_2;
mm_c (float omega);
gr_complex slicer(gr_complex x);
float update(gr_complex sample, gr_complex decision); //return mu
float update(gr_complex sample); //use built in decision
};
#endif
|