|
M5Unit-IMU 0.0.2 git rev:e5b00aa
|
Per-source axis permutation and inversion applied to raw-to-physical IMU samples. More...
#include <cstdint>Go to the source code of this file.
Classes | |
| struct | m5::imu::AxisOrder |
| Chip-frame-to-body-frame axis remap: a permutation plus a per-output-axis sign flip. More... | |
Namespaces | |
| namespace | m5 |
| Top level namespace of M5Stack. | |
Enumerations | |
| enum class | m5::imu::AxisPermutation : uint8_t { XYZ , XZY , YXZ , YZX , ZXY , ZYX } |
| Which raw axis feeds each output slot, read left-to-right. More... | |
Functions | |
| const uint8_t * | m5::imu::axis_permutation_indices (const AxisPermutation p) |
| Source-axis index feeding each output slot, for a given permutation. | |
| AxisPermutation | m5::imu::permutation_from_indices (const uint8_t(&p)[3]) |
| Map a source-axis index triplet back to an AxisPermutation. | |
| AxisOrder | m5::imu::compose (const AxisOrder &first, const AxisOrder &second) |
| Compose two axis orders into one. | |
Per-source axis permutation and inversion applied to raw-to-physical IMU samples.
|
strong |
|
inline |
Source-axis index feeding each output slot, for a given permutation.
| p | Permutation |
Compose two axis orders into one.
| first | Axis order applied first |
| second | Axis order applied second |
AxisOrder is a signed axis permutation, so the composition is itself an AxisOrder (no information is lost). Used by AhrsController to fold a global user axis order onto each source's fixed board correction without applying two transforms per sample.
|
inline |
Map a source-axis index triplet back to an AxisPermutation.
| p | 3-element array holding a permutation of {0,1,2} (out[i] = src[p[i]]) |