Attitude relative to the parent frame, a quaternion [x, y, z, w] (normalized here; overridden by a followed trajectory).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ReferenceFrame), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | q(4) |
attitude quaternion [x, y, z, w] (normalized here) |
subroutine set_attitude(self, q) class(ReferenceFrame), intent(inout) :: self real(wp), intent(in) :: q(4) !! attitude quaternion [x, y, z, w] (normalized here) real(wp) :: qn(4) qn = quat_normalize(q) if (any(qn /= self%attitude_)) self%stamp_ = next_motion_stamp() self%attitude_ = qn end subroutine set_attitude