1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Added flight IMU pitch, roll, yaw attitudes to blackbox log (#14020)

* added attitude fields desriptions

* the attitude (imu pitch, roll, yaw) added to blackbox log

* Global variable imuAttitudeQuaternion[3] is added to store current normalized imu attitude quaternion

* IMU attitude quaternion added to log instead of Euler angles

* blackbox logging of IMU attitude quaterions is replaced to GYRO group

* Revert "blackbox logging of IMU attitude quaterions is replaced to GYRO group"

This reverts commit a6020ed6b6.

* code refactoring: use quaternion as global variable instead of float[3] array

* USE_ACC apply for attitude log

* quaterion struct data type is changed to union quaternion_t

* resolved issue of Test module

* Code style improvement: removed empty codes row

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Added STATIC_ASSERT check of quaternion components sequence.

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Code style improvement

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* Resolved code issue

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* resolved wrong data type name

* STATIC_ASSERT error resolved

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>

* Improved assert condition

Co-authored-by: Petr Ledvina <ledvinap@gmail.com>

* added ATTITUDE condition for attitude blackbox log

* added blackbox_disable_attitude cli command

* Attitude position changed in blackbox disabling fields list

* resolved issue wrong quaternion log record condition

---------

Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
This commit is contained in:
Vladimir Demidov 2024-11-25 19:32:58 +03:00 committed by GitHub
parent 57d32ea1da
commit 63514c2b54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 51 additions and 15 deletions

View file

@ -857,6 +857,7 @@ const clivalue_t valueTable[] = {
{ "blackbox_disable_gyrounfilt",VAR_UINT32 | MASTER_VALUE | MODE_BITSET, .config.bitpos = FLIGHT_LOG_FIELD_SELECT_GYROUNFILT, PG_BLACKBOX_CONFIG, offsetof(blackboxConfig_t, fields_disabled_mask) },
#if defined(USE_ACC)
{ "blackbox_disable_acc", VAR_UINT32 | MASTER_VALUE | MODE_BITSET, .config.bitpos = FLIGHT_LOG_FIELD_SELECT_ACC, PG_BLACKBOX_CONFIG, offsetof(blackboxConfig_t, fields_disabled_mask) },
{ "blackbox_disable_attitude", VAR_UINT32 | MASTER_VALUE | MODE_BITSET, .config.bitpos = FLIGHT_LOG_FIELD_SELECT_ATTITUDE, PG_BLACKBOX_CONFIG, offsetof(blackboxConfig_t, fields_disabled_mask) },
#endif
{ "blackbox_disable_debug", VAR_UINT32 | MASTER_VALUE | MODE_BITSET, .config.bitpos = FLIGHT_LOG_FIELD_SELECT_DEBUG_LOG, PG_BLACKBOX_CONFIG, offsetof(blackboxConfig_t, fields_disabled_mask) },
{ "blackbox_disable_motors", VAR_UINT32 | MASTER_VALUE | MODE_BITSET, .config.bitpos = FLIGHT_LOG_FIELD_SELECT_MOTOR, PG_BLACKBOX_CONFIG, offsetof(blackboxConfig_t, fields_disabled_mask) },