dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
388 stars 128 forks source link

Rotation matrix fix #762

Closed edwheelhouse-dstl closed 1 year ago

edwheelhouse-dstl commented 1 year ago

The rotation matrix is currently formed backwards as rotz(theta_z) @ roty(theta_y) @ rotx(theta_x). It needs to be in reverse order: x, y, z. This is because matrix @ operations are carried out from right to left and we need to rotate about z first, because only then can we know which way to rotate about y. This branch implements that and adds some test cases to prove it (some of which fail with the previous code).

This does lead to a problem with Bearing, as discussed in Issue #749.

erogers-dstl commented 1 year ago

Note that the test failures on this PR will be fixed (I think) if #763 is applied first