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

FPrime GDS does not gracefully handle files downlinks of the same filename #2730

Open
rrieber opened this issue May 13, 2024 · 2 comments
Open
Labels
enhancement F´ GDS Issues pertaining to the F´ GDS

Comments

@rrieber
Copy link

rrieber commented May 13, 2024

Say an FPrime spacecraft downlinks filename.bin, then downlinks the same file a second time for redundancy. The current behavior of FPrime GDS would be to overwrite the first filename.bin with the second. If there were undetected corruption or other issues, those would be permanently imprinted on the final version of the file.

Let's explore another scenario. Say an FPrime spacecraft downlinks image.bin. Then deletes it, makes a new image.bin and downlinks that. FPrime GDS would do the same thing, it would overwrite the first version of image.bin with the second version if image.bin.

Note that both of these operational scenarios are used all the time. I'm not talking once per mission, I'm talking multiple times per day.

I think FPrime GDS should be modified to ensure received files all have unique names. I've seen them appended with the Earth Received Time (ERT) with great success. It's easy to remove with a simple RegEx and ensures uniqueness.

See also #2458 for a mildly-related issue.

@Joshua-Anderson
Copy link
Collaborator

The reason the GDS is currently designed this way is to properly handle partial file downlinks (i.e. Filedownlink.SendPartial). You can do multiple partial downlinks, appending/updating the existing file.

I wouldn't be overly worried about file corruption, since all file packets are checksummed, but if you're overwriting an existing file onboard the spacecraft, combining the files on the ground can definitely lead to confusion.

Since the fprime-gds is primarily for ground testing, I think designing around user friendlyness and appending ERT to the filename of downlinked files makes sense to me. Occasional users of SendPartial can manually append files together.

@thomas-bc What do you think about:

  • On disk, storing the downlinked file as ERT-filename
  • In the GDS file downlink GUI, showing just the filename, and users can click on the exact version of the file in the downlink list they want to download.

@thomas-bc
Copy link
Collaborator

That approach makes sense to me!

@thomas-bc thomas-bc added help wanted Easy First Issue An issue that should be straight forward to implement, and easily tested via CI. F´ GDS Issues pertaining to the F´ GDS and removed Easy First Issue An issue that should be straight forward to implement, and easily tested via CI. help wanted labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement F´ GDS Issues pertaining to the F´ GDS
Projects
None yet
Development

No branches or pull requests

3 participants