first version of safe mode solar vector for leop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
4090941c3e
commit
5e557d2d46
@ -13,6 +13,8 @@
|
|||||||
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
|
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "util/CholeskyDecomposition.h"
|
#include "util/CholeskyDecomposition.h"
|
||||||
#include "util/MathOperations.h"
|
#include "util/MathOperations.h"
|
||||||
@ -22,16 +24,16 @@ Guidance::Guidance(AcsParameters *acsParameters_) { acsParameters = *acsParamete
|
|||||||
Guidance::~Guidance() {}
|
Guidance::~Guidance() {}
|
||||||
|
|
||||||
void Guidance::getTargetParamsSafe(double sunTargetSafe[3], double satRateSafe[3]) {
|
void Guidance::getTargetParamsSafe(double sunTargetSafe[3], double satRateSafe[3]) {
|
||||||
for (int i = 0; i < 3; i++) {
|
if (not std::filesystem::exists(SD_0_SKEWED_PTG_FILE) or
|
||||||
if (false) { // ToDo: if file does not exist anymore
|
not std::filesystem::exists(SD_1_SKEWED_PTG_FILE)) { // ToDo: if file does not exist anymore
|
||||||
sunTargetSafe[i] = acsParameters.safeModeControllerParameters.sunTargetDir[i];
|
std::memcpy(sunTargetSafe, acsParameters.safeModeControllerParameters.sunTargetDir,
|
||||||
} else {
|
3 * sizeof(double));
|
||||||
sunTargetSafe[i] = acsParameters.safeModeControllerParameters.sunTargetDirLeop[i];
|
} else {
|
||||||
}
|
std::memcpy(sunTargetSafe, acsParameters.safeModeControllerParameters.sunTargetDirLeop,
|
||||||
satRateSafe[i] = acsParameters.safeModeControllerParameters.satRateRef[i];
|
3 * sizeof(double));
|
||||||
}
|
}
|
||||||
|
std::memcpy(satRateSafe, acsParameters.safeModeControllerParameters.satRateRef,
|
||||||
// memcpy(sunTargetSafe, acsParameters.safeModeControllerParameters.sunTargetDir, 24);
|
3 * sizeof(double));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Guidance::targetQuatPtgSingleAxis(ACS::SensorValues *sensorValues, acsctrl::MekfData *mekfData,
|
void Guidance::targetQuatPtgSingleAxis(ACS::SensorValues *sensorValues, acsctrl::MekfData *mekfData,
|
||||||
|
@ -73,6 +73,9 @@ class Guidance {
|
|||||||
timeval timeSavedQuaternionNadir;
|
timeval timeSavedQuaternionNadir;
|
||||||
double savedQuaternionNadir[4] = {0, 0, 0, 0};
|
double savedQuaternionNadir[4] = {0, 0, 0, 0};
|
||||||
double omegaRefSavedNadir[3] = {0, 0, 0};
|
double omegaRefSavedNadir[3] = {0, 0, 0};
|
||||||
|
|
||||||
|
static constexpr char SD_0_SKEWED_PTG_FILE[] = "/mnt/sd0/conf/deployment";
|
||||||
|
static constexpr char SD_1_SKEWED_PTG_FILE[] = "/mnt/sd1/conf/deployment";
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* ACS_GUIDANCE_H_ */
|
#endif /* ACS_GUIDANCE_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user