???
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...

This commit is contained in:
Marius Eggert 2024-04-11 13:57:40 +02:00
parent 4ed516e0bc
commit eff9116aec

View File

@ -303,9 +303,9 @@ void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], do
// First calculate error quaternion between current and target orientation without reference // First calculate error quaternion between current and target orientation without reference
// quaternion // quaternion
double errorQuatWoRef[4] = {0, 0, 0, 0}; double errorQuatWoRef[4] = {0, 0, 0, 0};
QuaternionOperations::multiply(targetQuat, currentQuat, errorQuatWoRef); QuaternionOperations::multiply(currentQuat, targetQuat, errorQuatWoRef);
// Then add rotation from reference quaternion // Then add rotation from reference quaternion
QuaternionOperations::multiply(errorQuatWoRef, refQuat, errorQuat); QuaternionOperations::multiply(refQuat, errorQuatWoRef, errorQuat);
// Keep scalar part of quaternion positive // Keep scalar part of quaternion positive
if (errorQuat[3] < 0) { if (errorQuat[3] < 0) {
VectorOperations<double>::mulScalar(errorQuat, -1, errorQuat, 4); VectorOperations<double>::mulScalar(errorQuat, -1, errorQuat, 4);