For more detailed output, see wmm2020_extract()
.
hdg_decl( lon, lat, year, height = 0, height_ref = c("geoid", "ellipsoid"), model = c("IGRF13", "WMM2020", "EMM2017") ) hdg_true_from_magnetic( hdg, lon, lat, year, height = 0, height_ref = c("geoid", "ellipsoid"), model = c("IGRF13", "WMM2020", "EMM2017") ) hdg_magnetic_from_true( hdg, lon, lat, year, height = 0, height_ref = c("geoid", "ellipsoid"), model = c("IGRF13", "WMM2020", "EMM2017") )
lon | Vectors of coordinates. |
---|---|
lat | Vectors of coordinates. |
year | A decimal year (e.g., 2020.2120). The World Magnetic Model is valid between 2020.0 and 2025.0; the Enhanced Magnetic Model is valid between 2000.0 and 2022.0. |
height | A height above the earth's surface (as approximated
by the EGM9615 geoid) in kilometers. If |
height_ref | One of geoid or ellipsoid. |
model | One of IGRF13, WMM2020, or EMM2017. |
hdg | A heading in degrees, where 0 is north,
90 is east, 180 is south, and 270 is west. Values
outside the range [0-360) are coerced to this range
using |
A declination, true heading, or magnetic heading.
hdg_decl(-64, 45, year = 2021)#> [1] -16.88586hdg_true_from_magnetic(13.40, -64, 45, year = 2021)#> [1] 356.5141hdg_magnetic_from_true(356.51, -64, 45, year = 2021)#> [1] 13.39586