Frame for GeoMagneticElements

Dear all,

I am using the IGRF2015 model in Orekit to check our own implementation of IGRF12. I got the data file from here:
It works, the method GeoMagneticField.getModelName() returns ‘IGRF2015’.

However, I am not sure in which frame the magnetic field vector is returned when calling the method GeoMagneticElements.getFieldVector(). In the unit test at, the implementation is compared to reference data from, which would be in North-East-Down frame.
I tried both the TOD frame and a TopocentricFrame defined on the GeodeticPoint used to compute the magnetic field vector, but I am not sure which one I have to use.

Thank you,
Best regards
Clément Jonglez

Neither TOD not Topocentric frame are correct, but Topocentric frame is almost good.
The coordinates are really in North-East-Down frame but TopocentricFrame is East-North-Zenith.
So you can use Topocentric frame if you exchange the coordinates as follows:

   Vector3D fieldInNED = geomagneticElements.getFieldVector();
   Vector3D fieldInTopo = new Vector3D(fieldInNED.getY(),

It works now when converting from NED as you described, thank you.

Clément Jonglez