43#if defined(__cplusplus)
60#if defined(__cplusplus)
63typedef struct a_hpf hpf;
67#if defined(__cplusplus)
68#define A_HPF_INIT(alpha) {a_float_c(alpha), 0, 0}
69#define A_HPF_INIT2(fc, ts) {A_HPF_GEN(fc, ts), 0, 0}
71#define A_HPF_INIT(alpha) (a_hpf){a_float_c(alpha), 0, 0}
72#define A_HPF_INIT2(fc, ts) (a_hpf){A_HPF_GEN(fc, ts), 0, 0}
75#define A_HPF_GEN(fc, ts) (1 / (A_FLOAT_TAU * a_float_c(fc) * a_float_c(ts) + 1))
#define A_FLOAT_TAU
Definition math.h:239
#define a_float
Definition a.h:785
double a_hpf_gen(double fc, double ts)
generate for High Pass Filter
Definition hpf.h:90
void a_hpf_init(a_hpf *ctx, double alpha)
initialize for High Pass Filter
Definition hpf.h:100
double a_hpf_iter(a_hpf *ctx, double x)
calculate for High Pass Filter
Definition hpf.h:116
struct a_hpf a_hpf
instance structure for High Pass Filter
void a_hpf_zero(a_hpf *ctx)
zeroing for High Pass Filter
Definition hpf.h:126
mathematical algorithm library
instance structure for High Pass Filter
Definition hpf.h:39
double alpha
filter coefficient [0,1]
Definition hpf.h:40
double output
filter output
Definition hpf.h:41
double input
filter input
Definition hpf.h:42