36#ifndef COMPLEMENTARY_FILTER_H
37#define COMPLEMENTARY_FILTER_H
Butterworth4LowPass y_lp_filter
struct SecondOrderLowPass y_lp_filter
struct SecondOrderLowPass x_lp_filter
static float get_second_order_complementary(const struct SecondOrderComplementary *filter)
Get current value of the second order complementary filter.
static float reset_second_order_complementary(struct SecondOrderComplementary *filter, float value)
Reset the second order complementary filter to a specific value.
static void init_second_order_complementary(struct SecondOrderComplementary *filter, float cut_off, float Q, float sample_time, float value)
Initialize the second order complementary filter.
static float update_butterworth_2_complementary(Butterworth2Complementary *filter, float value_x, float value_y)
Update the Butterworth 2nd order low-pass complementary filter with new input values.
static float reset_first_order_complementary(struct FirstOrderComplementary *filter, float value)
Reset the first order complementary filter to a specific value.
static float update_butterworth_4_complementary(Butterworth4Complementary *filter, float value_x, float value_y)
Update the Butterworth 4th order low-pass complementary filter with new input values.
static void reset_butterworth_4_complementary(Butterworth4Complementary *filter, float value)
Reset the Butterworth 4th order complementary filter to a specific value.
static void reset_butterworth_2_complementary(Butterworth2Complementary *filter, float value)
Reset the Butterworth 2nd order complementary filter to a specific value.
static float update_first_order_complementary(struct FirstOrderComplementary *filter, float value_x, float value_y)
Update the first order complementary filter with new input values.
static void init_first_order_complementary(struct FirstOrderComplementary *filter, float cut_off, float sample_time, float value)
Initialize the first order complementary filter.
static float get_butterworth_4_complementary(const Butterworth4Complementary *filter)
Get current value of the Butterworth 4th order low-pass complementary filter.
static float get_butterworth_2_complementary(const Butterworth2Complementary *filter)
Get current value of the Butterworth 2nd order low-pass complementary filter.
Butterworth4LowPass x_lp_filter
static float get_first_order_complementary(const struct FirstOrderComplementary *filter)
Get current value of the first order complementary filter.
struct FirstOrderLowPass y_lp_filter
struct FirstOrderLowPass x_lp_filter
static void init_butterworth_2_complementary(Butterworth2Complementary *filter, float cut_off, float sample_time, float value)
Initialize the Butterworth 2nd order low-pass complementary filter.
static void init_butterworth_4_complementary(Butterworth4Complementary *filter, float cut_off, float sample_time, float value)
Initialize the Butterworth 4th order low-pass complementary filter.
static float update_second_order_complementary(struct SecondOrderComplementary *filter, float value_x, float value_y)
Update the second order complementary filter with new input values.
4th order Butterworth complementary filter structure.
First order complementary filter structure.
Second order complementary filter structure.
Simple first order low pass filter with bilinear transform.
static float get_second_order_low_pass(const struct SecondOrderLowPass *filter)
Get current value of the second order low pass filter.
static void reset_butterworth_4_low_pass(Butterworth4LowPass *filter, const float value)
Reset a Butterworth low-pass filter to a specific value.
static float reset_first_order_low_pass(struct FirstOrderLowPass *filter, const float value)
Reset the first order low-pass filter to a specific value.
static float get_butterworth_4_low_pass(const Butterworth4LowPass *filter)
Get current value of the fourth order Butterworth low pass filter.
static void init_first_order_low_pass(struct FirstOrderLowPass *filter, float tau, const float sample_time, float value)
Init first order low pass filter.
static float update_first_order_low_pass(struct FirstOrderLowPass *filter, const float value)
Update first order low pass filter state with a new value.
static float update_second_order_low_pass(struct SecondOrderLowPass *filter, const float value)
Update second order low pass filter state with a new value.
static float reset_second_order_low_pass(struct SecondOrderLowPass *filter, const float value)
Reset the second order low-pass filter to a specific value.
static float get_first_order_low_pass(const struct FirstOrderLowPass *filter)
Get current value of the first order low pass filter.
static float update_butterworth_4_low_pass(Butterworth4LowPass *filter, const float value)
Update fourth order Butterworth low pass filter state with a new value.
struct SecondOrderLowPass lp1
static void init_butterworth_4_low_pass(Butterworth4LowPass *filter, const float tau, const float sample_time, const float value)
Init a fourth order Butterworth filter.
static void init_second_order_low_pass(struct SecondOrderLowPass *filter, const float tau, const float Q, const float sample_time, float value)
Init second order low pass filter.
Fourth order Butterworth low pass filter.
First order low pass filter structure.
Second order low pass filter structure.