noelex / GeographicLib.NET

A native .NET implementation of GeographicLib written in pure C#.
https://geographiclib.sourceforge.io/
MIT License
32 stars 3 forks source link

WMM Version 2 Files #17

Closed mmickael closed 2 years ago

mmickael commented 2 years ago

I used the package successfully with different gravity and magnetic models. However, when I use a magnetic model with file formation version 2, I get an exception of Unknown Version.

Examples of the version 2 format is emm2015 and emm2017.

This is the emm2017.wmm file


WMMF-2

A World Magnetic Model (Format 2) file. For documentation on the

format of this file see

https://geographiclib.sourceforge.io/html/magnetic.html#magneticformat

Name emm2017 Description Enhanced Magnetic Model 2017 URL https://ngdc.noaa.gov/geomag/EMM/index.html Publisher National Oceanic and Atmospheric Administration ReleaseDate 2017-07-05 ConversionDate 2017-07-30 DataVersion 1 Radius 6371200 NumModels 18 NumConstants 1 Epoch 2000 DeltaEpoch 1 MinTime 2000 MaxTime 2022 MinHeight -20000 MaxHeight 10000000

The coefficients are stored in a file obtained by appending ".cof" to

the name of this file. The coefficients were obtained from

EMM2000.COF thru EMM2017.COF and EMM2017SV.COF in the EMM2017 distribution.

ID EMM2017A


noelex commented 2 years ago

Looks like I forgot to add version 2 into the version check. You should be able to try out in the pre-release build later.

mmickael commented 2 years ago

Thank you

noelex commented 2 years ago

Fixed in v1.52.1.