also check for inertia

This commit is contained in:
Marius Eggert 2023-03-24 14:51:45 +01:00
parent ad72301ea0
commit 906413e800
2 changed files with 10 additions and 5 deletions

View File

@ -539,18 +539,23 @@ ReturnValue_t Guidance::getDistributionMatrixRw(ACS::SensorValues *sensorValues,
}
}
void Guidance::getTargetParamsSafe(double sunTargetSafe[3], double satRateSafe[3]) {
void Guidance::getTargetParamsSafe(double sunTargetSafe[3], double satRateSafe[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)) {
std::memcpy(sunTargetSafe, acsParameters->safeModeControllerParameters.sunTargetDir,
3 * sizeof(double));
sizeof(&sunTargetSafe));
std::memcpy(inertiaEive, acsParameters->inertiaEIVE.inertiaMatrixDeployed,
sizeof(&inertiaEive));
} else {
std::memcpy(sunTargetSafe, acsParameters->safeModeControllerParameters.sunTargetDirLeop,
3 * sizeof(double));
sizeof(&sunTargetSafe));
std::memcpy(inertiaEive, acsParameters->inertiaEIVE.inertiaMatrixUndeployed,
sizeof(&inertiaEive));
}
std::memcpy(satRateSafe, acsParameters->safeModeControllerParameters.satRateRef,
3 * sizeof(double));
sizeof(&satRateSafe));
}
ReturnValue_t Guidance::solarArrayDeploymentComplete() {

View File

@ -12,7 +12,7 @@ class Guidance {
Guidance(AcsParameters *acsParameters_);
virtual ~Guidance();
void getTargetParamsSafe(double sunTargetSafe[3], double satRateRef[3]);
void getTargetParamsSafe(double sunTargetSafe[3], double satRateRef[3], double inertiaEive[3][3]);
ReturnValue_t solarArrayDeploymentComplete();
// Function to get the target quaternion and refence rotation rate from gps position and