Реализован уровень обработки данных драйвера IMU
This commit is contained in:
21
Source/MathEnv/Biquad.h
Normal file
21
Source/MathEnv/Biquad.h
Normal 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
|
||||
Reference in New Issue
Block a user