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")
)Vectors of coordinates.
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.
A height above the earth's surface (as approximated
by the EGM9615 geoid) in kilometers. If height_ref is
"ellipsoid", this is interpreted as the height above the
WGS84 ellipsoid.
One of geoid or ellipsoid.
One of IGRF13, WMM2020, or EMM2017.
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 hdg_norm().
A declination, true heading, or magnetic heading.
hdg_decl(-64, 45, year = 2021)
#> [1] -16.88586
hdg_true_from_magnetic(13.40, -64, 45, year = 2021)
#> [1] 356.5141
hdg_magnetic_from_true(356.51, -64, 45, year = 2021)
#> [1] 13.39586