useHeading: Replace the heading for one instrument with the heading for
another
Description
Replace the heading for one instrument with the heading for
another.
Usage
useHeading(b, g, add=0)
Arguments
b
object holding data from an instrument whose heading is
bad, but whose other data are good.
g
object holding data from an instrument whose heading is
good, and should be interpolated to the time base of b.
add
an angle, in degrees counterclockwise, to be added to the
heading.
Value
A copy of b, but with b$data$ts$heading replaced
with an angle that result from linear interpolation of the headings in
g, and then adding the angle add.