-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add up NMM time before NPNT states to calculate maneuver equiv angle #432
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks generally good!
I wonder if we want to add the effective maneuver angle to the starcheck output, or maybe only if it is different from the actual by more than a couple degrees? [EDIT, already done! But maybe with a tighter tolerance.]
There is also the opportunity to cross-check the angle in the proseco pickle vs the effective man angle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good pending the update to the high-IR zone text. Thanks!
The plan is to squash and merge this when I've updated the functional test outputs. I should also add an issue to skare3_tools referencing this PR as an example of a squash and merge for tracking. |
# To satisfy those goals, use the derived-from-NMM-time angle if it is more than 5 degrees | ||
# different from the actual maneuver angle. Otherwise use the actual maneuver angle. | ||
# This also lines up with what is printed in the starcheck maneuver output. | ||
my $man_angle = (abs($targ_cmd->{man_angle_calc} - $targ_cmd->{angle}) > 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@taldcroft Does this work for you? It is a substantive update since your approval. I'm rerunning functional review with it in place. To be fully conservative I suppose the other option would be to use the angle-from-nmm-time only if 5 or more degrees greater than the maneuver angle (instead of just different).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the angle-from-nmm-time is more than 5 degrees SMALLER than the maneuver angle, that would indicate a bug in the code somewhere. In that case there should be a critical warning and the review should use the maneuver angle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice comment BTW!!
Also adds processing warning if weird continuity initial pcad_mode state.
I think you were more than done with this @taldcroft but I re-requested review just because there were some substantive changes. |
# To satisfy those goals, use the derived-from-NMM-time angle if it is more than 5 degrees | ||
# different from the actual maneuver angle. Otherwise use the actual maneuver angle. | ||
# This also lines up with what is printed in the starcheck maneuver output. | ||
my $man_angle = (abs($targ_cmd->{man_angle_calc} - $targ_cmd->{angle}) > 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the angle-from-nmm-time is more than 5 degrees SMALLER than the maneuver angle, that would indicate a bug in the code somewhere. In that case there should be a critical warning and the review should use the maneuver angle.
# To satisfy those goals, use the derived-from-NMM-time angle if it is more than 5 degrees | ||
# different from the actual maneuver angle. Otherwise use the actual maneuver angle. | ||
# This also lines up with what is printed in the starcheck maneuver output. | ||
my $man_angle = (abs($targ_cmd->{man_angle_calc} - $targ_cmd->{angle}) > 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice comment BTW!!
@@ -3038,7 +3064,7 @@ sub proseco_args { | |||
0 + $targ_cmd->{q3}, | |||
0 + $targ_cmd->{q4} | |||
], | |||
man_angle => 0 + $targ_cmd->{angle}, | |||
man_angle => 0 + $man_angle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a silly language with the 0 + something
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of this could probably go away -- I played some games here at one point to get floats over to Python but we could probably just be explicit on the Python side especially now that Inline::Python is gone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But thinking some more, the existing warning that there is a > 5 degree difference should give enough warning to the reviewer and we will know to treat the SMALLER case as critical. So I'm approving now with the existing testing.
Right now, this PR uses the angle-from-nmm-time for acq probability if more than 5 degrees different from maneuver angle and prints it in the maneuver info above the catalog but there's no warning. Sounds like there needs to be a warning of some kind if angle-from-nmm-time is smaller than maneuver angle. And it sounds like in that case the acq probability should be calculated with the larger angle. |
I was hoping to avoid another revision that you're right. |
I'm taking your "that" as a "but" in the previous comment and I put in some tiny changes to add a critical warning for the unexpected case and to change the "use the angle-from-nmm" code to only use that angle for probabilities if more than 5 degrees greater. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest changes look good.
Great! I note I redid the unit and functional tests at 47a15af . |
Description
For each NPNT state, add up the time in NMM before that state to calculate a maneuver angle "equivalent". This is used in the proseco reconstructed acquisition catalog for those checks and it is printed if it differs by more than 5 degrees from the maneuver angle of the actual maneuver to the NPNT state.
We retired this idea, but with the segmented maneuvers, I find the calculated maneuver angle output reassuring and this code seems overall benign.
This code also moves the ir_zone code into a new file (not 100% sold on the name of that file) with this new angle calculation code.
And while in there, updated the report output for the high ir zone checker to print what it is doing in minutes.
Fixes #435
Interface impacts
Testing
Unit tests
Independent check of unit tests by @taldcroft
Functional tests
Added some unit tests of the parts of the new code.
Regression test weeks in
https://icxc.cfa.harvard.edu/aspect/test_review_outputs/starcheck/starcheck-pr432/
I ran all weeks back to 2020:001 to look for anomalous behavior in the diffs, but then reduced the set to the recent two-week load and schedules that show new critical warnings with this PR. The output in there is the product of this script, where the PR code (from sandbox_starcheck) was run from a ska3-masters on fido.
Review of the new CRITICAL warnings shows that they are all due to time newly "counted" in NMM that was not counted at the time of review:
Obsid 44657 has a non-zero (manual) MANSTART=000:00:10:50.600 .
https://icxc.cfa.harvard.edu/aspect/test_review_outputs/starcheck/starcheck-pr432/APR0323a_test.html#obsid44657
Obsid 25816 has a non-zero MANSTART=000:00:12:05.706
https://icxc.cfa.harvard.edu/aspect/test_review_outputs/starcheck/starcheck-pr432/MAY2322a_test.html#obsid25816
Obsid 44464 has a non-zero MANSTART=000:00:07:18.574
https://icxc.cfa.harvard.edu/aspect/test_review_outputs/starcheck/starcheck-pr432/MAY2923a_test.html#obsid44464
These functional tests were run at 47a15af