~ubuntu-branches/ubuntu/utopic/rtfilter/utopic

« back to all changes in this revision

Viewing changes to tests/cheby-table.h

  • Committer: Package Import Robot
  • Author(s): Nicolas Bourdaud
  • Date: 2011-12-01 12:09:30 UTC
  • Revision ID: package-import@ubuntu.com-20111201120930-lmia8ytlwmif9yta
Tags: upstream-1.1
ImportĀ upstreamĀ versionĀ 1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    Copyright (C) 2010-2011 Nicolas Bourdaud <nicolas.bourdaud@epfl.ch>
 
3
 
 
4
    The program is free software: you can redistribute it and/or
 
5
    modify it under the terms of the version 3 of the GNU General
 
6
    Public License as published by the Free Software Foundation.
 
7
  
 
8
    This program is distributed in the hope that it will be useful,
 
9
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
    GNU General Public License for more details.
 
12
    
 
13
    You should have received a copy of the GNU General Public License
 
14
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
*/
 
16
#ifndef CHEBY_TABLE_H
 
17
#define CHEBY_TABLE_H
 
18
 
 
19
struct coeffentry {
 
20
        double fc, r;
 
21
        int highpass;
 
22
        unsigned int npole;
 
23
        double num[8];
 
24
        double den[8];
 
25
};
 
26
 
 
27
// Result coming from DSP guide chap 20
 
28
struct coeffentry chebytable[] = {
 
29
        { .fc = 0.01, .npole = 2, .highpass = 0, .r = 0.005,
 
30
          .num = {8.663387E-04, 1.732678E-03, 8.663387E-04},
 
31
          .den = {1.0, -1.919129E+00, 9.225943E-01}
 
32
        },
 
33
        { .fc = 0.15, .npole = 2, .highpass = 0, .r = 0.005,
 
34
          .num = {1.254285E-01, 2.508570E-01, 1.254285E-01},
 
35
          .den = {1.0, -8.070778E-01, 3.087918E-01}
 
36
        },
 
37
        { .fc = 0.01, .npole = 2, .highpass = 1, .r = 0.005,
 
38
          .num = {9.567529E-01, -1.913506E+00, 9.567529E-01},
 
39
          .den = {1.0, -1.911437E+00, 9.155749E-01}
 
40
        },
 
41
        { .fc = 0.15, .npole = 2, .highpass = 1, .r = 0.005,
 
42
          .num = {5.001024E-01, -1.000205E+00, 5.001024E-01},
 
43
          .den = {1.0, -7.158993E-01, 2.845103E-01}
 
44
        },
 
45
        { .fc = 0.2, .npole = 6, .highpass = 0, .r = 0.005,
 
46
          .num = {4.187408E-03, 2.512445E-02, 6.281112E-02, 8.374816E-02, 6.281112E-02, 2.512445E-02, 4.187408E-03},
 
47
          .den = {1.0, -2.315806E+00, 3.293726E+00, -2.904826E+00, 1.694128E+00, -6.021426E-01, 1.029147E-01}
 
48
        },
 
49
        { .fc = 0.4, .npole = 6, .highpass = 1, .r = 0.005,
 
50
          .num = {9.086141E-05, -5.451685E-04, 1.362921E-03, -1.817228E-03, 1.362921E-03, -5.451685E-04, 9.086141E-05},
 
51
          .den = {1.0, 4.470118E+00, 8.755595E+00, 9.543712E+00, 6.079377E+00, 2.140062E+00, 3.247363E-01}
 
52
        }
 
53
};
 
54
 
 
55
#define NUMCASE (sizeof(chebytable)/sizeof(chebytable[0]))
 
56
 
 
57
 
 
58
#endif // CHEBY_TABLE_H