Learn R Programming

oce (version 0.4-1)

heading: Return the header for an Oce data object

Description

Return the header for an oce data object.

Usage

heading(x, time)
pitch(x, time)
roll(x, time)
heading(x) <- value
pitch(x) <- value
roll(x) <- value

Arguments

x
an oce object that contains information on instrument heading, pitch, or roll.
time
optional vector of POSIX times, or object containing times in a field named data$time or data$timeSlow. (If missing, all heading values are returned.)
value
value to assign to the relevant item in the x object.

Value

  • For the retrieval forms, the return value is a vector of angles; otherwise, it is the altered object (normally not stored).

Details

These accessor functions provide a convenient way to discover, or set, the angles recorded by various instruments. This prevents the user from having to know the details of storage, e.g. that Nortek Vector velocimeters record angles on slow timescales compared with velocities (stored in x$data$timeSlow, x$data$headingSlow, etc), whereas Sontek ADV velocimeters record them on the same timescale as velocity (stored in x$data$time, x$data$heading, etc.)

See Also

Similar accessor functions are time, and velocity.

Examples

Run this code
library(oce)
data(adp)
print(heading(adp))
heading(adp) <- 5 + heading(adp) # add 5 degrees to the heading
print(heading(adp))

Run the code above in your browser using DataLab