ADD: STR unit tests - #70
Open
Mr-Msf wants to merge 7 commits into
Open
Conversation
wlodaralex
requested changes
Aug 4, 2026
|
|
||
| STR_CFG = Path("../hardware/sensors/icd/str/sagitta.json") | ||
|
|
||
| RAD_SUN = 695700000.0 |
Collaborator
There was a problem hiding this comment.
Would be good to centralize these constants somewhere because they can end up being used in multiple places and we might end up with conflicts (e.g. Earth equatorial radius vs polar radius).
| assert str.rate_hz == pytest.approx(10.0) | ||
| assert str.cov_rad2.shape == (3, 3) | ||
|
|
||
| def get_cone_edge_angles(str, q, body_start, body_end, body_name, step_num): |
Collaborator
There was a problem hiding this comment.
It's really not clear to me what this function is doing. Please add comments (including docstrings, preferably) so that it's easier to follow.
Collaborator
Author
There was a problem hiding this comment.
You might have been looking at the first version of test_STR.py I committed, as recent versions have docstrings for all functions.
Collaborator
Author
|
This PR should be ready for re-review (note that functionality is dependent on PR #55). When merged, ensure that only test_STR.py is modified by this PR. |
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.
This PR will add unit tests for the STR class to the virtual-sensors branch. Note that the tests' functionality is dependent on the CHG: Adding sensor eclipse and body detection PR being closed.