Igrf13Model cleanup

This commit is contained in:
Marius Eggert 2022-12-12 14:30:42 +01:00
parent f35c42aead
commit 5fe3ac09a5
2 changed files with 0 additions and 38 deletions

View File

@ -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<double>::convertUnixToJD2000(timeOfMagMeasurement);
// JD2000Floor = floor(JD2000);
// double JC2000 = JD2000Floor / 36525.;
double JD2000 = MathOperations<double>::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];

View File

@ -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];