op2ec Subroutine

private pure subroutine op2ec(z, po, pe)

heliocentric coordinates j2000 ecliptic plane from orbital plane

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(8) :: z

elements a,e,i,l,w,o,ma,ea

real(kind=wp), intent(in), dimension(6) :: po

orbital plane coordinates

real(kind=wp), intent(out), dimension(6) :: pe

j2000 ecliptic plane coordinates


Called by

proc~~op2ec~~CalledByGraph proc~op2ec standish_module::op2ec proc~helio standish_module::helio proc~helio->proc~op2ec proc~standish_module_test standish_module::standish_module_test proc~standish_module_test->proc~helio proc~standish_rv_func standish_module::standish_ephemeris%standish_rv_func proc~standish_module_test->proc~standish_rv_func proc~standish_rv_func->proc~helio

Source Code

    pure subroutine op2ec (z, po, pe)

    implicit none

    real(wp),dimension(8),intent(in)  :: z  !! elements a,e,i,l,w,o,ma,ea
    real(wp),dimension(6),intent(in)  :: po !! orbital plane coordinates
    real(wp),dimension(6),intent(out) :: pe !! j2000 ecliptic plane coordinates

    real(wp) :: s1, s2, s3, c1, c2, c3

    ! heliocentric au, au/yr
    s1 = sin (z(5)-z(6))
    s2 = sin (z(3))
    s3 = sin (z(6))
    c1 = cos (z(5)-z(6))
    c2 = cos (z(3))
    c3 = cos (z(6))

    pe (1) = (c1*c3-s1*s3*c2) * po (1) - (s1*c3+c1*s3*c2) * po (2) ! xec
    pe (2) = (c1*s3+s1*c3*c2) * po (1) - (s1*s3-c1*c3*c2) * po (2) ! yec
    pe (3) = s1 * s2 * po (1) + c1 * s2 * po (2)                   ! zec
    pe (4) = (c1*c3-s1*s3*c2) * po (4) - (s1*c3+c1*s3*c2) * po (5) ! vxec
    pe (5) = (c1*s3+s1*c3*c2) * po (4) - (s1*s3-c1*c3*c2) * po (5) ! vyec
    pe (6) = s1 * s2 * po (4) + c1 * s2 * po (5)                   ! vzec

    end subroutine op2ec