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

Increase number css measurements csswls #468

Merged

Conversation

patkenneally
Copy link
Contributor

@patkenneally patkenneally commented Oct 25, 2023

Description

The #MAX_N_CSS_MEAS define is set to 8. The cssWls module calls a memset ☹️ on line 90 in computeWlsResiduals(), which computes the size of memory to set to 0x0 from the number of coarse sun sensors. The residuals variable which is being set has a size of 8 x double. If one has more than 8 coarse sun sensors then the memset will stomp more than 8 x double amount of memory. Many spacecraft employ more than 8 CSS and therefore the filter would expect to compute more than 8 measurement residuals. This PR changes the max number of measurements to be the same value as the max number of CSS.

Verification

CI runs successfully.

Documentation

None needed, none invalidated.

Future work

NA

@schaubh
Copy link
Contributor

schaubh commented Oct 25, 2023

Good catch. But, shouldn't there be a warning in Reset_cssWlsEst(), when we read in the CSS config message, if the nCSS variable is larger than MAX_NUM_CSS_SENSORS? Right now we are failing silently? I recommend we ensure nCSS is less than MAX_NUM_CSS_SENSORS or we use the BSK_ERROR statement to warn the user?

Copy link
Contributor

@schaubh schaubh left a comment

Choose a reason for hiding this comment

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

I would add a check in the module reset function to ensure nCSS is not larger than the maximum allowable number of CSS?

docs/source/Support/bskReleaseNotes.rst Outdated Show resolved Hide resolved
@patkenneally patkenneally force-pushed the bsk-467--increase-number-css-measurements-csswls branch 3 times, most recently from 7b56f98 to 6daf7fa Compare October 26, 2023 15:53
@patkenneally patkenneally force-pushed the bsk-467--increase-number-css-measurements-csswls branch from 6daf7fa to 7c23348 Compare October 26, 2023 16:06
@patkenneally patkenneally merged commit db2bd12 into develop Oct 26, 2023
2 checks passed
@patkenneally patkenneally deleted the bsk-467--increase-number-css-measurements-csswls branch October 26, 2023 18:41
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.

3 participants