geo_mag

GeoMagnetic field vector. Calculation of the normalized geomagnetic field vector at startup as soon as a valid location is aquired. The result is published via the GEO_MAG ABI message. The AHRS algorithms need to know the magnetic field vector at the current position in order to accurately calculate the heading. Method uses is based on the the ngdc noaa DODWMM model and data (http://www.ngdc.noaa.gov/geomag/WMM/DoDWMM.shtml). The WMM is based on earth magnetic field measuring at an high number of sites on the whole globe and on its mathematical representation through a series of characteristic values listed in a file (WMM.COF) which has a five-year validity. The autopilot used data derived from this file to make the complex calculation of declination. Every 5 years (2015, 2020) an updated geomagnetic model is released and datatables in the code must be updated accordingly for more accurate flight.