kepds Function

private pure function kepds(ds, dt, r0, vr0, alpha, mu)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: ds

universal anomaly difference

real(kind=wp), intent(in) :: dt
real(kind=wp), intent(in) :: r0
real(kind=wp), intent(in) :: vr0
real(kind=wp), intent(in) :: alpha
real(kind=wp), intent(in) :: mu

Return Value real(kind=wp)


Calls

proc~~kepds~~CallsGraph proc~kepds kepler_module::kepds proc~stumpff_c kepler_module::stumpff_c proc~kepds->proc~stumpff_c proc~stumpff_s kepler_module::stumpff_s proc~kepds->proc~stumpff_s

Source Code

    pure function kepds(ds, dt, r0, vr0, alpha, mu)

    implicit none

    real(wp),intent(in) :: ds  !! universal anomaly difference
    real(wp),intent(in) :: dt
    real(wp),intent(in) :: r0
    real(wp),intent(in) :: vr0
    real(wp),intent(in) :: alpha
    real(wp),intent(in) :: mu
    real(wp) :: kepds

    real(wp) :: c,s,ads2,ds2

    ds2  = ds * ds
    ads2 = alpha * ds2
    s    = stumpff_s(ads2)
    c    = stumpff_c(ads2)

    kepds = -sqrt(mu) * dt + r0 * vr0 * ds2 * c / sqrt(mu) + &
            (one - alpha * r0) * ds2 * ds * s + r0 * ds

    end function kepds