NASA-AMMOS / aerie-ui

The client application for Aerie.

Home Page:https://nasa-ammos.github.io/aerie-docs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Phoenix: Import and Export SASF and SATF for Psyche

shaheerk94 opened this issue · comments

Checked for duplicates

Yes - I've already checked

Alternatives considered

Yes - and alternatives don't suffice

Related problems

No response

Describe the feature request

Psyche's primary source sequence formats are SASF and SATF. If we want to support Psyche sequencing, we'll need to be able to export sequences in both formats.

SASF and SATF export are functions that are already performed by the jpl-sequence library: https://github.jpl.nasa.gov/PSYCHE/jpl-sequence. See https://github.jpl.nasa.gov/PSYCHE/jpl-sequence/blob/master/jpl_sequence/satf.py, and the to_sasf_string and to_satf_string methods here: https://github.jpl.nasa.gov/PSYCHE/jpl-sequence/blob/master/jpl_sequence/sequence.py

Given that this library is not open-source, it may be a better approach to replicate the functions in Aerie rather than attempt to use the functions in this library. The functions are simple enough, so replicating them shouldn't be too much work.

Note that not all sequences can be exported as SASF or SATF. An SASF must only contains commands group by request, and an SATF must have no requests at all. See the following code snippet from jpl-sequence:

    def is_satf(self):
        """Returns true if this sequence is possible to express as an SATF. Only sequences that define the 'steps' list
        can be expressed as SATF."""
        if self.__steps is not None:
            return True
        else:
            return False

    def is_sasf(self):
        """Returns true if this sequence is possible to express as an SASF. Only sequences that define 'requests',
        'immediate_commands' or 'hardware commands' can be expressed as SASF."""

        has_requests = self.__requests is not None
        has_hwc = self.__hardware_commands is not None
        has_ic = self.__immediate_commands is not None

        if has_requests or has_hwc or has_ic:
            return True
        else:
            return False

Aerie will need to implement a similar check to ensure valid sasf/satf can be output.

I don't have ITAR-safe SASF and SATF examples, so I can't attach them here, but I can email to anyone that needs examples.