GeoMag class

Translate GPS location data to geo-magnetic data such as magnetic declination.

GeoMag takes data from the World Magnetic Model Coefficients, WmmCof, to initialize. You can provide your own or use the bundled data from 2020. Use calculate() to process GPS coordinates into a GeoMagResult.

See http://www.ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml and https://www.ngdc.noaa.gov/geomag/WMM/wmm_rdownload.shtml.

This is a port of the geomagJS package, https://github.com/cmweiss/geomagJS.

Adapted from the geomagc software and World Magnetic Model of the NOAA Satellite and Information Service, National Geophysical Data Center.

Constructors

GeoMag()
factory
GeoMag.fromWmmCof(WmmCof wmmCof)

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

calculate(double lat, double lng, [double heightFeet = 0, DateTime? date]) GeoMagResult
Calculate various geomagnetic values based on your latitude, longitude.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited