Description Usage Arguments Details Value
Calculates the magnetic declination for a given latitude, longitude and height.
1 |
lat |
Latitude (North is positive) |
lon |
Longitude (East is positive) |
h |
Height, in feet |
date |
Date (as a Date object). Defaults to current date. |
This function uses the NIMA WMM2005 (World Magnetic Model). This is the exact same algorithm that FlightGear (via the SimGear library) uses, and in fact magvar
is a port of the corresponding SimGear C++ function: https://github.com/FlightGear/simgear/blob/next/simgear/magvar/coremag.cxx
Returns the magnetic declination (in degrees) for the specified latitude, longitude and height.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.