all used guidance parts and their calls in AcsCrtl should work now
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit

This commit is contained in:
Marius Eggert 2023-02-20 16:30:53 +01:00
parent 1eb26240b1
commit 40446b1fea
3 changed files with 6 additions and 16 deletions

View File

@ -335,12 +335,13 @@ void AcsController::performPointingCtrl() {
break; break;
case acs::PTG_INERTIAL: case acs::PTG_INERTIAL:
guidance.targetQuatPtgInertial(targetQuat, refSatRate); std::memcpy(targetQuat, acsParameters.inertialModeControllerParameters.tgtQuat,
std::memcpy(quatRef, acsParameters.inertialModeControllerParameters.quatRef,
4 * sizeof(double)); 4 * sizeof(double));
guidance.comparePtg(targetQuat, &mekfData, quatRef, refSatRate, quatErrorComplete, quatError, guidance.comparePtg(mekfData.quatMekf.value, mekfData.satRotRateMekf.value, targetQuat,
deltaRate); targetSatRotRate, acsParameters.inertialModeControllerParameters.quatRef,
ptgCtrl.ptgLaw(&acsParameters.inertialModeControllerParameters, quatError, deltaRate, acsParameters.inertialModeControllerParameters.refRotRate, errorQuat,
errorSatRotRate, errorAngle);
ptgCtrl.ptgLaw(&acsParameters.inertialModeControllerParameters, errorQuat, errorSatRotRate,
*rwPseudoInv, torquePtgRws); *rwPseudoInv, torquePtgRws);
ptgCtrl.ptgNullspace( ptgCtrl.ptgNullspace(
&acsParameters.inertialModeControllerParameters, &(sensorValues.rw1Set.currSpeed.value), &acsParameters.inertialModeControllerParameters, &(sensorValues.rw1Set.currSpeed.value),

View File

@ -412,13 +412,6 @@ void Guidance::targetQuatPtgNadirThreeAxes(timeval now, double posSatE[3], doubl
targetRotationRate(timeElapsedMax, now, targetQuat, refSatRate); targetRotationRate(timeElapsedMax, now, targetQuat, refSatRate);
} }
void Guidance::targetQuatPtgInertial(double targetQuat[4], double refSatRate[3]) {
std::memcpy(targetQuat, acsParameters.inertialModeControllerParameters.tgtQuat,
4 * sizeof(double));
std::memcpy(refSatRate, acsParameters.inertialModeControllerParameters.refRotRate,
3 * sizeof(double));
}
void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], double targetQuat[4], void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], double targetQuat[4],
double targetSatRotRate[3], double refQuat[4], double refSatRotRate[3], double targetSatRotRate[3], double refQuat[4], double refSatRotRate[3],
double errorQuat[4], double errorSatRotRate[3], double errorAngle) { double errorQuat[4], double errorSatRotRate[3], double errorAngle) {

View File

@ -32,10 +32,6 @@ class Guidance {
void targetQuatPtgNadirThreeAxes(timeval now, double posSatE[3], double velSatE[3], void targetQuatPtgNadirThreeAxes(timeval now, double posSatE[3], double velSatE[3],
double targetQuat[4], double refSatRate[3]); double targetQuat[4], double refSatRate[3]);
// Function to get the target quaternion and refence rotation rate from parameters for inertial
// pointing
void targetQuatPtgInertial(double targetQuat[4], double targetSatRotRate[3]);
// @note: Calculates the error quaternion between the current orientation and the target // @note: Calculates the error quaternion between the current orientation and the target
// quaternion, considering a reference quaternion. Additionally the difference between the actual // quaternion, considering a reference quaternion. Additionally the difference between the actual
// and a desired satellite rotational rate is calculated, again considering a reference rotational // and a desired satellite rotational rate is calculated, again considering a reference rotational