1 Star 3 Fork 2

luoqi/qfoc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
notch_filter.h 837 Bytes
一键复制 编辑 原始数据 按行查看 历史
/**
* @ Author: luoqi
* @ Create Time: 2025-03-19 12:26
* @ Modified by: luoqi
* @ Modified time: 2025-03-19 21:12
* @ Description:
*/
#ifndef _NOTCH_FILTER_H_
#define _NOTCH_FILTER_H_
#ifndef qfp_t
typedef float qfp_t;
#endif
#ifndef NAN
#define NAN (0.0f / 0.0f)
#endif
typedef struct {
qfp_t a1;
qfp_t a2;
qfp_t b0;
qfp_t b1;
qfp_t b2;
qfp_t x1;
qfp_t x2;
qfp_t y1;
qfp_t y2;
qfp_t fs;
qfp_t bw;
qfp_t f0;
} NotchFilter;
int notch_filter_init(NotchFilter *filter, qfp_t f0, qfp_t fs, qfp_t bw);
qfp_t notch_filter_calc(NotchFilter *filter, qfp_t x);
int notch_filter_clr(NotchFilter *filter);
int notch_filter_fs_set(NotchFilter *filter, qfp_t fs);
int notch_filter_bw_set(NotchFilter *filter, qfp_t bw);
int notch_filter_f0_set(NotchFilter *filter, qfp_t f0);
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/logeexpluoqi/qfoc.git
git@gitee.com:logeexpluoqi/qfoc.git
logeexpluoqi
qfoc
qfoc
main

搜索帮助