Fixes for Pointing Modes #851

Merged
meggert merged 24 commits from ptg-fixes into main 2024-01-29 17:05:46 +01:00
Showing only changes of commit 588612875d - Show all commits

View File

@ -453,10 +453,10 @@ void Guidance::targetRotationRate(const int8_t timeElapsedMax, const double time
if (VectorOperations<double>::norm(quatIXprev, 4) == 0) { if (VectorOperations<double>::norm(quatIXprev, 4) == 0) {
std::memcpy(quatIXprev, quatIX, sizeof(quatIXprev)); std::memcpy(quatIXprev, quatIX, sizeof(quatIXprev));
} }
if (not timeDelta != 0.0) { if (timeDelta != 0.0) {
QuaternionOperations::rotationFromQuaternions(quatIX, quatIXprev, timeDelta, refSatRate); QuaternionOperations::rotationFromQuaternions(quatIX, quatIXprev, timeDelta, refSatRate);
} else { } else {
std::memcpy(refSatRate, ZERO_VEC3, sizeof(refSatRate)); std::memcpy(refSatRate, ZERO_VEC3, 3 * sizeof(double));
} }
std::memcpy(quatIXprev, quatIX, sizeof(quatIXprev)); std::memcpy(quatIXprev, quatIX, sizeof(quatIXprev));
} }