try to point STR away from earth during idle
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
This commit is contained in:
parent
e7dc9cddfd
commit
15cddfdeb7
@ -4,24 +4,24 @@ Guidance::Guidance(AcsParameters *acsParameters_) { acsParameters = acsParameter
|
|||||||
|
|
||||||
Guidance::~Guidance() {}
|
Guidance::~Guidance() {}
|
||||||
|
|
||||||
void Guidance::targetQuatPtgIdle(double timeDelta, double sunDirI[3], double targetQuat[4],
|
void Guidance::targetQuatPtgIdle(const double timeDelta, timeval timeAbsolute,
|
||||||
double targetSatRotRate[3]) {
|
const double sunDirI[3], const double posSatF[4],
|
||||||
//-------------------------------------------------------------------------------------
|
double targetQuat[4], double targetSatRotRate[3]) {
|
||||||
// Calculation of target quaternion to sun
|
// positive z-Axis of EIVE in direction of sun
|
||||||
//-------------------------------------------------------------------------------------
|
|
||||||
// positive z-Axis of EIVE in direction of sun
|
|
||||||
double zAxisXI[3] = {0, 0, 0};
|
double zAxisXI[3] = {0, 0, 0};
|
||||||
VectorOperations<double>::normalize(sunDirI, zAxisXI, 3);
|
VectorOperations<double>::normalize(sunDirI, zAxisXI, 3);
|
||||||
|
|
||||||
// assign helper vector (north pole inertial)
|
// determine helper vector to point x-Axis and therefore the STR away from Earth
|
||||||
double helperXI[3] = {0, 0, 1};
|
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};
|
double yAxisXI[3] = {0, 0, 0};
|
||||||
VectorOperations<double>::cross(zAxisXI, helperXI, yAxisXI);
|
VectorOperations<double>::cross(zAxisXI, helperXI, yAxisXI);
|
||||||
VectorOperations<double>::normalize(yAxisXI, yAxisXI, 3);
|
VectorOperations<double>::normalize(yAxisXI, yAxisXI, 3);
|
||||||
|
|
||||||
// x-axis completes RHS
|
// x-axis completes RHS
|
||||||
double xAxisXI[3] = {0, 0, 0};
|
double xAxisXI[3] = {0, 0, 0};
|
||||||
VectorOperations<double>::cross(yAxisXI, zAxisXI, xAxisXI);
|
VectorOperations<double>::cross(yAxisXI, zAxisXI, xAxisXI);
|
||||||
VectorOperations<double>::normalize(xAxisXI, xAxisXI, 3);
|
VectorOperations<double>::normalize(xAxisXI, xAxisXI, 3);
|
||||||
|
@ -25,8 +25,8 @@ class Guidance {
|
|||||||
ReturnValue_t solarArrayDeploymentComplete();
|
ReturnValue_t solarArrayDeploymentComplete();
|
||||||
void resetValues();
|
void resetValues();
|
||||||
|
|
||||||
void targetQuatPtgIdle(const double timeDelta, double sunDirI[3], double targetQuat[4],
|
void targetQuatPtgIdle(const double timeDelta, timeval timeAbsolute, const double sunDirI[3],
|
||||||
double targetSatRotRate[3]);
|
const double posSatF[4], double targetQuat[4], double targetSatRotRate[3]);
|
||||||
void targetQuatPtgTarget(timeval timeAbsolute, const double timeDelta, double posSatF[3],
|
void targetQuatPtgTarget(timeval timeAbsolute, const double timeDelta, double posSatF[3],
|
||||||
double velSatE[3], double quatIX[4], double targetSatRotRate[3]);
|
double velSatE[3], double quatIX[4], double targetSatRotRate[3]);
|
||||||
void targetQuatPtgGs(timeval timeAbsolute, const double timeDelta, double posSatF[3],
|
void targetQuatPtgGs(timeval timeAbsolute, const double timeDelta, double posSatF[3],
|
||||||
|
Loading…
Reference in New Issue
Block a user