From 2b09ec8bc03a5a4e14977c6cf810ddec026b79d0 Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 14 Feb 2024 10:09:39 +0100 Subject: [PATCH] fixes --- mission/controller/acs/Guidance.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index cc0a20d9..2972dfed 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -48,8 +48,6 @@ void Guidance::targetQuatPtgTarget(timeval timeAbsolute, const double timeDelta, acsParameters->targetModeControllerParameters.latitudeTgt, acsParameters->targetModeControllerParameters.longitudeTgt, acsParameters->targetModeControllerParameters.altitudeTgt, targetF); - double targetDirF[3] = {0, 0, 0}; - VectorOperations::subtract(targetF, posSatF, targetDirF, 3); // target direction in the ECI frame double posSatI[3] = {0, 0, 0}, targetI[3] = {0, 0, 0}, targetDirI[3] = {0, 0, 0}; @@ -106,7 +104,7 @@ void Guidance::targetQuatPtgGs(timeval timeAbsolute, const double timeDelta, // target direction in the ECI frame double posSatI[3] = {0, 0, 0}, posGroundStationI[3] = {0, 0, 0}, groundStationDirI[3] = {0, 0, 0}; CoordinateTransformations::positionEcfToEci(posSatF, posSatI, &timeAbsolute); - CoordinateTransformations::positionEcfToEci(posGroundStationI, posGroundStationI, &timeAbsolute); + CoordinateTransformations::positionEcfToEci(posGroundStationF, posGroundStationI, &timeAbsolute); VectorOperations::subtract(posGroundStationI, posSatI, groundStationDirI, 3); // negative x-axis aligned with target direction