diff --git a/mission/controller/acs/Igrf13Model.cpp b/mission/controller/acs/Igrf13Model.cpp index 4ae7c93a..b15edada 100644 --- a/mission/controller/acs/Igrf13Model.cpp +++ b/mission/controller/acs/Igrf13Model.cpp @@ -69,7 +69,8 @@ void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude, magFieldModel[1] *= -1; magFieldModel[2] *= (-1 / sin(theta)); - double JD2000 = TimeSystems::convertUnixToJD2000(timeOfMagMeasurement); + double JD2000 = 0; + Clock::convertTimevalToJD2000(timeOfMagMeasurement, &JD2000); double UT1 = JD2000 / 36525.; double gst = @@ -93,7 +94,8 @@ void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude, void Igrf13Model::updateCoeffGH(timeval timeOfMagMeasurement) { double JD2000Igrf = (2458850.0 - 2451545); // Begin of IGRF-13 (2020-01-01,00:00:00) in JD2000 - double JD2000 = TimeSystems::convertUnixToJD2000(timeOfMagMeasurement); + double JD2000 = 0; + Clock::convertTimevalToJD2000(timeOfMagMeasurement, &JD2000); double days = ceil(JD2000 - JD2000Igrf); for (int i = 0; i <= igrfOrder; i++) { for (int j = 0; j <= (igrfOrder - 1); j++) { diff --git a/mission/controller/acs/Igrf13Model.h b/mission/controller/acs/Igrf13Model.h index 9a7feb34..f0936b7f 100644 --- a/mission/controller/acs/Igrf13Model.h +++ b/mission/controller/acs/Igrf13Model.h @@ -16,11 +16,11 @@ #ifndef IGRF13MODEL_H_ #define IGRF13MODEL_H_ -#include #include #include #include #include +#include #include diff --git a/mission/controller/acs/SensorProcessing.cpp b/mission/controller/acs/SensorProcessing.cpp index ac82e891..46be5db2 100644 --- a/mission/controller/acs/SensorProcessing.cpp +++ b/mission/controller/acs/SensorProcessing.cpp @@ -180,7 +180,8 @@ void SensorProcessing::processSus( const AcsParameters::SunModelParameters *sunModelParameters, acsctrl::SusDataProcessed *susDataProcessed) { /* -------- Sun Model Direction (IJK frame) ------- */ - double JD2000 = TimeSystems::convertUnixToJD2000(timeAbsolute); + double JD2000 = 0; + Clock::convertTimevalToJD2000(timeAbsolute, &JD2000); // Julean Centuries double sunIjkModel[3] = {0.0, 0.0, 0.0}; diff --git a/mission/controller/acs/SensorProcessing.h b/mission/controller/acs/SensorProcessing.h index e5efba71..baa43117 100644 --- a/mission/controller/acs/SensorProcessing.h +++ b/mission/controller/acs/SensorProcessing.h @@ -4,13 +4,13 @@ #include #include #include -#include #include #include #include #include #include #include +#include #include #include #include