convert target rot rate into body rf
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
This commit is contained in:
parent
291c9ea99b
commit
944dfb6f81
@ -421,7 +421,11 @@ void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], do
|
|||||||
errorAngle = QuaternionOperations::getAngle(errorQuat, true);
|
errorAngle = QuaternionOperations::getAngle(errorQuat, true);
|
||||||
|
|
||||||
// Calculate error satellite rotational rate
|
// Calculate error satellite rotational rate
|
||||||
// First combine the target and reference satellite rotational rates
|
// Convert target rotational rate into body RF
|
||||||
|
double errorQuatInv[4] = {0, 0, 0, 0}, targetSatRotRateB[3] = {0, 0, 0};
|
||||||
|
QuaternionOperations::inverse(errorQuat, errorQuatInv);
|
||||||
|
QuaternionOperations::multiplyVector(errorQuat, targetSatRotRate, targetSatRotRateB);
|
||||||
|
// Combine the target and reference satellite rotational rates
|
||||||
double combinedRefSatRotRate[3] = {0, 0, 0};
|
double combinedRefSatRotRate[3] = {0, 0, 0};
|
||||||
VectorOperations<double>::add(targetSatRotRate, refSatRotRate, combinedRefSatRotRate, 3);
|
VectorOperations<double>::add(targetSatRotRate, refSatRotRate, combinedRefSatRotRate, 3);
|
||||||
// Then subtract the combined required satellite rotational rates from the actual rate
|
// Then subtract the combined required satellite rotational rates from the actual rate
|
||||||
|
Loading…
Reference in New Issue
Block a user