From 823aa709542bd202b83ceab0f84894795f3ec645 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 16 Oct 2023 17:01:42 +0200 Subject: [PATCH] fixed deprecated functions --- mission/controller/acs/Guidance.cpp | 19 +++++++++++-------- mission/controller/acs/Guidance.h | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index b483372d..6067676e 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -16,9 +16,11 @@ Guidance::Guidance(AcsParameters *acsParameters_) { acsParameters = acsParameter Guidance::~Guidance() {} -void Guidance::targetQuatPtgSingleAxis(timeval now, double posSatE[3], double velSatE[3], - double sunDirI[3], double refDirB[3], double quatBI[4], - double targetQuat[4], double targetSatRotRate[3]) { +[[deprecated]] void Guidance::targetQuatPtgSingleAxis(const timeval timeAbsolute, double posSatE[3], + double velSatE[3], double sunDirI[3], + double refDirB[3], double quatBI[4], + double targetQuat[4], + double targetSatRotRate[3]) { //------------------------------------------------------------------------------------- // Calculation of target quaternion to groundstation or given latitude, longitude and altitude //------------------------------------------------------------------------------------- @@ -38,7 +40,7 @@ void Guidance::targetQuatPtgSingleAxis(timeval now, double posSatE[3], double ve double dcmEI[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; double dcmIE[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; double dcmEIDot[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; - MathOperations::ecfToEciWithNutPre(now, *dcmEI, *dcmEIDot); + MathOperations::ecfToEciWithNutPre(timeAbsolute, *dcmEI, *dcmEIDot); MathOperations::inverseMatrixDimThree(*dcmEI, *dcmIE); double dcmIEDot[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; @@ -303,9 +305,10 @@ void Guidance::targetQuatPtgSun(double timeDelta, double sunDirI[3], double targ targetRotationRate(timeElapsedMax, timeDelta, targetQuat, targetSatRotRate); } -void Guidance::targetQuatPtgNadirSingleAxis(timeval now, double posSatE[3], double quatBI[4], - double targetQuat[4], double refDirB[3], - double refSatRate[3]) { +[[deprecated]] void Guidance::targetQuatPtgNadirSingleAxis(const timeval timeAbsolute, + double posSatE[3], double quatBI[4], + double targetQuat[4], double refDirB[3], + double refSatRate[3]) { //------------------------------------------------------------------------------------- // Calculation of target quaternion for Nadir pointing //------------------------------------------------------------------------------------- @@ -316,7 +319,7 @@ void Guidance::targetQuatPtgNadirSingleAxis(timeval now, double posSatE[3], doub double dcmEI[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; double dcmIE[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; double dcmEIDot[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; - MathOperations::ecfToEciWithNutPre(now, *dcmEI, *dcmEIDot); + MathOperations::ecfToEciWithNutPre(timeAbsolute, *dcmEI, *dcmEIDot); MathOperations::inverseMatrixDimThree(*dcmEI, *dcmIE); double dcmIEDot[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; diff --git a/mission/controller/acs/Guidance.h b/mission/controller/acs/Guidance.h index 371ae147..1cf5b8a9 100644 --- a/mission/controller/acs/Guidance.h +++ b/mission/controller/acs/Guidance.h @@ -17,7 +17,7 @@ class Guidance { // Function to get the target quaternion and reference rotation rate from gps position and // position of the ground station - void targetQuatPtgSingleAxis(const double timeDelta, double posSatE[3], double velSatE[3], + void targetQuatPtgSingleAxis(const timeval timeAbsolute, double posSatE[3], double velSatE[3], double sunDirI[3], double refDirB[3], double quatBI[4], double targetQuat[4], double targetSatRotRate[3]); void targetQuatPtgThreeAxes(const timeval timeAbsolute, const double timeDelta, double posSatE[3], @@ -32,7 +32,7 @@ class Guidance { // Function to get the target quaternion and refence rotation rate from gps position for Nadir // pointing - void targetQuatPtgNadirSingleAxis(const double timeDelta, double posSatE[3], double quatBI[4], + void targetQuatPtgNadirSingleAxis(const timeval timeAbsolute, double posSatE[3], double quatBI[4], double targetQuat[4], double refDirB[3], double refSatRate[3]); void targetQuatPtgNadirThreeAxes(const timeval timeAbsolute, const double timeDelta, double posSatE[3], double velSatE[3], double targetQuat[4],