applyMagneticDeclination: Earth magnetic declination

Description Usage Arguments Value Author(s) References See Also


Instruments that use magnetic compasses to determine current direction need to have corrections applied for magnetic declination, to get currents with the y component oriented to geographic, not magnetic, north. Sometimes, and for some instruments, the declination is specified when the instrument is set up, so that the velocities as recorded are already. Other times, the data need to be adjusted. This function is for the latter case.


applyMagneticDeclination(x, declination = 0, debug = getOption("oceDebug"))



an oce object.


magnetic declination (to be added to the heading)


a debugging flag, set to a positive value to get debugging.


Object, with velocity components adjusted to be aligned with geographic north and east.


Dan Kelley


See Also

Use magneticField to determine the declination, inclination and intensity at a given spot on the world, at a given time.

Other things related to magnetism: magneticField

Search within the oce package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.