ADD: mtm tests#52
Open
Helenh22 wants to merge 3 commits into
Open
Conversation
wlodaralex
requested changes
Jul 9, 2026
| from hardware.sensors.sensors import VirtualMTM | ||
|
|
||
| def test_accurate_measurement_in_sensor_frame(): | ||
| mtm = VirtualMTM() |
Collaborator
There was a problem hiding this comment.
I would use a fixture for this so that you only have to define it once for all tests. Also preferably you'd load the VirtualMTM class using the config file, which gives us coverage of the data ingestion and reduces our likelihood to make a mistake.
| expected_field = true_field | ||
|
|
||
| # used assert_array_almost_equal in case of floating point precision issues | ||
| np.testing.assert_array_almost_equal(measured_field, expected_field, decimal=5) |
Collaborator
There was a problem hiding this comment.
I'd like to see this done for a couple more rotations too just so we can make sure that transformation is implemented correctly. Even just principal axis rotations that would flip the signs would be fine.
Collaborator
There was a problem hiding this comment.
Come to think of it, I'm not seeing the satellite attitude/sensor orientation being specified anywhere. That should definitely be factored in at the measurement call.
Added fixture for VirtualMTM and improve test structure and considered sensor orientation in the measurement test.
Merged
Updated mtm test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implemented the five test requirements for mtm from issue #24.