applyMagneticDeclination-adv-method: Alter an adv Object to Account for Magnetic Declination

applyMagneticDeclination,adv-methodR Documentation

Alter an adv Object to Account for Magnetic Declination

Description

Acoustic-Doppler velocimetry instruments that infer direction using magnetic compasses need to have a correction applied for magnetic declination, if the goal is to infer currents with x and y oriented eastward and northward, respectively. This is what the present function does (see “Details”).

Usage

## S4 method for signature 'adv'
applyMagneticDeclination(
  object = "oce",
  declination = 0,
  debug = getOption("oceDebug")
)

Arguments

object

an adv object.

declination

numeric value holding magnetic declination in degrees, positive for clockwise from north.

debug

an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many oce functions. Generally, setting debug=0 turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of debug first, so that a user can often obtain deeper debugging by specifying higher debug values.

Details

The returned value is a copy of object that has been modified in 4 ways. (1) the horizontal components of velocity are rotated clockwise by declination degrees. (2) If the object holds heading values, then declination is added to them. (3) The north item in the metadata slot is set to "geographic", and a warning is issued if this was also the value in object. (4) The declination item in the metadata slot is set to the value supplied to this function.

Value

A adv object, adjusted as outlined in “Details”.

Author(s)

Dan Kelley, aided by Clark Richards and Jaimie Harbin.

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: applyMagneticDeclination(), applyMagneticDeclination,adp-method, applyMagneticDeclination,cm-method, applyMagneticDeclination,oce-method, magneticField()

Other things related to adv data: [[,adv-method, [[<-,adv-method, adv, adv-class, advSontekAdrFileTrim(), beamName(), beamToXyz(), enuToOther(), enuToOtherAdv(), plot,adv-method, read.adv(), read.adv.nortek(), read.adv.sontek.adr(), read.adv.sontek.serial(), read.adv.sontek.text(), rotateAboutZ(), subset,adv-method, summary,adv-method, toEnu(), toEnuAdv(), velocityStatistics(), xyzToEnu(), xyzToEnuAdv()


oce documentation built on Sept. 11, 2024, 7:09 p.m.