Point i with components from sources (OpenFrames' getPoint). No checks:
use verify_data and num_points first.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Trajectory), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | i |
the point (1 to num_points(sources)) |
||
| type(DataSource), | intent(in) | :: | sources(3) |
where the components come from |
pure function point(self, i, sources) result(v) class(Trajectory), intent(in) :: self integer, intent(in) :: i !! the point (1 to num_points(sources)) type(DataSource), intent(in) :: sources(3) !! where the components come from real(wp) :: v(3) integer :: k do k = 1, 3 select case (sources(k)%src) case (SOURCE_TIME) v(k) = sources(k)%scale * self%t(i) case (SOURCE_POSOPT) v(k) = sources(k)%scale * self%posopt(sources(k)%element, sources(k)%opt, i) case (SOURCE_ATTITUDE) v(k) = sources(k)%scale * self%att(sources(k)%element, i) case default v(k) = 0.0_wp end select end do end function point