1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-28 06:24:10 +01:00

Merged in f5soh/librepilot/LP-607_world_mag_model_2015v2 (pull request #526)

LP-607 Update to WMM-2015v2

Approved-by: Lalanne Laurent <f5soh@free.fr>
Approved-by: Alessio Morale <alessiomorale@gmail.com>
This commit is contained in:
Lalanne Laurent 2019-02-21 21:45:41 +00:00
commit 1ea6a3d0f9
2 changed files with 185 additions and 184 deletions

View File

@ -2,7 +2,7 @@
******************************************************************************
*
* @file WorldMagModel.c
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2019.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Source file for the World Magnetic Model
* This is a port of code available from the US NOAA.
@ -61,96 +61,96 @@
// first column not used but it will be optimized out by compiler
static const float CoeffFile[91][6] = {
{ 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f },
{ 1.0f, 0.0f, -29438.5f, 0.0f, 10.7f, 0.0f },
{ 1.0f, 1.0f, -1501.1f, 4796.2f, 17.9f, -26.8f },
{ 2.0f, 0.0f, -2445.3f, 0.0f, -8.6f, 0.0f },
{ 2.0f, 1.0f, 3012.5f, -2845.6f, -3.3f, -27.1f },
{ 2.0f, 2.0f, 1676.6f, -642.0f, 2.4f, -13.3f },
{ 3.0f, 0.0f, 1351.1f, 0.0f, 3.1f, 0.0f },
{ 3.0f, 1.0f, -2352.3f, -115.3f, -6.2f, 8.4f },
{ 3.0f, 2.0f, 1225.6f, 245.0f, -0.4f, -0.4f },
{ 3.0f, 3.0f, 581.9f, -538.3f, -10.4f, 2.3f },
{ 4.0f, 0.0f, 907.2f, 0.0f, -0.4f, 0.0f },
{ 4.0f, 1.0f, 813.7f, 283.4f, 0.8f, -0.6f },
{ 4.0f, 2.0f, 120.3f, -188.6f, -9.2f, 5.3f },
{ 4.0f, 3.0f, -335.0f, 180.9f, 4.0f, 3.0f },
{ 4.0f, 4.0f, 70.3f, -329.5f, -4.2f, -5.3f },
{ 5.0f, 0.0f, -232.6f, 0.0f, -0.2f, 0.0f },
{ 5.0f, 1.0f, 360.1f, 47.4f, 0.1f, 0.4f },
{ 5.0f, 2.0f, 192.4f, 196.9f, -1.4f, 1.6f },
{ 5.0f, 3.0f, -141.0f, -119.4f, 0.0f, -1.1f },
{ 5.0f, 4.0f, -157.4f, 16.1f, 1.3f, 3.3f },
{ 5.0f, 5.0f, 4.3f, 100.1f, 3.8f, 0.1f },
{ 6.0f, 0.0f, 69.5f, 0.0f, -0.5f, 0.0f },
{ 6.0f, 1.0f, 67.4f, -20.7f, -0.2f, 0.0f },
{ 6.0f, 2.0f, 72.8f, 33.2f, -0.6f, -2.2f },
{ 6.0f, 3.0f, -129.8f, 58.8f, 2.4f, -0.7f },
{ 6.0f, 4.0f, -29.0f, -66.5f, -1.1f, 0.1f },
{ 6.0f, 5.0f, 13.2f, 7.3f, 0.3f, 1.0f },
{ 6.0f, 6.0f, -70.9f, 62.5f, 1.5f, 1.3f },
{ 7.0f, 0.0f, 81.6f, 0.0f, 0.2f, 0.0f },
{ 7.0f, 1.0f, -76.1f, -54.1f, -0.2f, 0.7f },
{ 7.0f, 2.0f, -6.8f, -19.4f, -0.4f, 0.5f },
{ 7.0f, 3.0f, 51.9f, 5.6f, 1.3f, -0.2f },
{ 7.0f, 4.0f, 15.0f, 24.4f, 0.2f, -0.1f },
{ 7.0f, 5.0f, 9.3f, 3.3f, -0.4f, -0.7f },
{ 7.0f, 6.0f, -2.8f, -27.5f, -0.9f, 0.1f },
{ 7.0f, 7.0f, 6.7f, -2.3f, 0.3f, 0.1f },
{ 8.0f, 0.0f, 24.0f, 0.0f, 0.0f, 0.0f },
{ 8.0f, 1.0f, 8.6f, 10.2f, 0.1f, -0.3f },
{ 8.0f, 2.0f, -16.9f, -18.1f, -0.5f, 0.3f },
{ 8.0f, 3.0f, -3.2f, 13.2f, 0.5f, 0.3f },
{ 8.0f, 4.0f, -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, 0.0f, 0.0f },
{ 11.0f, 1.0f, -1.5f, -0.1f, 0.0f, 0.0f },
{ 11.0f, 2.0f, -2.3f, 2.1f, -0.1f, 0.1f },
{ 11.0f, 3.0f, 2.1f, -0.7f, 0.1f, 0.0f },
{ 11.0f, 4.0f, -0.9f, -1.1f, 0.0f, 0.1f },
{ 11.0f, 5.0f, 0.6f, 0.7f, 0.0f, 0.0f },
{ 11.0f, 6.0f, -0.7f, -0.2f, 0.0f, 0.0f },
{ 11.0f, 7.0f, 0.2f, -2.1f, 0.0f, 0.1f },
{ 11.0f, 8.0f, 1.7f, -1.5f, 0.0f, 0.0f },
{ 11.0f, 9.0f, -0.2f, -2.5f, 0.0f, -0.1f },
{ 11.0f, 10.0f, 0.4f, -2.0f, -0.1f, 0.0f },
{ 1.0f, 0.0f, -29438.2f, 0.0f, 7.0f, 0.0f },
{ 1.0f, 1.0f, -1493.5f, 4796.3f, 9.0f, -30.2f },
{ 2.0f, 0.0f, -2444.5f, 0.0f, -11.0f, 0.0f },
{ 2.0f, 1.0f, 3014.7f, -2842.4f, -6.2f, -29.6f },
{ 2.0f, 2.0f, 1679.0f, -638.8f, 0.3f, -17.3f },
{ 3.0f, 0.0f, 1351.8f, 0.0f, 2.4f, 0.0f },
{ 3.0f, 1.0f, -2351.6f, -113.7f, -5.7f, 6.5f },
{ 3.0f, 2.0f, 1223.6f, 246.5f, 2.0f, -0.8f },
{ 3.0f, 3.0f, 582.3f, -537.4f, -11.0f, -2.0f },
{ 4.0f, 0.0f, 907.5f, 0.0f, -0.8f, 0.0f },
{ 4.0f, 1.0f, 814.8f, 283.3f, -0.9f, -0.4f },
{ 4.0f, 2.0f, 117.8f, -188.6f, -6.5f, 5.8f },
{ 4.0f, 3.0f, -335.6f, 180.7f, 5.2f, 3.8f },
{ 4.0f, 4.0f, 69.7f, -330.0f, -4.0f, -3.5f },
{ 5.0f, 0.0f, -232.9f, 0.0f, -0.3f, 0.0f },
{ 5.0f, 1.0f, 360.1f, 46.9f, 0.6f, 0.2f },
{ 5.0f, 2.0f, 191.7f, 196.5f, -0.8f, 2.3f },
{ 5.0f, 3.0f, -141.3f, -119.9f, 0.1f, -0.0f },
{ 5.0f, 4.0f, -157.2f, 16.0f, 1.2f, 3.3f },
{ 5.0f, 5.0f, 7.7f, 100.6f, 1.4f, -0.6f },
{ 6.0f, 0.0f, 69.4f, 0.0f, -0.8f, 0.0f },
{ 6.0f, 1.0f, 67.7f, -20.1f, -0.5f, 0.3f },
{ 6.0f, 2.0f, 72.3f, 32.8f, -0.1f, -1.5f },
{ 6.0f, 3.0f, -129.1f, 59.1f, 1.6f, -1.2f },
{ 6.0f, 4.0f, -28.4f, -67.1f, -1.6f, 0.4f },
{ 6.0f, 5.0f, 13.6f, 8.1f, 0.0f, 0.2f },
{ 6.0f, 6.0f, -70.3f, 61.9f, 1.2f, 1.3f },
{ 7.0f, 0.0f, 81.7f, 0.0f, -0.3f, 0.0f },
{ 7.0f, 1.0f, -75.9f, -54.3f, -0.2f, 0.6f },
{ 7.0f, 2.0f, -7.1f, -19.5f, -0.3f, 0.5f },
{ 7.0f, 3.0f, 52.2f, 6.0f, 0.9f, -0.8f },
{ 7.0f, 4.0f, 15.0f, 24.5f, 0.1f, -0.2f },
{ 7.0f, 5.0f, 9.1f, 3.5f, -0.6f, -1.1f },
{ 7.0f, 6.0f, -3.0f, -27.7f, -0.9f, 0.1f },
{ 7.0f, 7.0f, 5.9f, -2.9f, 0.7f, 0.2f },
{ 8.0f, 0.0f, 24.2f, 0.0f, -0.1f, 0.0f },
{ 8.0f, 1.0f, 8.9f, 10.1f, 0.2f, -0.4f },
{ 8.0f, 2.0f, -16.9f, -18.3f, -0.2f, 0.6f },
{ 8.0f, 3.0f, -3.1f, 13.3f, 0.5f, -0.1f },
{ 8.0f, 4.0f, -20.7f, -14.5f, -0.1f, 0.6f },
{ 8.0f, 5.0f, 13.3f, 16.2f, 0.4f, -0.2f },
{ 8.0f, 6.0f, 11.6f, 6.0f, 0.4f, -0.5f },
{ 8.0f, 7.0f, -16.3f, -9.2f, -0.1f, 0.5f },
{ 8.0f, 8.0f, -2.1f, 2.4f, 0.4f, 0.1f },
{ 9.0f, 0.0f, 5.5f, 0.0f, -0.1f, 0.0f },
{ 9.0f, 1.0f, 8.8f, -21.8f, -0.1f, -0.3f },
{ 9.0f, 2.0f, 3.0f, 10.7f, -0.0f, 0.1f },
{ 9.0f, 3.0f, -3.2f, 11.8f, 0.4f, -0.4f },
{ 9.0f, 4.0f, 0.6f, -6.8f, -0.4f, 0.3f },
{ 9.0f, 5.0f, -13.2f, -6.9f, 0.0f, 0.1f },
{ 9.0f, 6.0f, -0.1f, 7.9f, 0.3f, -0.0f },
{ 9.0f, 7.0f, 8.7f, 1.0f, 0.0f, -0.1f },
{ 9.0f, 8.0f, -9.1f, -3.9f, -0.0f, 0.5f },
{ 9.0f, 9.0f, -10.4f, 8.5f, -0.3f, 0.2f },
{ 10.0f, 0.0f, -2.0f, 0.0f, 0.0f, 0.0f },
{ 10.0f, 1.0f, -6.1f, 3.3f, -0.0f, 0.0f },
{ 10.0f, 2.0f, 0.2f, -0.4f, -0.1f, 0.1f },
{ 10.0f, 3.0f, 0.6f, 4.6f, 0.2f, -0.2f },
{ 10.0f, 4.0f, -0.5f, 4.4f, -0.1f, 0.1f },
{ 10.0f, 5.0f, 1.8f, -7.9f, -0.2f, -0.1f },
{ 10.0f, 6.0f, -0.7f, -0.6f, -0.0f, 0.1f },
{ 10.0f, 7.0f, 2.2f, -4.2f, -0.1f, -0.0f },
{ 10.0f, 8.0f, 2.4f, -2.9f, -0.2f, -0.1f },
{ 10.0f, 9.0f, -1.8f, -1.1f, -0.1f, 0.2f },
{ 10.0f, 10.0f, -3.6f, -8.8f, -0.0f, -0.0f },
{ 11.0f, 0.0f, 3.0f, 0.0f, -0.0f, 0.0f },
{ 11.0f, 1.0f, -1.4f, -0.0f, 0.0f, 0.0f },
{ 11.0f, 2.0f, -2.3f, 2.1f, -0.0f, 0.1f },
{ 11.0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.4f, 0.2f, 0.0f, 0.0f },
{ 12.0f, 10.0f, 0.2f, -0.9f, 0.0f, 0.0f },
{ 12.0f, 11.0f, -0.9f, -0.2f, 0.0f, 0.0f },
{ 12.0f, 12.0f, 0.0f, 0.7f, 0.0f, 0.0f }
{ 12.0f, 9.0f, -0.5f, 0.2f, -0.0f, 0.0f },
{ 12.0f, 10.0f, 0.2f, -0.9f, -0.0f, -0.0f },
{ 12.0f, 11.0f, -0.9f, -0.2f, -0.0f, 0.0f },
{ 12.0f, 12.0f, -0.0f, 0.8f, -0.1f, -0.1f }
};
static WMMtype_Ellipsoid *Ellip = NULL;
@ -194,7 +194,7 @@ int WMM_Initialize()
// Really, Really needs to be read from a file - out of date in 2020 at latest
MagneticModel->EditionDate = 0.0f; /* OP change. Originally 5.7863328170559505e-307, truncates to 0.0f */
MagneticModel->epoch = 2015.0f;
sprintf(MagneticModel->ModelName, "WMM-2015");
sprintf(MagneticModel->ModelName, "WMM-2015v2");
return 0; // OK
}

