Skip to content

ADD: mtm tests#52

Open
Helenh22 wants to merge 3 commits into
virtual-sensorsfrom
mtm-tests
Open

ADD: mtm tests#52
Helenh22 wants to merge 3 commits into
virtual-sensorsfrom
mtm-tests

Conversation

@Helenh22

Copy link
Copy Markdown
Collaborator

Implemented the five test requirements for mtm from issue #24.

@Helenh22 Helenh22 changed the title Add files via upload Add mtm tests Jun 30, 2026
@Helenh22 Helenh22 changed the title Add mtm tests ADD: mtm tests Jun 30, 2026
Comment thread test_magnetometer.py Outdated
from hardware.sensors.sensors import VirtualMTM

def test_accurate_measurement_in_sensor_frame():
mtm = VirtualMTM()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread test_magnetometer.py Outdated
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)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@Helenh22 Helenh22 mentioned this pull request Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants