![]() |
ACwing FC firmware
STM32WB55: attitude IEKF, altitude Kalman filter, flight core, protocol v2
|
Note: fields of the packed structs are ALWAYS filled via memcpy from aligned local variables (see telemetry.h: unaligned VSTR -> HardFault). More...
Go to the source code of this file.
Macros | |
| #define | PUT(field, val) do { v = (val); memcpy(&p.field, &v, sizeof v); } while (0) |
Functions | |
| size_t | tlm_build_state (const est_t *e, uint8_t *frame, size_t cap) |
| size_t | tlm_build_init (const est_t *e, float fs_state_hz, uint8_t *frame, size_t cap) |
| size_t | tlm_build_replay (const est_t *e, uint8_t *frame, size_t cap) |
Note: fields of the packed structs are ALWAYS filled via memcpy from aligned local variables (see telemetry.h: unaligned VSTR -> HardFault).
Definition in file tlm_build.c.
| #define PUT | ( | field, | |
| val | |||
| ) | do { v = (val); memcpy(&p.field, &v, sizeof v); } while (0) |
| size_t tlm_build_state | ( | const est_t * | e, |
| uint8_t * | frame, | ||
| size_t | cap | ||
| ) |
Definition at line 10 of file tlm_build.c.
References tlm_state_t::acc, tlm_state_t::bias, cap, tlm_state_t::flags, tlm_state_t::gyro, iekf_get_quat(), tlm_state_t::mag, tlm_state_t::q, tlm_state_t::seq, tlm_state_t::t_us, tlm_encode(), and TLM_TYPE_STATE.
Referenced by on_state().
| size_t tlm_build_init | ( | const est_t * | e, |
| float | fs_state_hz, | ||
| uint8_t * | frame, | ||
| size_t | cap | ||
| ) |
Definition at line 26 of file tlm_build.c.
References iekf_config_t::acc_nis_gate, iekf_config_t::acc_tol, iekf_config_t::adaptive, iekf_seed_t::b0, tlm_init_t::b0, cap, iekf_config_t::decouple, iekf_config_t::dip_tol, iekf_config_t::estimate_bias, tlm_init_t::flags, iekf_seed_t::g_ref, tlm_init_t::g_ref, iekf_config_t::grace_updates, tlm_init_t::grace_updates, iekf_config_t::infl_decay, iekf_config_t::infl_max, iekf_config_t::lockout_p_bump, iekf_config_t::lockout_updates, tlm_init_t::lockout_updates, iekf_seed_t::m_ref, tlm_init_t::m_ref, iekf_config_t::mag_nis_gate, iekf_config_t::mag_tol, iekf_seed_t::nom_acc, iekf_seed_t::nom_mag, iekf_config_t::p0_att, iekf_config_t::p0_bias, iekf_config_t::persist_decay, iekf_config_t::persist_min, iekf_config_t::persist_ratio, PUT, tlm_init_t::q0, iekf_seed_t::R0, iekf_config_t::reset_jacobian, calib_result_t::seed, iekf_config_t::sigma_acc, iekf_config_t::sigma_bias, iekf_config_t::sigma_gyro, iekf_config_t::sigma_mag, so3_to_quat(), iekf_config_t::tangent_innov, iekf_config_t::tilt_comp_mag, tlm_encode(), TLM_I_ADAPTIVE, TLM_I_DECOUPLE, TLM_I_EST_BIAS, TLM_I_RESET_JAC, TLM_I_TANGENT, TLM_I_TILT_COMP, and TLM_TYPE_INIT.
Referenced by on_init().
| size_t tlm_build_replay | ( | const est_t * | e, |
| uint8_t * | frame, | ||
| size_t | cap | ||
| ) |
Definition at line 63 of file tlm_build.c.
References cap, iekf_get_quat(), IEKF_NX, n, tlm_encode(), TLM_REPLAY_MAX, and TLM_TYPE_REPLAY.
Referenced by on_state().