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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/Support/bskReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Version |release|
prior versions of Xcode.
- Fixed a bug in the conanfile where the ``stderr`` output from a ``subprocess.Popen`` call was being interpreted as an
error. Rather, the process return code (0 for success, and anything else for failure) indicates the success.
- The ``MAX_N_CSS_MEAS`` define is increased to 32 matching the maximum number of coarse sun sensors.


Version 2.2.0 (June 28, 2023)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define SKF_N_STATES_SWITCH 6
#define EKF_N_STATES_SWITCH 5
#define SKF_N_STATES_HALF 3
#define MAX_N_CSS_MEAS 8
#define MAX_N_CSS_MEAS 32

/*! @brief structure for filter-states output for the unscented kalman filter
implementation of the sunline state estimator*/
Expand Down
4 changes: 4 additions & 0 deletions src/fswAlgorithms/attDetermination/CSSEst/cssWlsEst.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ void Reset_cssWlsEst(CSSWLSConfig *configData, uint64_t callTime, int64_t module
}

configData->cssConfigInBuffer = CSSConfigMsg_C_read(&configData->cssConfigInMsg);
if (configData->cssConfigInBuffer.nCSS > MAX_N_CSS_MEAS) {
_bskLog(configData->bskLogger, BSK_ERROR, "cssWIsEst.cssDataInMsg.nCSS must not be greater than "
"MAX_N_CSS_MEAS value.");
}

configData->priorSignalAvailable = 0;
v3SetZero(configData->dOld);
Expand Down
6 changes: 5 additions & 1 deletion src/fswAlgorithms/attDetermination/okeefeEKF/okeefeEKF.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ void Reset_okeefeEKF(okeefeEKFConfig *configData, uint64_t callTime,

/*! - Read in coarse sun sensor configuration information.*/
cssConfigInBuffer = CSSConfigMsg_C_read(&configData->cssConfigInMsg);

if (cssConfigInBuffer.nCSS > MAX_N_CSS_MEAS) {
_bskLog(configData->bskLogger, BSK_ERROR, "okeefeEKF.cssConfigInMsg.nCSS must not be greater than "
"MAX_N_CSS_MEAS value.");
}

/*! - For each coarse sun sensor, convert the configuration data over from structure to body*/
for(uint32_t i=0; i<cssConfigInBuffer.nCSS; i++)
{
Expand Down
4 changes: 4 additions & 0 deletions src/fswAlgorithms/attDetermination/sunlineEKF/sunlineEKF.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ void Reset_sunlineEKF(sunlineEKFConfig *configData, uint64_t callTime,

/*! - Read in mass properties and coarse sun sensor configuration information.*/
cssConfigInBuffer = CSSConfigMsg_C_read(&configData->cssConfigInMsg);
if (cssConfigInBuffer.nCSS > MAX_N_CSS_MEAS) {
_bskLog(configData->bskLogger, BSK_ERROR, "sunlineEKF.cssConfigInMsg.nCSS must not be greater than "
"MAX_N_CSS_MEAS value.");
}

/*! - For each coarse sun sensor, convert the configuration data over from structure to body*/
for(uint32_t i=0; i<cssConfigInBuffer.nCSS; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ void Reset_sunlineSEKF(sunlineSEKFConfig *configData, uint64_t callTime,

/*! - Read coarse sun sensor configuration information.*/
cssConfigInBuffer = CSSConfigMsg_C_read(&configData->cssConfigInMsg);
if (cssConfigInBuffer.nCSS > MAX_N_CSS_MEAS) {
_bskLog(configData->bskLogger, BSK_ERROR, "sunlineSEKF.cssConfigInMsg.nCSS must not be greater than "
"MAX_N_CSS_MEAS value.");
}

/*! - For each coarse sun sensor, convert the configuration data over from structure to body*/
for(uint32_t i=0; i<cssConfigInBuffer.nCSS; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ void Reset_sunlineSuKF(SunlineSuKFConfig *configData, uint64_t callTime,

/*! - Read in mass properties and coarse sun sensor configuration information.*/
cssConfigInBuffer = CSSConfigMsg_C_read(&configData->cssConfigInMsg);

if (cssConfigInBuffer.nCSS > MAX_N_CSS_MEAS) {
_bskLog(configData->bskLogger, BSK_ERROR, "sunlineSuKF.cssConfigInMsg.nCSS must not be greater than "
"MAX_N_CSS_MEAS value.");
}

/*! - For each coarse sun sensor, convert the configuration data over from structure to body*/
for(uint32_t i=0; i<cssConfigInBuffer.nCSS; i++)
{
Expand Down
4 changes: 4 additions & 0 deletions src/fswAlgorithms/attDetermination/sunlineUKF/sunlineUKF.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ void Reset_sunlineUKF(SunlineUKFConfig *configData, uint64_t callTime,

/*! - Read in mass properties and coarse sun sensor configuration information.*/
cssConfigInBuffer = CSSConfigMsg_C_read(&configData->cssConfigInMsg);
if (cssConfigInBuffer.nCSS > MAX_N_CSS_MEAS) {
_bskLog(configData->bskLogger, BSK_ERROR, "sunlineUKF.cssConfigInMsg.nCSS must not be greater than "
"MAX_N_CSS_MEAS value.");
}

/*! - For each coarse sun sensor, convert the configuration data over from structure to body*/
for(uint32_t i=0; i<cssConfigInBuffer.nCSS; i = i+1)
Expand Down
Loading