Skip to content

Correct usage of FED source IDs#33

Open
A-A-Abdelhamid wants to merge 1 commit into
unpackers_16_0_0_pre1from
Alaa_Converter
Open

Correct usage of FED source IDs#33
A-A-Abdelhamid wants to merge 1 commit into
unpackers_16_0_0_pre1from
Alaa_Converter

Conversation

@A-A-Abdelhamid

Copy link
Copy Markdown
Collaborator

The outer DTH Orbit Header has a source ID, and the inner SLinkRocket fragment header also has a source ID. The code did assumed that these two IDs were the same and used the Orbit Header source ID as if it were the SLinkRocket ID.

For FEDRawDataCollection::FEDData(...), we should use the inner SLinkRocket source ID, not the outer DTH Orbit Header source ID. This PR fixes this issue.

Sara confirmed that the output of the updated code now agrees with Srecko's for the C-Rack data.

Plot by Sara Fiorendi:

image

@tomalin tomalin requested a review from sarafiorendi June 17, 2026 20:14

@sarafiorendi sarafiorendi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the changes shown by the diff are formatting ones.
The important one (which sourceID to use) seems fine to me, however I'd suggest that you make use of the SLinkHeaders class instead of re-defining some of the new functions that were introduced (unless there is something that I'm missing that requires you to define those yourself).

constexpr size_t kSLinkRocketEOEOffsetFromEnd = 1;

constexpr unsigned char kSLinkRocketBOEMarker = 0x55;
constexpr unsigned char kSLinkRocketEOEMarker = 0xaa;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are defined in the SLinkRocketHeaders class

constexpr unsigned char kSLinkRocketBOEMarker = 0x55;
constexpr unsigned char kSLinkRocketEOEMarker = 0xaa;

uint32_t readSLinkRocketSourceId(const std::vector<char>& payloadBytes) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of this function, why not using the one from the SLinkRocketHeaders class

readLittleEndian(payloadBytes.data() + kSLinkRocketSourceIdOffset, sizeof(uint32_t)));
}

void verifySLinkRocketTrailerMarker(const std::vector<char>& payloadBytes) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, you could use this one

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