diff --git a/mission/controller/acs/Igrf13Model.cpp b/mission/controller/acs/Igrf13Model.cpp index 960ab462..63992010 100644 --- a/mission/controller/acs/Igrf13Model.cpp +++ b/mission/controller/acs/Igrf13Model.cpp @@ -82,16 +82,6 @@ void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude, magFieldModel[1] *= -1; magFieldModel[2] *= (-1 / sin(theta)); - // std::cout << " X=" << -magFieldModel[1] << " Y=" << magFieldModel[2] - // << " Z=" << -magFieldModel[0] << std::endl; - - /* Next step: transform into inertial RF (IJK)*/ - // Julean Centuries - // double JD2000Floor = 0; - // double JD2000 = MathOperations::convertUnixToJD2000(timeOfMagMeasurement); - // JD2000Floor = floor(JD2000); - // double JC2000 = JD2000Floor / 36525.; - double JD2000 = MathOperations::convertUnixToJD2000(timeOfMagMeasurement); double UT1 = JD2000 / 36525.; @@ -99,18 +89,7 @@ void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude, 280.46061837 + 360.98564736629 * JD2000 + 0.0003875 * pow(UT1, 2) - 2.6e-8 * pow(UT1, 3); gst = std::fmod(gst, 360.); gst *= PI / 180.; - // std::cout << " GMST=" << gst * 180. / Math::PI << std::endl; - - // double gst = 100.4606184 + 36000.77005361 * JC2000 + 0.00038793 * pow(JC2000, 2) - - // 0.000000026 * pow(JC2000, 3); // greenwich sidereal time - // gst *= PI / 180; // convert to radians - // double sec = - // (JD2000 - JD2000Floor) * 86400; // Seconds on this day (Universal time) // FROM GPS ? - // double omega0 = 0.00007292115; // mean angular velocity earth [rad/s] - // gst += omega0 * sec; - // std::cout << " GMST=" << gst * 180. / Math::PI << std::endl; double lst = gst + longitude; // local sidereal time [rad] - // std::cout << " LMST=" << lst * 180. / Math::PI << std::endl; magFieldModelInertial[0] = (magFieldModel[0] * cos(gcLatitude) + magFieldModel[1] * sin(gcLatitude)) * cos(lst) - @@ -161,22 +140,6 @@ void Igrf13Model::schmidtNormalization() { } } - // for (int n = 1; n <= igrfOrder; n++) { - // for (int m = 0; m <= n; m++) { - // if (m > 1) { - // schmidtFactors[m][n - 1] = schmidtFactors[m - 1][n - 1] * pow((n - m + 1) / (n + m), - // .5); - // } else if (m > 0) { - // schmidtFactors[m][n - 1] = - // schmidtFactors[m - 1][n - 1] * pow(2 * (n - m + 1) / (n + m), .5); - // } else if (n == 1) { - // schmidtFactors[m][n - 1] = 1; - // } else { - // schmidtFactors[m][n - 1] = schmidtFactors[0][n - 2] * (2 * n - 1) / (n); - // } - // } - // } - for (int i = 0; i <= igrfOrder; i++) { for (int j = 0; j <= (igrfOrder - 1); j++) { coeffG[i][j] = schmidtFactors[i][j] * coeffG[i][j]; diff --git a/mission/controller/acs/Igrf13Model.h b/mission/controller/acs/Igrf13Model.h index 7abe97cc..f5cded71 100644 --- a/mission/controller/acs/Igrf13Model.h +++ b/mission/controller/acs/Igrf13Model.h @@ -130,7 +130,6 @@ class Igrf13Model /*:public HasParametersIF*/ { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; ; - bool schmidtNorm = false; double updatedG[14][13]; double updatedH[14][13];