42#if defined(__cplusplus)
53 A_INLINE
void zero() {
output = 0; }
56#if defined(__cplusplus)
59typedef struct a_lpf lpf;
63#define A_LPF_1(alpha) {a_float_c(alpha), 0}
64#define A_LPF_2(fc, ts) {A_LPF_GEN(fc, ts), 0}
66#define A_LPF_GEN(fc, ts) (a_float_c(ts) / (A_FLOAT_1_TAU / a_float_c(fc) + a_float_c(ts)))
double a_float
compiler built-in floating-point number type
Definition a.h:1003
#define A_FLOAT_1_TAU
Definition math.h:249
struct a_lpf a_lpf
instance structure for Low Pass Filter
a_float a_lpf_gen(a_float fc, a_float ts)
generate for Low Pass Filter
Definition lpf.h:81
void a_lpf_init(a_lpf *ctx, a_float alpha)
initialize for Low Pass Filter
Definition lpf.h:91
void a_lpf_zero(a_lpf *ctx)
zeroing for Low Pass Filter
Definition lpf.h:117
a_float a_lpf_iter(a_lpf *ctx, a_float x)
calculate for Low Pass Filter
Definition lpf.h:106
mathematical algorithm library
instance structure for Low Pass Filter
Definition lpf.h:39
a_float output
Definition lpf.h:41
a_float alpha
Definition lpf.h:40