![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
Control hook points, already called by the estimation task at the right rates. More...
#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | ctrl_rate_in_t |
| struct | ctrl_att_in_t |
Functions | |
| void | ctrl_init (void) |
| void | ctrl_rate_step (const ctrl_rate_in_t *in) |
| 960 Hz | |
| void | ctrl_attitude_step (const ctrl_att_in_t *in) |
| 240 Hz | |
Control hook points, already called by the estimation task at the right rates.
In phase 1 they are empty ("weak" definitions in control_hooks.c): to add control, just redefine them, without touching the task or the estimator.
Order within a 960 Hz step (see app_main.c): IEKF propagation -> ctrl_rate_step() -> [every 4 steps] acc update -> ctrl_attitude_step() -> [when available] mag update ctrl_rate_step() runs right after the propagation, before the corrections, to minimise the gyro -> motors latency.
Definition in file control_hooks.h.
| void ctrl_init | ( | void | ) |
Definition at line 7 of file control_hooks.c.
Referenced by ImuTask().
| void ctrl_rate_step | ( | const ctrl_rate_in_t * | in | ) |
960 Hz
Definition at line 8 of file control_hooks.c.
Referenced by on_step().
| void ctrl_attitude_step | ( | const ctrl_att_in_t * | in | ) |
240 Hz
Definition at line 9 of file control_hooks.c.
Referenced by on_acc_window().