try to point STR away from earth during idle
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit Details

This commit is contained in:
Marius Eggert 2024-02-02 15:04:26 +01:00
parent e7dc9cddfd
commit 15cddfdeb7
2 changed files with 12 additions and 12 deletions

View File

@ -4,24 +4,24 @@ Guidance::Guidance(AcsParameters *acsParameters_) { acsParameters = acsParameter
Guidance::~Guidance() {}
void Guidance::targetQuatPtgIdle(double timeDelta, double sunDirI[3], double targetQuat[4],
double targetSatRotRate[3]) {
//-------------------------------------------------------------------------------------
// Calculation of target quaternion to sun
//-------------------------------------------------------------------------------------
// positive z-Axis of EIVE in direction of sun
void Guidance::targetQuatPtgIdle(const double timeDelta, timeval timeAbsolute,
const double sunDirI[3], const double posSatF[4],
double targetQuat[4], double targetSatRotRate[3]) {
// positive z-Axis of EIVE in direction of sun
double zAxisXI[3] = {0, 0, 0};
VectorOperations<double>::normalize(sunDirI, zAxisXI, 3);
// assign helper vector (north pole inertial)
double helperXI[3] = {0, 0, 1};
// determine helper vector to point x-Axis and therefore the STR away from Earth
double helperXI[3] = {0, 0, 0}, posSatI[3] = {0, 0, 0};
CoordinateTransformations::positionEcfToEci(posSatF, posSatI, &timeAbsolute);
VectorOperations<double>::normalize(posSatI, helperXI, 3);
// construct y-axis from helper vector and z-axis
// construct y-axis from helper vector and z-axis
double yAxisXI[3] = {0, 0, 0};
VectorOperations<double>::cross(zAxisXI, helperXI, yAxisXI);
VectorOperations<double>::normalize(yAxisXI, yAxisXI, 3);
// x-axis completes RHS
// x-axis completes RHS
double xAxisXI[3] = {0, 0, 0};
VectorOperations<double>::cross(yAxisXI, zAxisXI, xAxisXI);
VectorOperations<double>::normalize(xAxisXI, xAxisXI, 3);

View File

@ -25,8 +25,8 @@ class Guidance {
ReturnValue_t solarArrayDeploymentComplete();
void resetValues();
void targetQuatPtgIdle(const double timeDelta, double sunDirI[3], double targetQuat[4],
double targetSatRotRate[3]);
void targetQuatPtgIdle(const double timeDelta, timeval timeAbsolute, const double sunDirI[3],
const double posSatF[4], double targetQuat[4], double targetSatRotRate[3]);
void targetQuatPtgTarget(timeval timeAbsolute, const double timeDelta, double posSatF[3],
double velSatE[3], double quatIX[4], double targetSatRotRate[3]);
void targetQuatPtgGs(timeval timeAbsolute, const double timeDelta, double posSatF[3],