Telemetry related Changes #394
@ -311,11 +311,13 @@ void AcsController::performPointingCtrl() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case acs::PTG_NADIR:
|
case acs::PTG_NADIR:
|
||||||
guidance.targetQuatPtgNadirThreeAxes(&sensorValues, &gpsDataProcessed, &mekfData, now,
|
guidance.targetQuatPtgNadirThreeAxes(now, gpsDataProcessed.gpsPosition.value,
|
||||||
targetQuat, refSatRate);
|
gpsDataProcessed.gpsVelocity.value, targetQuat,
|
||||||
std::memcpy(quatRef, acsParameters.nadirModeControllerParameters.quatRef, 4 * sizeof(double));
|
targetSatRotRate);
|
||||||
guidance.comparePtg(targetQuat, &mekfData, quatRef, refSatRate, quatErrorComplete, quatError,
|
guidance.comparePtg(mekfData.quatMekf.value, mekfData.satRotRateMekf.value, targetQuat,
|
||||||
deltaRate);
|
targetSatRotRate, acsParameters.nadirModeControllerParameters.quatRef,
|
||||||
|
acsParameters.nadirModeControllerParameters.refRotRate, errorQuat,
|
||||||
|
errorSatRotRate, errorAngle);
|
||||||
ptgCtrl.ptgLaw(&acsParameters.nadirModeControllerParameters, errorQuat, errorSatRotRate,
|
ptgCtrl.ptgLaw(&acsParameters.nadirModeControllerParameters, errorQuat, errorSatRotRate,
|
||||||
*rwPseudoInv, torquePtgRws);
|
*rwPseudoInv, torquePtgRws);
|
||||||
ptgCtrl.ptgNullspace(
|
ptgCtrl.ptgNullspace(
|
||||||
|
@ -364,8 +364,8 @@ void Guidance::targetQuatPtgNadirSingleAxis(timeval now, double targetQuat[4],
|
|||||||
refSatRate[2] = 0;
|
refSatRate[2] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Guidance::quatNadirPtgThreeAxes(timeval now, double posSatE[3], double velSatE[3],
|
void Guidance::targetQuatPtgNadirThreeAxes(timeval now, double posSatE[3], double velSatE[3],
|
||||||
double targetQuat[4], double refSatRate[3]) {
|
double targetQuat[4], double refSatRate[3]) {
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
// Calculation of target quaternion for Nadir pointing
|
// Calculation of target quaternion for Nadir pointing
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
@ -409,12 +409,7 @@ void Guidance::quatNadirPtgThreeAxes(timeval now, double posSatE[3], double velS
|
|||||||
QuaternionOperations::fromDcm(dcmTgt, targetQuat);
|
QuaternionOperations::fromDcm(dcmTgt, targetQuat);
|
||||||
|
|
||||||
int8_t timeElapsedMax = acsParameters.nadirModeControllerParameters.timeElapsedMax;
|
int8_t timeElapsedMax = acsParameters.nadirModeControllerParameters.timeElapsedMax;
|
||||||
refRotationRate(timeElapsedMax, now, quatInertialTarget, refSatRate);
|
targetRotationRate(timeElapsedMax, now, targetQuat, refSatRate);
|
||||||
|
|
||||||
// Transform in system relative to satellite frame
|
|
||||||
double quatBJ[4] = {0, 0, 0, 0};
|
|
||||||
std::memcpy(quatBJ, mekfData->quatMekf.value, 4 * sizeof(double));
|
|
||||||
QuaternionOperations::multiply(quatBJ, quatInertialTarget, targetQuat);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Guidance::targetQuatPtgInertial(double targetQuat[4], double refSatRate[3]) {
|
void Guidance::targetQuatPtgInertial(double targetQuat[4], double refSatRate[3]) {
|
||||||
|
@ -29,7 +29,8 @@ class Guidance {
|
|||||||
// Function to get the target quaternion and refence rotation rate from gps position for Nadir
|
// Function to get the target quaternion and refence rotation rate from gps position for Nadir
|
||||||
// pointing
|
// pointing
|
||||||
void targetQuatPtgNadirSingleAxis(timeval now, double targetQuat[4], double targetSatRotRate[3]);
|
void targetQuatPtgNadirSingleAxis(timeval now, double targetQuat[4], double targetSatRotRate[3]);
|
||||||
void targetQuatPtgNadirThreeAxes(timeval now, double targetQuat[4], double targetSatRotRate[3]);
|
void targetQuatPtgNadirThreeAxes(timeval now, double posSatE[3], double velSatE[3],
|
||||||
|
double targetQuat[4], double refSatRate[3]);
|
||||||
|
|
||||||
// Function to get the target quaternion and refence rotation rate from parameters for inertial
|
// Function to get the target quaternion and refence rotation rate from parameters for inertial
|
||||||
// pointing
|
// pointing
|
||||||
|
Loading…
x
Reference in New Issue
Block a user