The supplied angles specify rotations to be made around the
axes for heading, pitch, and roll. Think of this as addition. For
example, an object d
storing current of speed U
running
from southwest to northeast has equal and positive eastward and
northward components in enu coordinates, so setting heading=45
yields horizontal components d$data$ma$v[,1,]=U
and
d$data$ma$v[,2,]=0
, leaving vertical component
d$data$ma$v[,3,]
unaltered. Note that the stored values for heading, pitch, and roll are
not altered. These values refer the instrument orientation,
not to the values of the corresponding arguments supplied to the
present function.
The code is similar to that used by adp.xyz2enu
,
but in the present case the signs of pitch
and roll
are
obeyed, regardless of whether the instrument points up or down,
because enu coordinates already account for instrument alignment.