From 5958560d00d50b26b7edee2029452fbcc729be1c Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 3 Aug 2023 11:34:29 +0200 Subject: [PATCH] cleanup --- mission/controller/acs/FusedRotationEstimation.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mission/controller/acs/FusedRotationEstimation.cpp b/mission/controller/acs/FusedRotationEstimation.cpp index bca5f190..4f1dad45 100644 --- a/mission/controller/acs/FusedRotationEstimation.cpp +++ b/mission/controller/acs/FusedRotationEstimation.cpp @@ -70,11 +70,6 @@ void FusedRotationEstimation::estimateFusedRotationRateSafe( double fusedRotRateTotal[3] = {0, 0, 0}; VectorOperations::add(fusedRotRateParallel, fusedRotRateOrthogonal, fusedRotRateTotal); - // store for calculation of angular acceleration - if (gyrDataProcessed->gyrVecTot.isValid()) { - std::memcpy(rotRateOldB, gyrDataProcessed->gyrVecTot.value, 3 * sizeof(double)); - } - { PoolReadGuard pg(fusedRotRateData); std::memcpy(fusedRotRateData->rotRateOrthogonal.value, fusedRotRateOrthogonal, @@ -83,6 +78,11 @@ void FusedRotationEstimation::estimateFusedRotationRateSafe( std::memcpy(fusedRotRateData->rotRateTotal.value, fusedRotRateTotal, 3 * sizeof(double)); fusedRotRateData->setValidity(true, true); } + + // store for calculation of angular acceleration + if (gyrDataProcessed->gyrVecTot.isValid()) { + std::memcpy(rotRateOldB, gyrDataProcessed->gyrVecTot.value, 3 * sizeof(double)); + } } void FusedRotationEstimation::estimateFusedRotationRateEclipse(