Add an attitude quaternion [x, y, z, w] for the next time that has none.
ok is false if every time already has an attitude.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(inout) | :: | self | |||
| real(kind=wp), | intent(in) | :: | q(4) |
quaternion [x, y, z, w] |
||
| logical, | intent(out), | optional | :: | ok |
false if not added |
subroutine add_attitude(self, q, ok) class(Trajectory), intent(inout) :: self real(wp), intent(in) :: q(4) !! quaternion [x, y, z, w] logical, intent(out), optional :: ok !! false if not added if (present(ok)) ok = .false. if (self%n_att >= self%n_times) return call grow_attitudes(self, self%n_att + 1) self%n_att = self%n_att + 1 self%att(:, self%n_att) = q self%revision_ = self%revision_ + 1 if (present(ok)) ok = .true. end subroutine add_attitude