|
M5Unit-IMU 0.0.2 git rev:e5b00aa
|
Minimal fixed-size matrix arithmetic (framework independent) More...
#include <array>#include <cmath>#include <cstddef>Go to the source code of this file.
Classes | |
| class | m5::math::Matrix< R, C > |
| Fixed-size (R rows x C columns) float matrix, std::array backed (no heap allocation) More... | |
Namespaces | |
| namespace | m5 |
| Top level namespace of M5Stack. | |
Functions | |
| bool | m5::math::invert3x3 (const Matrix< 3, 3 > &m, Matrix< 3, 3 > &out) |
| Closed-form inverse of a 3x3 matrix. | |
| template<std::size_t N> | |
| bool | m5::math::cholesky_solve (const Matrix< N, N > &a, const Matrix< N, 1 > &b, Matrix< N, 1 > &x) |
| Solve A*x = b for a symmetric positive-definite A via Cholesky decomposition. | |
Variables | |
| constexpr float | m5::math::MATRIX_ZERO_EPSILON {1e-9f} |
| Magnitudes below this are treated as singular/non-positive-definite (matrix safety) | |
Minimal fixed-size matrix arithmetic (framework independent)
Header-only, heap-free (std::array backed) fixed-size matrix type, providing only what src/imu/filter/ekf.hpp needs: element access, addition, subtraction, scalar and matrix multiplication, transpose, and identity for square matrices. General NxN inversion is intentionally not provided; instead two narrow numerical primitives are exposed as free functions:
|
inline |
Solve A*x = b for a symmetric positive-definite A via Cholesky decomposition.
| a | Symmetric positive-definite matrix (only the lower triangle, row >= col, is read) | |
| b | Right-hand side column vector | |
| [out] | x | Solution; only written on success |
Closed-form inverse of a 3x3 matrix.
| m | Matrix to invert | |
| [out] | out | Inverse of m; only written on success |