Реализован уровень обработки данных драйвера IMU

This commit is contained in:
2026-04-14 17:36:05 +03:00
parent d59cf7cd55
commit 52922afeb1
10 changed files with 466 additions and 0 deletions

21
Source/MathEnv/Biquad.h Normal file
View File

@@ -0,0 +1,21 @@
#pragma once
#ifndef BIQUAD_H
#define BIQUAD_H
typedef struct
{
// Коэффициенты фильтра
float a1, a2;
float b0, b1, b2;
float x1, x2; // Предыдущие входы
float y1, y2; // Предыдущие выходы
} BiquadFilter;
void lpf2p_init(BiquadFilter *filter, float sample_freq, float cutoff_freq);
void notch_init(BiquadFilter *filter, float sample_freq, float center_freq, float bandwidth);
float biquad_apply(BiquadFilter* filter, float input);
#endif