Add capability for computed kadi states and use for attitude and sun-related states #350
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.
Description
The prior implementation of a number of computed quantities was too tightly coupled to the
ManeuverTransition
and it was generally brittle and not easy to expand.This PR recognizes that some state values like
ra
,dec
,roll
can be computed from other states (q1..4
).The implementation of this is straightforward, with the exception of dealing with the transition every 10ks in NPM to inject a state boundary and force updates to all the sun-angle values.
TODO: There is some intricacy in the code here that still needs better comments and possible cleaning.
This update changes the way that maneuver states are computed. Previously the attitude quaternion corresponded to the start of each state. This is not ideal and there was a comment suggesting that it be changed. Now the quaternion corresponds to the attitude at the midpoint of the state.
Previously there was some hackery to get the pitch, off_nom_roll to match more closely the midpoint value by averaging the start/stop values. Now the values correspond to correct mid-point values for all state bins. This is possible because the values are all computed post-facto when the state start/stop times are known.
Interface impacts
Attitude and sun-related state values will change slightly and for the better.
Testing
Unit tests
Independent check of unit tests by [REVIEWER NAME]
Functional tests
No functional testing.