removed even more deprecated code
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
parent
ae729337a2
commit
673826b131
@ -165,9 +165,8 @@ void AcsController::performSafe() {
|
||||
}
|
||||
|
||||
// get desired satellite rate, sun direction to align to and inertia
|
||||
double satRateSafe = 0, sunTargetDir[3] = {0, 0, 0},
|
||||
inertiaEive[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||
guidance.getTargetParamsSafe(sunTargetDir, satRateSafe, inertiaEive);
|
||||
double sunTargetDir[3] = {0, 0, 0}, inertiaEive[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||
guidance.getTargetParamsSafe(sunTargetDir, inertiaEive);
|
||||
|
||||
double magMomMtq[3] = {0, 0, 0}, errAng = 0.0;
|
||||
uint8_t safeCtrlStrat = safeCtrl.safeCtrlStrategy(
|
||||
@ -179,20 +178,20 @@ void AcsController::performSafe() {
|
||||
case (acs::SafeModeStrategy::SAFECTRL_ACTIVE_MEKF):
|
||||
safeCtrl.safeMekf(mgmDataProcessed.mgmVecTot.value, mekfData.satRotRateMekf.value,
|
||||
susDataProcessed.sunIjkModel.value, mekfData.quatMekf.value, sunTargetDir,
|
||||
satRateSafe, inertiaEive, magMomMtq, errAng);
|
||||
inertiaEive, magMomMtq, errAng);
|
||||
safeCtrlFailureFlag = false;
|
||||
safeCtrlFailureCounter = 0;
|
||||
break;
|
||||
case (acs::SafeModeStrategy::SAFECTRL_WITHOUT_MEKF):
|
||||
safeCtrl.safeNonMekf(mgmDataProcessed.mgmVecTot.value, gyrDataProcessed.gyrVecTot.value,
|
||||
susDataProcessed.susVecTot.value, sunTargetDir, satRateSafe, inertiaEive,
|
||||
magMomMtq, errAng);
|
||||
susDataProcessed.susVecTot.value, sunTargetDir, inertiaEive, magMomMtq,
|
||||
errAng);
|
||||
safeCtrlFailureFlag = false;
|
||||
safeCtrlFailureCounter = 0;
|
||||
break;
|
||||
case (acs::SafeModeStrategy::SAFECTRL_ECLIPSE_DAMPING):
|
||||
safeCtrl.safeRateDamping(mgmDataProcessed.mgmVecTot.value, gyrDataProcessed.gyrVecTot.value,
|
||||
satRateSafe, sunTargetDir, magMomMtq, errAng);
|
||||
sunTargetDir, magMomMtq, errAng);
|
||||
safeCtrlFailureFlag = false;
|
||||
safeCtrlFailureCounter = 0;
|
||||
break;
|
||||
|
@ -539,8 +539,7 @@ ReturnValue_t Guidance::getDistributionMatrixRw(ACS::SensorValues *sensorValues,
|
||||
}
|
||||
}
|
||||
|
||||
void Guidance::getTargetParamsSafe(double sunTargetSafe[3], double &satRateSafe,
|
||||
double inertiaEive[3][3]) {
|
||||
void Guidance::getTargetParamsSafe(double sunTargetSafe[3], double inertiaEive[3][3]) {
|
||||
std::error_code e;
|
||||
if (not std::filesystem::exists(SD_0_SKEWED_PTG_FILE, e) or
|
||||
not std::filesystem::exists(SD_1_SKEWED_PTG_FILE, e)) {
|
||||
@ -554,7 +553,6 @@ void Guidance::getTargetParamsSafe(double sunTargetSafe[3], double &satRateSafe,
|
||||
std::memcpy(inertiaEive, acsParameters->inertiaEIVE.inertiaMatrixUndeployed,
|
||||
3 * 3 * sizeof(double));
|
||||
}
|
||||
satRateSafe = acsParameters->safeModeControllerParameters.satRateRef;
|
||||
}
|
||||
|
||||
ReturnValue_t Guidance::solarArrayDeploymentComplete() {
|
||||
|
@ -12,7 +12,7 @@ class Guidance {
|
||||
Guidance(AcsParameters *acsParameters_);
|
||||
virtual ~Guidance();
|
||||
|
||||
void getTargetParamsSafe(double sunTargetSafe[3], double &satRateRef, double inertiaEive[3][3]);
|
||||
void getTargetParamsSafe(double sunTargetSafe[3], double inertiaEive[3][3]);
|
||||
ReturnValue_t solarArrayDeploymentComplete();
|
||||
|
||||
// Function to get the target quaternion and refence rotation rate from gps position and
|
||||
|
@ -29,8 +29,7 @@ uint8_t SafeCtrl::safeCtrlStrategy(const bool magFieldValid, const ReturnValue_t
|
||||
|
||||
void SafeCtrl::safeMekf(const double *magFieldB, const double *satRotRateB,
|
||||
const double *sunDirModelI, const double *quatBI, const double *sunDirRefB,
|
||||
const double satRotRateRef, const double inertiaMatrix[3][3],
|
||||
double *magMomB, double &errorAngle) {
|
||||
const double inertiaMatrix[3][3], double *magMomB, double &errorAngle) {
|
||||
// convert magFieldB from uT to T
|
||||
VectorOperations<double>::mulScalar(magFieldB, 1e-6, magFieldBT, 3);
|
||||
|
||||
@ -43,7 +42,7 @@ void SafeCtrl::safeMekf(const double *magFieldB, const double *satRotRateB,
|
||||
errorAngle = acos(dotSun);
|
||||
|
||||
splitRotationalRate(satRotRateB, sunDirB);
|
||||
calculateRotationalRateTorque(satRotRateRef, sunDirB, sunDirRefB, errorAngle,
|
||||
calculateRotationalRateTorque(sunDirB, sunDirRefB, errorAngle,
|
||||
acsParameters->safeModeControllerParameters.k_parallelMekf,
|
||||
acsParameters->safeModeControllerParameters.k_orthoMekf);
|
||||
calculateAngleErrorTorque(sunDirB, sunDirRefB,
|
||||
@ -59,8 +58,7 @@ void SafeCtrl::safeMekf(const double *magFieldB, const double *satRotRateB,
|
||||
|
||||
void SafeCtrl::safeNonMekf(const double *magFieldB, const double *satRotRateB,
|
||||
const double *sunDirB, const double *sunDirRefB,
|
||||
const double satRotRateRef, const double inertiaMatrix[3][3],
|
||||
double *magMomB, double &errorAngle) {
|
||||
const double inertiaMatrix[3][3], double *magMomB, double &errorAngle) {
|
||||
// convert magFieldB from uT to T
|
||||
double magFieldBT[3] = {0, 0, 0};
|
||||
VectorOperations<double>::mulScalar(magFieldB, 1e-6, magFieldBT, 3);
|
||||
@ -70,7 +68,7 @@ void SafeCtrl::safeNonMekf(const double *magFieldB, const double *satRotRateB,
|
||||
errorAngle = acos(dotSun);
|
||||
|
||||
splitRotationalRate(satRotRateB, sunDirB);
|
||||
calculateRotationalRateTorque(satRotRateRef, sunDirB, sunDirRefB, errorAngle,
|
||||
calculateRotationalRateTorque(sunDirB, sunDirRefB, errorAngle,
|
||||
acsParameters->safeModeControllerParameters.k_parallelNonMekf,
|
||||
acsParameters->safeModeControllerParameters.k_orthoNonMekf);
|
||||
calculateAngleErrorTorque(sunDirB, sunDirRefB,
|
||||
@ -86,8 +84,7 @@ void SafeCtrl::safeNonMekf(const double *magFieldB, const double *satRotRateB,
|
||||
}
|
||||
|
||||
void SafeCtrl::safeRateDamping(const double *magFieldB, const double *satRotRateB,
|
||||
const double satRotRateRef, const double *sunDirRefB,
|
||||
double *magMomB, double &errorAngle) {
|
||||
const double *sunDirRefB, double *magMomB, double &errorAngle) {
|
||||
// convert magFieldB from uT to T
|
||||
VectorOperations<double>::mulScalar(magFieldB, 1e-6, magFieldBT, 3);
|
||||
|
||||
@ -95,7 +92,7 @@ void SafeCtrl::safeRateDamping(const double *magFieldB, const double *satRotRate
|
||||
errorAngle = NAN;
|
||||
|
||||
splitRotationalRate(satRotRateB, sunDirRefB);
|
||||
calculateRotationalRateTorque(satRotRateRef, sunDirRefB, sunDirRefB, errorAngle,
|
||||
calculateRotationalRateTorque(sunDirRefB, sunDirRefB, errorAngle,
|
||||
acsParameters->safeModeControllerParameters.k_parallelNonMekf,
|
||||
acsParameters->safeModeControllerParameters.k_orthoNonMekf);
|
||||
|
||||
@ -115,9 +112,9 @@ void SafeCtrl::splitRotationalRate(const double *satRotRateB, const double *sunD
|
||||
VectorOperations<double>::subtract(satRotRateB, satRotRateParallelB, satRotRateOrthogonalB, 3);
|
||||
}
|
||||
|
||||
void SafeCtrl::calculateRotationalRateTorque(const double satRotRateRef, const double *sunDirB,
|
||||
const double *sunDirRefB, double &errorAngle,
|
||||
const double gainParallel, const double gainOrtho) {
|
||||
void SafeCtrl::calculateRotationalRateTorque(const double *sunDirB, const double *sunDirRefB,
|
||||
double &errorAngle, const double gainParallel,
|
||||
const double gainOrtho) {
|
||||
// calculate torque for parallel rotational rate
|
||||
VectorOperations<double>::mulScalar(cmdParallel, -gainParallel, cmdParallel, 3);
|
||||
|
||||
|
@ -17,22 +17,21 @@ class SafeCtrl {
|
||||
const uint8_t mekfEnabled, const uint8_t dampingEnabled);
|
||||
|
||||
void safeMekf(const double *magFieldB, const double *satRotRateB, const double *sunDirModelI,
|
||||
const double *quatBI, const double *sunDirRefB, const double satRotRateRef,
|
||||
const double inertiaMatrix[3][3], double *magMomB, double &errorAngle);
|
||||
const double *quatBI, const double *sunDirRefB, const double inertiaMatrix[3][3],
|
||||
double *magMomB, double &errorAngle);
|
||||
|
||||
void safeNonMekf(const double *magFieldB, const double *satRotRateB, const double *sunDirB,
|
||||
const double *sunDirRefB, const double satRotRateRef,
|
||||
const double inertiaMatrix[3][3], double *magMomB, double &errorAngle);
|
||||
const double *sunDirRefB, const double inertiaMatrix[3][3], double *magMomB,
|
||||
double &errorAngle);
|
||||
|
||||
void safeRateDamping(const double *magFieldB, const double *satRotRateB,
|
||||
const double satRotRateRef, const double *sunDirRefB, double *magMomB,
|
||||
double &errorAngle);
|
||||
void safeRateDamping(const double *magFieldB, const double *satRotRateB, const double *sunDirRefB,
|
||||
double *magMomB, double &errorAngle);
|
||||
|
||||
void splitRotationalRate(const double *satRotRateB, const double *sunDirB);
|
||||
|
||||
void calculateRotationalRateTorque(const double satRotRateRef, const double *sunDirB,
|
||||
const double *sunDirRefB, double &errorAngle,
|
||||
const double gainParallel, const double gainOrtho);
|
||||
void calculateRotationalRateTorque(const double *sunDirB, const double *sunDirRefB,
|
||||
double &errorAngle, const double gainParallel,
|
||||
const double gainOrtho);
|
||||
|
||||
void calculateAngleErrorTorque(const double *sunDirB, const double *sunDirRefB,
|
||||
const double gainAlign, const double inertiaMatrix[3][3]);
|
||||
|
Loading…
Reference in New Issue
Block a user