IZAR Flight Controller 1.0.0
IZAR Flight Controller running with an ESP32.
|
Functions | |
esp_err_t | kalman1d_init (kalman1d_t *kf, float init_pressure, float process_noise, float measurement_noise) |
Initialize a 1D Kalman filter instance. | |
float | kalman1d_update (kalman1d_t *kf, float z) |
Perform a single Kalman filter update with a new measurement. |
esp_err_t kalman1d_init | ( | kalman1d_t * | kf, |
float | init_pressure, | ||
float | process_noise, | ||
float | measurement_noise ) |
Initialize a 1D Kalman filter instance.
Sets the initial state and noise parameters for the filter.
Larger Q values let the filter adapt faster to changes. Larger R values make the filter trust measurements less.
kf | Pointer to the filter instance to initialize. |
init_pressure | Initial estimate for the state. |
process_noise | Process noise covariance (Q). |
measurement_noise | Measurement noise covariance (R). |
< esp_err_t value indicating success (no error)
float kalman1d_update | ( | kalman1d_t * | kf, |
float | z ) |
Perform a single Kalman filter update with a new measurement.
Applies the predict and update steps of the Kalman filter:
kf | Pointer to the filter instance. |
z | New measurement. |