Update this frame and its descendants for simulation time t (followed
trajectories set positions and attitudes).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ReferenceFrame), | intent(inout), | target | :: | self | ||
| real(kind=wp), | intent(in) | :: | t |
simulation time |
recursive subroutine update(self, t) class(ReferenceFrame), intent(inout), target :: self real(wp), intent(in) :: t !! simulation time logical :: has_position, has_attitude real(wp) :: pos(3), att(4) integer :: k if (self%following) then if (associated(self%follow_frame_)) then ! (the data in another frame's coordinates) pos = self%position_ att = self%attitude_ call self%follower_%update(t, pos, att, has_position, has_attitude) ! (its time and trajectory) call followed_pose(self, t, self%position_, self%attitude_) else call self%follower_%update(t, self%position_, self%attitude_, has_position, has_attitude) end if end if do k = 1, self%n_children call self%children(k)%p%update(t) end do end subroutine update