Estimate magnetic declination at a site

Description

Estimate the correction between magnetic north and true north for the location and date of a field survey.

Usage

mag.dec(loc, date)

Arguments

loc

Latitude and longitude in degrees as a vector, matrix or data frame with one row per site, or a horizon object. An optional third column gives elevation.

date

One or more survey dates as Date objects or YYYY/MM/DD strings.

Details

Compass reduction depends on when and where the reading was taken. The function evaluates IGRF-14 through oce at sea level and returns east-positive declination. Supply a single site for several dates, a single date for several sites, or one date per site. Results follow input order. Other size combinations raise an error. The calendar date is converted to a decimal year using the actual length of that year at midnight UTC. Supported dates run from 1 January 1900 through 1 January 2030 inclusive. Site elevation is ignored by this model call.

Value

Numeric magnetic declination in degrees. Use it as the correction added to a magnetic bearing in reduct.compass.

Scientific validation

F01 examines magnetic and solar reductions against independent references. F01 scientific validation.

Scientific checks

References

Kelley, D. and Richards, C. oce: magneticField. https://dankelley.github.io/oce/reference/magneticField.html.

See Also

magneticField, reduct.compass

Examples

# Magnetic Declination for London on April 1st 2016:
loc <- c( 51.5074, -0.1278 )
mag.dec( loc, "2016/04/01" )
mag.dec(c(40, -8), c("2010/01/01", "2026/01/01"))