hdg_decl: Calculate declination, true heading, and magnetic heading

Description Usage Arguments Value Examples

View source: R/heading.R

Description

For more detailed output, see wmm2020_extract().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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")
)

Arguments

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 is "ellipsoid", this is interpreted as the height above the WGS84 ellipsoid.

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 hdg_norm().

Value

A declination, true heading, or magnetic heading.

Examples

1
2
3
hdg_decl(-64, 45, year = 2021)
hdg_true_from_magnetic(13.40, -64, 45, year = 2021)
hdg_magnetic_from_true(356.51, -64, 45, year = 2021)

paleolimbot/headings documentation built on April 14, 2021, 8:33 a.m.