Skip to content
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

Major refactor/improvement in command interrupt handling #248

Merged
merged 16 commits into from
Sep 1, 2022

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Aug 24, 2022

Description

This implements an idea that has been around for a long time to handle command interrupt processing in a more direct -way that more closely matches the OBC behavior. In particular:

  • Notice END SCS commands (CODISASX) and cut all running commands in that SCS slot after the command time.
  • Implement RLTT as END SCS for slots 128 to 133.
  • Put appropriate END SCS commands in the Command Event definitions.

A key implementation detail is the definition of "running commands". The basic outline of how this works is as follows.

  • Make a list of CommandTable objects corresponding to each approved command load
  • Append to that list a CommandTable of commands for each Command Event.
  • Sort the list of CommandTables (called cmds_list) by the date of the first command in each table.
  • Iterate over cmds_list (for cmds in cmds_list:)
    • Find any RLTT or END SCS commands in cmds and collect them into a dict that captures the SCS numbers and end dates.
    • Iterate over all previous cmds in the cmds_list and cut commands accordingly.
  • Stack the cmds_list tables and then sort into the standard backstop order.

The key point to this change is that it simplifies the code logic and removes ad-hoc processing rules.

To do:

  • Confirm that loads.csv is no longer used as an input to processing.
  • Consider further cleanup in code and maybe remove the loads.csv and loads.dat output.
  • Check command history near 2022:223 BSH. Dither stays enabled?

Interface impacts

New END SCS and LOAD_EVENT commands are stored in the archive. No changes to actual spacecraft commands.

Testing

Unit tests

  • Mac with current "flight" archive ($SKA/data/kadi/cmds2.*)
  • Mac with new archive created using this code.

Independent check of unit tests by Jean

  • Linux

Functional tests

@taldcroft taldcroft mentioned this pull request Aug 28, 2022
18 tasks
@taldcroft taldcroft mentioned this pull request Aug 31, 2022
2 tasks
@taldcroft taldcroft merged commit 0c52353 into master Sep 1, 2022
@taldcroft taldcroft deleted the load-interrupts-better branch September 1, 2022 09:38
@taldcroft taldcroft mentioned this pull request Sep 26, 2022
5 tasks
@javierggt javierggt mentioned this pull request Oct 5, 2022
@javierggt javierggt mentioned this pull request Oct 11, 2022
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