from_j2000body_to_j2000ssb Subroutine

public subroutine from_j2000body_to_j2000ssb(b, eph, et, rv, rv_ssb)

convert from a j2000-body frame to a j2000-ssb frame.

Arguments

Type IntentOptional Attributes Name
type(celestial_body), intent(in) :: b

eclipsing body

class(ephemeris_class), intent(inout) :: eph

the ephemeris to use for body and ssb

real(kind=wp), intent(in) :: et

ephemeris time (sec)

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

j2000-body state (km, km/s)

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

j2000-ssb state (km, km/s)


Calls

proc~~from_j2000body_to_j2000ssb~~CallsGraph proc~from_j2000body_to_j2000ssb from_j2000body_to_j2000ssb proc~transform reference_frame%transform proc~from_j2000body_to_j2000ssb->proc~transform get_c_cdot get_c_cdot proc~transform->get_c_cdot proc~rvcto_rvcfrom_icrf rvcto_rvcfrom_icrf proc~transform->proc~rvcto_rvcfrom_icrf get_rv get_rv proc~rvcto_rvcfrom_icrf->get_rv proc~from_primary_to_center two_body_rotating_frame%from_primary_to_center proc~rvcto_rvcfrom_icrf->proc~from_primary_to_center proc~from_primary_to_center->get_rv

Called by

proc~~from_j2000body_to_j2000ssb~~CalledByGraph proc~from_j2000body_to_j2000ssb from_j2000body_to_j2000ssb proc~get_sun_fraction get_sun_fraction proc~get_sun_fraction->proc~from_j2000body_to_j2000ssb

Source Code

    subroutine from_j2000body_to_j2000ssb(b, eph, et, rv, rv_ssb)

    type(celestial_body),intent(in) :: b !! eclipsing body
    class(ephemeris_class),intent(inout) :: eph !! the ephemeris to use for body and ssb
    real(wp),intent(in) :: et !! ephemeris time (sec)
    real(wp),dimension(6),intent(in) :: rv !! j2000-body state (km, km/s)
    real(wp),dimension(6),intent(out) :: rv_ssb !! j2000-ssb state (km, km/s)

    type(icrf_frame) :: f1, f2
    logical :: status_ok

    f1 = icrf_frame(b=b)
    f2 = icrf_frame(b=body_ssb)
    call f1%transform(rv,f2,et,eph,rv_ssb,status_ok) ! from f1 to f2
    if (.not. status_ok) error stop 'transformation error in from_j2000body_to_j2000ssb'

    end subroutine from_j2000body_to_j2000ssb