magvar: Calculate magnetic declination for a given coordinates

Description Usage Arguments Details Value

Description

Calculates the magnetic declination for a given latitude, longitude and height.

Usage

1
magvar(lat, lon, h = 0, date = Sys.Date())

Arguments

lat

Latitude (North is positive)

lon

Longitude (East is positive)

h

Height, in feet

date

Date (as a Date object). Defaults to current date.

Details

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

Value

Returns the magnetic declination (in degrees) for the specified latitude, longitude and height.


thlytras/rfgfs documentation built on May 31, 2019, 10:44 a.m.