Closed edwheelhouse-dstl closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.46%. Comparing base (
10e26e0
) to head (353d616
). Report is 39 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Calculation of the net orientation of a PlatformMountable on a Platform looks incorrect for 3D cases. It adds the platform's (MovementController's) orientation to the sensor's rotation_offset. Think of a sensor oriented to the left when its platform pitches up: addition would orient the sensor up too, when it should just roll. Instead, this PR rotates a vector aligned to the x-axis by the platform's orientation and the sensor's rotation_offset. This requires rotations in order: x, y, z. The current functions.init.build_rotation_matrix() does it the other way round (as required for other use cases) so a new build_rotation_matrix_xyz() has been added. Tests have been updated to match: rotation instead of addition requires orientation about x and z to be within +/-pi and in y to be within +/-pi/2.