orbit_period Function

public pure function orbit_period(mu, a) result(period)

Compute the two-body orbital period.

Arguments

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

gravitational parameter []

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

semimajor axis [km]

Return Value real(kind=wp)

two-body orbital period [s]


Source Code

    pure function orbit_period(mu,a) result(period)

    implicit none

    real(wp),intent(in) :: mu !! gravitational parameter [\(km^{3}/s^{2}\)]
    real(wp),intent(in) :: a  !! semimajor axis [km]
    real(wp) :: period        !! two-body orbital period [s]

    period = twopi/sqrt(mu/a**3)

    end function orbit_period