From 666585e60a52ac3334cda1389702151bcca11b60 Mon Sep 17 00:00:00 2001 From: zcj <2487150395@qq.com> Date: Sat, 21 Sep 2024 15:17:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=87=BD=E6=95=B0=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/algorithm/user_lib.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/modules/algorithm/user_lib.c b/modules/algorithm/user_lib.c index a3fc9b1..7338080 100644 --- a/modules/algorithm/user_lib.c +++ b/modules/algorithm/user_lib.c @@ -243,32 +243,3 @@ void first_order_filter_cali(first_order_filter_type_t *first_order_filter_type, first_order_filter_type->num[0] / (first_order_filter_type->num[0] + first_order_filter_type->frame_period) * first_order_filter_type->out + first_order_filter_type->frame_period / (first_order_filter_type->num[0] + first_order_filter_type->frame_period) * first_order_filter_type->input; } -/** - * @brief 一阶低通滤波初始化 - * @author RM - * @param[in] 一阶低通滤波结构体 - * @param[in] 间隔的时间,单位 s - * @param[in] 滤波参数 - * @retval 返回空 - */ -void first_order_filter_init(first_order_filter_type_t *first_order_filter_type, float frame_period, const float num[1]) -{ - first_order_filter_type->frame_period = frame_period; - first_order_filter_type->num[0] = num[0]; - first_order_filter_type->input = 0.0f; - first_order_filter_type->out = 0.0f; -} - -/** - * @brief 一阶低通滤波计算 - * @author RM - * @param[in] 一阶低通滤波结构体 - * @param[in] 间隔的时间,单位 s - * @retval 返回空 - */ -void first_order_filter_cali(first_order_filter_type_t *first_order_filter_type, float input) -{ - first_order_filter_type->input = input; - first_order_filter_type->out = - first_order_filter_type->num[0] / (first_order_filter_type->num[0] + first_order_filter_type->frame_period) * first_order_filter_type->out + first_order_filter_type->frame_period / (first_order_filter_type->num[0] + first_order_filter_type->frame_period) * first_order_filter_type->input; -}