diff --git a/CHANGELOG.md b/CHANGELOG.md index 777f4648..784ec061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,12 +16,16 @@ will consitute of a breaking change warranting a new major release: # [unreleased] -# [v8.0.1] 2024-05-28 +# [v8.1.0] 2024-05-29 ## Fixed +- Small fix for transition failure handling of the MPSoC when the `START_MPSOC` action command + to the supervisor fails. +- Fixed inits of arrays within the `MEKF` not being zeros. - Important bugfix for PLOC SUPV: The SUPV previously was able to steal packets from the special communication helper, for example during software updates. +- Corrected sigma of STR for `MEKF`. ## Added diff --git a/CMakeLists.txt b/CMakeLists.txt index ba7dd618..bd79693d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 8) -set(OBSW_VERSION_MINOR 0) +set(OBSW_VERSION_MINOR 1) set(OBSW_VERSION_REVISION 0) # set(CMAKE_VERBOSE TRUE) diff --git a/linux/payload/FreshMpsocHandler.cpp b/linux/payload/FreshMpsocHandler.cpp index 62db5aa2..177d7e33 100644 --- a/linux/payload/FreshMpsocHandler.cpp +++ b/linux/payload/FreshMpsocHandler.cpp @@ -456,7 +456,7 @@ void FreshMpsocHandler::handleActionCommandFailure(ActionId_t actionId, ReturnVa if (actionId != supv::START_MPSOC) { return; } - sif::info << "PlocMPSoCHandler::handleActionCommandFailure: MPSoC boot command failed" + sif::info << "FreshMpsocHandler::handleActionCommandFailure: MPSoC boot command failed" << std::endl; // This is commonly the case when the MPSoC is already operational. Thus the power state is // set to on here @@ -1224,6 +1224,7 @@ bool FreshMpsocHandler::handleHwStartup() { if (powerState == PowerState::SUPV_FAILED) { setMode(MODE_OFF); powerState = PowerState::IDLE; + transitionState = TransitionState::NONE; return false; } if (powerState == PowerState::PENDING_STARTUP) { diff --git a/mission/controller/acs/AcsParameters.h b/mission/controller/acs/AcsParameters.h index dfb99c2c..4ed80e83 100644 --- a/mission/controller/acs/AcsParameters.h +++ b/mission/controller/acs/AcsParameters.h @@ -941,7 +941,7 @@ class AcsParameters : public HasParametersIF { } sunModelParameters; struct KalmanFilterParameters { - double sensorNoiseStr = 0.1 * DEG2RAD; + double sensorNoiseStr = 0.0028 * DEG2RAD; double sensorNoiseSus = 8. * DEG2RAD; double sensorNoiseMgm = 4. * DEG2RAD; double sensorNoiseGyr = 0.1 * DEG2RAD; diff --git a/mission/controller/acs/MultiplicativeKalmanFilter.cpp b/mission/controller/acs/MultiplicativeKalmanFilter.cpp index b66f0531..fc61ca0e 100644 --- a/mission/controller/acs/MultiplicativeKalmanFilter.cpp +++ b/mission/controller/acs/MultiplicativeKalmanFilter.cpp @@ -114,12 +114,13 @@ ReturnValue_t MultiplicativeKalmanFilter::mekfEst( return result; } - double measSensMatrix[matrixDimensionFactor][6] = {{0}}, - measCovMatrix[matrixDimensionFactor][matrixDimensionFactor] = {{0}}, - measVec[matrixDimensionFactor] = {0}, estVec[matrixDimensionFactor] = {0}; + double measSensMatrix[matrixDimensionFactor][6] = {}, + measCovMatrix[matrixDimensionFactor][matrixDimensionFactor] = {}, + measVec[matrixDimensionFactor] = {}, estVec[matrixDimensionFactor] = {}; kfUpdate(susData, mgmData, *measSensMatrix, *measCovMatrix, measVec, estVec); - double kalmanGain[6][matrixDimensionFactor] = {{0}}; + double kalmanGain[6][matrixDimensionFactor]; + std::memset(kalmanGain, 0, sizeof(kalmanGain)); result = kfGain(*measSensMatrix, *measCovMatrix, *kalmanGain, attitudeEstimationData); if (result != returnvalue::OK) { reset(attitudeEstimationData); @@ -342,10 +343,11 @@ ReturnValue_t MultiplicativeKalmanFilter::kfGain( double *measSensMatrix, double *measCovMatrix, double *kalmanGain, acsctrl::AttitudeEstimationData *attitudeEstimationData) { // Kalman Gain: K = P * H' / (H * P * H' + R) - double kalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {{0}}, - invKalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {{0}}, - residualCov[6][matrixDimensionFactor] = {{0}}, - measSensMatrixTransposed[6][matrixDimensionFactor] = {{0}}; + double kalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {}, + invKalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {}; + double residualCov[6][matrixDimensionFactor], measSensMatrixTransposed[6][matrixDimensionFactor]; + std::memset(residualCov, 0, sizeof(residualCov)); + std::memset(measSensMatrixTransposed, 0, sizeof(measSensMatrixTransposed)); MatrixOperations::transpose(measSensMatrix, *measSensMatrixTransposed, matrixDimensionFactor, 6); @@ -382,8 +384,7 @@ void MultiplicativeKalmanFilter::kfCovAposteriori(double *kalmanGain, double *me void MultiplicativeKalmanFilter::kfStateAposteriori(double *kalmanGain, double *measVec, double *estVec) { - double stateVecErr[6] = {0, 0, 0, 0, 0, 0}; - double plantOutputDiff[matrixDimensionFactor] = {0}; + double stateVecErr[6] = {0, 0, 0, 0, 0, 0}, plantOutputDiff[matrixDimensionFactor] = {}; VectorOperations::subtract(measVec, estVec, plantOutputDiff, matrixDimensionFactor); MatrixOperations::multiply(kalmanGain, plantOutputDiff, stateVecErr, 6, matrixDimensionFactor, 1);