Click or drag to resize

WorldMagneticModelVectorReadFile Method (TextReader)

Reads a WMM file and creates a magnetic field vector from it.

Note that the final block of the InitialMagneticFieldCoefficients and MagneticFieldCoefficientRates will extend indefinitely into the future. Also, note that the units of the magnetic field vector are in tesla, the TargetPoint will still need to be set, and the magnetic field vector will be resolved in the Axes of the PrincipalFrame of Earth as obtained from the current CentralBodiesFacet unless the DefinedInFrame is set. The ReferenceDistance is set to EarthReferenceDistance, which is the official reference distance for the WMM models.

Namespace:  AGI.Foundation.Celestial
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public static WorldMagneticModelVector ReadFile(
	TextReader reader
)

Parameters

reader
Type: System.IOTextReader
TextReader for the .COF file to read.

Return Value

Type: WorldMagneticModelVector
A magnetic field vector corresponding to the WMM model.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when reader passed in is null.
Remarks
See WMM website: https://www.ngdc.noaa.gov/geomag/WMM/soft.shtml. An updated WMM .COF file can be found inside the WMM2020COF.zip download.
See Also