IZAR Flight Controller 1.0.0
IZAR Flight Controller running with an ESP32.
kalman_filter.h
Go to the documentation of this file.
1#ifndef KALMAN_FILTER_H
2#define KALMAN_FILTER_H
3
4#include <esp_err.h>
5
14typedef struct {
15 float x;
16 float P;
17 float Q;
18 float R;
20
35esp_err_t kalman1d_init(kalman1d_t *kf, float init_pressure,
36 float process_noise, float measurement_noise);
37
51float kalman1d_update(kalman1d_t *kf, float z);
52
53#endif // KALMAN_FILTER_H
esp_err_t kalman1d_init(kalman1d_t *kf, float init_pressure, float process_noise, float measurement_noise)
Initialize a 1D Kalman filter instance.
Definition kalman_filter.c:5
float kalman1d_update(kalman1d_t *kf, float z)
Perform a single Kalman filter update with a new measurement.
Definition kalman_filter.c:14
One-dimensional Kalman filter state.
Definition kalman_filter.h:14
float P
Estimate uncertainty (error covariance).
Definition kalman_filter.h:16
float x
State estimate (e.g., pressure).
Definition kalman_filter.h:15
float R
Measurement noise covariance.
Definition kalman_filter.h:18
float Q
Process noise covariance.
Definition kalman_filter.h:17