-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nicolas Gravillon
committed
Jul 29, 2023
1 parent
b0ad467
commit 6aaac04
Showing
3 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,37 @@ | ||
|
||
typedef struct filter { | ||
double a[20]; | ||
double b[20]; | ||
double a[20]; // inputs coefficients | ||
double b[20]; // output coefficients | ||
|
||
double X[20]; | ||
double Y[20]; | ||
double X[20]; // history of inputs | ||
double Y[20]; // history of outputs | ||
|
||
int NP; | ||
int NP; // Nomber of Poles - Order | ||
|
||
double a0; | ||
double a0; // internal | ||
double a1; | ||
double a2; | ||
double b0; | ||
double b1; | ||
double b2; | ||
} ChebFilter; | ||
|
||
|
||
typedef struct doublefilter { | ||
int type; | ||
ChebFilter *lp_filter; | ||
ChebFilter *hp_filter; | ||
} dChebFilter; | ||
|
||
ChebFilter* call_205(int P, ChebFilter* filter, double FC, int NP, int LH, double PR); | ||
|
||
ChebFilter* create_che_filter(int NP, double PR, int LH, double FC); | ||
ChebFilter* create_bw_low_pass_filter(int NP, double FC); | ||
|
||
ChebFilter* create_bw_high_pass_filter(int NP, double FC); | ||
ChebFilter* create_che_low_pass_filter(int NP, double FC, double PR); | ||
ChebFilter* create_che_high_pass_filter(int NP, double FC, double PR); | ||
|
||
|
||
dChebFilter* create_bw_low_pass_filter(int NP, double FC); | ||
dChebFilter* create_bw_high_pass_filter(int NP, double FC); | ||
dChebFilter* create_bw_bp_pass_filter(int NP, double FC, double winwidth); | ||
|
||
double applyfilter(ChebFilter* filter, double X0); |