Port AxialKalmanFilter from libDirectional to PyRecEst#1701
Port AxialKalmanFilter from libDirectional to PyRecEst#1701
Conversation
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/94d66c48-2687-4add-b678-6261ee4dbb75 Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
Test Results 3 files 3 suites 31m 55s ⏱️ Results for commit e48046c. |
|
@copilot Iincrease tolerance of the test case so that it also succeeds for the jax backend =========================== short test summary info ============================ Mismatched elements: 4 / 4 (100%) Mismatched elements: 2 / 2 (100%) |
Agent-Logs-Url: https://github.com/FlorianPfaff/PyRecEst/sessions/b969cf25-7761-43d6-b4da-5b31e31310bc Co-authored-by: FlorianPfaff <6773539+FlorianPfaff@users.noreply.github.com>
Head branch was pushed to by a user without write access
Fixed in 1361b0f. Changed the three |

Ports the MATLAB
AxialKalmanFilter— a Kalman filter for antipodally symmetric distributions on the unit hypersphere — to Python, supporting both unit complex numbers (2D) and quaternions (4D).Changes
pyrecest/filters/axial_kalman_filter.py— newAxialKalmanFilter(AbstractAxialFilter):dimproperty returnsfilter_state.dim - 1(manifold dim) so the inherited_set_composition_operatorselects complex vs. quaternion multiplication correctlyfilter_statesetter validates unit-norm mean and 2D/4D shape, then re-arms the composition operatorpredict_identity(gauss_w):mu_new = mu ⊕ gauss_w.mu,C_new = C + C_wupdate_identity(gauss_v, z): conjugates noise mean out of measurement, mirrorszfor antipodal consistency, runs standard Kalman update (K = C·(C+V)⁻¹), re-normalises mean to unit vectorpyrecest/filters/__init__.py— exportsAxialKalmanFilterpyrecest/tests/filters/test_axial_kalman_filter.py— 12 tests (2D + 4D) mirroringAxialKalmanFilterTest.m: state round-trip, predict with identity/non-identity noise, update at mode, antipodal symmetry, and unit-norm enforcement after update