|
M5Unit-IMU 0.0.2 git rev:e5b00aa
|
Chip-frame-to-body-frame axis remap: a permutation plus a per-output-axis sign flip. More...
#include <axis_order.hpp>
Public Member Functions | |
| void | apply (float(&v)[3]) const |
| Apply this permutation and sign flip to a physical-unit XYZ triplet, in place. | |
Public Attributes | |
| AxisPermutation | permutation {AxisPermutation::XYZ} |
| Axis permutation. | |
| bool | invert_x {false} |
| Negate output X after permutation. | |
| bool | invert_y {false} |
| Negate output Y after permutation. | |
| bool | invert_z {false} |
| Negate output Z after permutation. | |
Chip-frame-to-body-frame axis remap: a permutation plus a per-output-axis sign flip.
Applied by AhrsController::update() to every accel/gyro/mag sample from a given IMUDataSource, right after raw-to-physical conversion and before auto-calibration offsets are subtracted (see AhrsController::writeAxisOrder()/readAxisOrder()). Mirrors M5Unified's internal_axisorder_t, operating directly on physical-unit float triplets.
The default (AxisPermutation::XYZ, no inversion) is the identity transform, i.e. exactly what a source already reports in its own chip frame.
|
inline |
Apply this permutation and sign flip to a physical-unit XYZ triplet, in place.
| v[in,out] | 3-element array (accel, gyro, or mag), overwritten with the remapped values |