Fix Calculation of Fused Rotation Rate during Eclipse #768

Merged
muellerr merged 6 commits from fused-rot-rate-fix into main 2023-08-03 13:11:05 +02:00
Showing only changes of commit 5958560d00 - Show all commits

View File

@ -70,11 +70,6 @@ void FusedRotationEstimation::estimateFusedRotationRateSafe(
double fusedRotRateTotal[3] = {0, 0, 0};
VectorOperations<double>::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(