View File

@ -2,14 +2,15 @@
******************************************************************************
*
* @file worldmagmodel.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2019.
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Utilities to find the location of openpilot GCS files:
* - Plugins Share directory path
*
* @brief Source file for the World Magnetic Model
* This is a port of code available from the US NOAA.
*
* The hard coded coefficients should be valid until 2015.
* The hard coded coefficients should be valid until 2020.
*
* Updated coeffs from ..
* http://www.ngdc.noaa.gov/geomag/WMM/wmm_ddownload.shtml
@ -55,96 +56,96 @@
// updated coeffs available from http://www.ngdc.noaa.gov/geomag/WMM/wmm_ddownload.shtml
const double CoeffFile[91][6] = {
{ 0, 0, 0, 0, 0, 0 },
{ 1, 0, -29496.6, 0.0, 11.6, 0.0 },
{ 1, 1, -1586.3, 4944.4, 16.5, -25.9 },
{ 2, 0, -2396.6, 0.0, -12.1, 0.0 },
{ 2, 1, 3026.1, -2707.7, -4.4, -22.5 },
{ 2, 2, 1668.6, -576.1, 1.9, -11.8 },
{ 3, 0, 1340.1, 0.0, 0.4, 0.0 },
{ 3, 1, -2326.2, -160.2, -4.1, 7.3 },
{ 3, 2, 1231.9, 251.9, -2.9, -3.9 },
{ 3, 3, 634.0, -536.6, -7.7, -2.6 },
{ 4, 0, 912.6, 0.0, -1.8, 0.0 },
{ 4, 1, 808.9, 286.4, 2.3, 1.1 },
{ 4, 2, 166.7, -211.2, -8.7, 2.7 },
{ 4, 3, -357.1, 164.3, 4.6, 3.9 },
{ 4, 4, 89.4, -309.1, -2.1, -0.8 },
{ 5, 0, -230.9, 0.0, -1.0, 0.0 },
{ 5, 1, 357.2, 44.6, 0.6, 0.4 },
{ 5, 2, 200.3, 188.9, -1.8, 1.8 },
{ 5, 3, -141.1, -118.2, -1.0, 1.2 },
{ 5, 4, -163.0, 0.0, 0.9, 4.0 },
{ 5, 5, -7.8, 100.9, 1.0, -0.6 },
{ 6, 0, 72.8, 0.0, -0.2, 0.0 },
{ 6, 1, 68.6, -20.8, -0.2, -0.2 },
{ 6, 2, 76.0, 44.1, -0.1, -2.1 },
{ 6, 3, -141.4, 61.5, 2.0, -0.4 },
{ 6, 4, -22.8, -66.3, -1.7, -0.6 },
{ 6, 5, 13.2, 3.1, -0.3, 0.5 },
{ 6, 6, -77.9, 55.0, 1.7, 0.9 },
{ 7, 0, 80.5, 0.0, 0.1, 0.0 },
{ 7, 1, -75.1, -57.9, -0.1, 0.7 },
{ 7, 2, -4.7, -21.1, -0.6, 0.3 },
{ 7, 3, 45.3, 6.5, 1.3, -0.1 },
{ 7, 4, 13.9, 24.9, 0.4, -0.1 },
{ 7, 5, 10.4, 7.0, 0.3, -0.8 },
{ 7, 6, 1.7, -27.7, -0.7, -0.3 },
{ 7, 7, 4.9, -3.3, 0.6, 0.3 },
{ 8, 0, 24.4, 0.0, -0.1, 0.0 },
{ 8, 1, 8.1, 11.0, 0.1, -0.1 },
{ 8, 2, -14.5, -20.0, -0.6, 0.2 },
{ 8, 3, -5.6, 11.9, 0.2, 0.4 },
{ 8, 4, -19.3, -17.4, -0.2, 0.4 },
{ 8, 5, 11.5, 16.7, 0.3, 0.1 },
{ 8, 6, 10.9, 7.0, 0.3, -0.1 },
{ 8, 7, -14.1, -10.8, -0.6, 0.4 },
{ 8, 8, -3.7, 1.7, 0.2, 0.3 },
{ 9, 0, 5.4, 0.0, 0.0, 0.0 },
{ 9, 1, 9.4, -20.5, -0.1, 0.0 },
{ 9, 2, 3.4, 11.5, 0.0, -0.2 },
{ 9, 3, -5.2, 12.8, 0.3, 0.0 },
{ 9, 4, 3.1, -7.2, -0.4, -0.1 },
{ 9, 5, -12.4, -7.4, -0.3, 0.1 },
{ 9, 6, -0.7, 8.0, 0.1, 0.0 },
{ 9, 7, 8.4, 2.1, -0.1, -0.2 },
{ 9, 8, -8.5, -6.1, -0.4, 0.3 },
{ 9, 9, -10.1, 7.0, -0.2, 0.2 },
{ 1, 0, -29438.2, 0.0, 7.0, 0.0 },
{ 1, 1, -1493.5, 4796.3, 9.0, -30.2 },
{ 2, 0, -2444.5, 0.0, -11.0, 0.0 },
{ 2, 1, 3014.7, -2842.4, -6.2, -29.6 },
{ 2, 2, 1679.0, -638.8, 0.3, -17.3 },
{ 3, 0, 1351.8, 0.0, 2.4, 0.0 },
{ 3, 1, -2351.6, -113.7, -5.7, 6.5 },
{ 3, 2, 1223.6, 246.5, 2.0, -0.8 },
{ 3, 3, 582.3, -537.4, -11.0, -2.0 },
{ 4, 0, 907.5, 0.0, -0.8, 0.0 },
{ 4, 1, 814.8, 283.3, -0.9, -0.4 },
{ 4, 2, 117.8, -188.6, -6.5, 5.8 },
{ 4, 3, -335.6, 180.7, 5.2, 3.8 },
{ 4, 4, 69.7, -330.0, -4.0, -3.5 },
{ 5, 0, -232.9, 0.0, -0.3, 0.0 },
{ 5, 1, 360.1, 46.9, 0.6, 0.2 },
{ 5, 2, 191.7, 196.5, -0.8, 2.3 },
{ 5, 3, -141.3, -119.9, 0.1, -0.0 },
{ 5, 4, -157.2, 16.0, 1.2, 3.3 },
{ 5, 5, 7.7, 100.6, 1.4, -0.6 },
{ 6, 0, 69.4, 0.0, -0.8, 0.0 },
{ 6, 1, 67.7, -20.1, -0.5, 0.3 },
{ 6, 2, 72.3, 32.8, -0.1, -1.5 },
{ 6, 3, -129.1, 59.1, 1.6, -1.2 },
{ 6, 4, -28.4, -67.1, -1.6, 0.4 },
{ 6, 5, 13.6, 8.1, 0.0, 0.2 },
{ 6, 6, -70.3, 61.9, 1.2, 1.3 },
{ 7, 0, 81.7, 0.0, -0.3, 0.0 },
{ 7, 1, -75.9, -54.3, -0.2, 0.6 },
{ 7, 2, -7.1, -19.5, -0.3, 0.5 },
{ 7, 3, 52.2, 6.0, 0.9, -0.8 },
{ 7, 4, 15.0, 24.5, 0.1, -0.2 },
{ 7, 5, 9.1, 3.5, -0.6, -1.1 },
{ 7, 6, -3.0, -27.7, -0.9, 0.1 },
{ 7, 7, 5.9, -2.9, 0.7, 0.2 },
{ 8, 0, 24.2, 0.0, -0.1, 0.0 },
{ 8, 1, 8.9, 10.1, 0.2, -0.4 },
{ 8, 2, -16.9, -18.3, -0.2, 0.6 },
{ 8, 3, -3.1, 13.3, 0.5, -0.1 },
{ 8, 4, -20.7, -14.5, -0.1, 0.6 },
{ 8, 5, 13.3, 16.2, 0.4, -0.2 },
{ 8, 6, 11.6, 6.0, 0.4, -0.5 },
{ 8, 7, -16.3, -9.2, -0.1, 0.5 },
{ 8, 8, -2.1, 2.4, 0.4, 0.1 },
{ 9, 0, 5.5, 0.0, -0.1, 0.0 },
{ 9, 1, 8.8, -21.8, -0.1, -0.3 },
{ 9, 2, 3.0, 10.7, -0.0, 0.1 },
{ 9, 3, -3.2, 11.8, 0.4, -0.4 },
{ 9, 4, 0.6, -6.8, -0.4, 0.3 },
{ 9, 5, -13.2, -6.9, 0.0, 0.1 },
{ 9, 6, -0.1, 7.9, 0.3, -0.0 },
{ 9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-0.4, 0.1, 0.0, 0.0 },
{ 12, 9, -0.4, 0.3, 0.0, 0.0 },
{ 12, 10, 0.2, -0.9, 0.0, 0.0 },
{ 12, 11, -0.8, -0.2, -0.1, 0.0 },
{ 12, 12, 0.0, 0.9, 0.1, 0.0 }
{ 10, 1, -6.1, 3.3, -0.0, 0.0 },
{ 10, 2, 0.2, -0.4, -0.1, 0.1 },
{ 10, 3, 0.6, 4.6, 0.2, -0.2 },
{ 10, 4, -0.5, 4.4, -0.1, 0.1 },
{ 10, 5, 1.8, -7.9, -0.2, -0.1 },
{ 10, 6, -0.7, -0.6, -0.0, 0.1 },
{ 10, 7, 2.2, -4.2, -0.1, -0.0 },
{ 10, 8, 2.4, -2.9, -0.2, -0.1 },
{ 10, 9, -1.8, -1.1, -0.1, 0.2 },
{ 10, 10, -3.6, -8.8, -0.0, -0.0 },
{ 11, 0, 3.0, 0.0, -0.0, 0.0 },
{ 11, 1, -1.4, -0.0, 0.0, 0.0 },
{ 11, 2, -2.3, 2.1, -0.0, 0.1 },
{ 11, 3, 2.1, -0.6, 0.0, 0.0 },
{ 11, 4, -0.8, -1.1, -0.0, 0.1 },
{ 11, 5, 0.6, 0.7, -0.1, -0.0 },
{ 11, 6, -0.7, -0.2, 0.0, -0.0 },
{ 11, 7, 0.1, -2.1, -0.0, 0.1 },
{ 11, 8, 1.7, -1.5, -0.0, -0.0 },
{ 11, 9, -0.2, -2.6, -0.1, -0.1 },
{ 11, 10, 0.4, -2.0, -0.0, -0.0 },
{ 11, 11, 3.5, -2.3, -0.1, -0.1 },
{ 12, 0, -2.0, 0.0, 0.0, 0.0 },
{ 12, 1, -0.1, -1.0, 0.0, -0.0 },
{ 12, 2, 0.5, 0.3, -0.0, 0.0 },
{ 12, 3, 1.2, 1.8, 0.0, -0.1 },
{ 12, 4, -0.9, -2.2, -0.1, 0.1 },
{ 12, 5, 0.9, 0.3, -0.0, -0.0 },
{ 12, 6, 0.1, 0.7, 0.0, 0.0 },
{ 12, 7, 0.6, -0.1, -0.0, -0.0 },
{ 12, 8, -0.4, 0.3, 0.0, 0.0 },
{ 12, 9, -0.5, 0.2, -0.0, 0.0 },
{ 12, 10, 0.2, -0.9, -0.0, -0.0 },
{ 12, 11, -0.9, -0.2, -0.0, 0.0 },
{ 12, 12, -0.0, 0.8, -0.1, -0.1 }
};
namespace Utils {
@ -232,10 +233,10 @@ void WorldMagModel::Initialize()
MagneticModel.nMaxSecVar = WMM_MAX_SECULAR_VARIATION_MODEL_DEGREES;
MagneticModel.SecularVariationUsed = 0;
// Really, Really needs to be read from a file - out of date in 2015 at latest
// Really, Really needs to be read from a file - out of date in 2020 at latest
MagneticModel.EditionDate = 5.7863328170559505e-307;
MagneticModel.epoch = 2010.0;
sprintf(MagneticModel.ModelName, "WMM-2010");
MagneticModel.epoch = 2015.0;
sprintf(MagneticModel.ModelName, "WMM-2015v2");
}